* sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 20 Jan 2004 06:57:48 +0000 (06:57 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 20 Jan 2004 06:57:48 +0000 (06:57 +0000)
        getopt.h.

        * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
        strtof is not part of C89 and isn't included with Mac OS X.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3142 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
debugger/mcs51/cmd.c
sim/ucsim/gui.src/serio.src/main.cc

index 24d5cd4575a06a1e589fb52289963a3e03111c00..ea0272081102dbfb47adb6928bbe2757972154d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-01-20  Michael Hope  <michaelh@juju.net.nz>
+
+       * sim/ucsim/gui.src/serio.src/main.cc: Fixed unconditional use of
+       getopt.h.
+
+       * debugger/mcs51/cmd.c (getValBasic): Changed strtof to strtod as
+       strtof is not part of C89 and isn't included with Mac OS X.
+
 2004-01-20 Erik Petrich <epetrich@ivorytower.norman.ok.us>
 
        * src/hc08/gen.c (genPlusIncr, genUminus, genMinusDec, genCmp,
index ed59efdd34d8a570ab53b0df0d94372ec0365812..b0a8a937707d429caf8938d9da2d918bc2639c4b 100644 (file)
@@ -2330,7 +2330,7 @@ static unsigned long getValBasic(symbol *sym, link *type, char *val)
     }v;
 
     if (IS_FLOAT(type))        
-        v.f = strtof(val,NULL);    
+        v.f = strtod(val,NULL);    
     else
        if (IS_PTR(type))
            v.val = strtol(val,NULL,0);
index 32e076f878351d33f4829ceba6bd9a15bcf5870c..5293a1745c6d74766557aa691fc51900bc3dc442 100644 (file)
 #include <string.h>
 #include <unistd.h>
 #include <signal.h>
-#include <getopt.h> // FIXME
+
+#if defined(HAVE_GETOPT_H)
+# include <getopt.h>
+#endif
+
 #include "fileio.hh"
 #include "frontend.hh"
 #include "posix_signal.hh"