[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
c-strtold compilation failure on mingw
From: |
Bruno Haible |
Subject: |
c-strtold compilation failure on mingw |
Date: |
Sat, 3 Apr 2010 11:07:37 +0100 |
User-agent: |
KMail/1.9.9 |
On mingw, I'm seeing this compilation error:
gcc-3 -mno-cygwin -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\".exe\"
-DEXEEXT=\".exe\" -DNO_XMALLOC -DEXEEXT=\".exe\" -I. -I.. -I../intl
-I/usr/local/mingw/include -Wall -g -O2 -MT c-strtold.o -MD -MP -MF
$depbase.Tpo -c -o c-strtold.o c-strtold.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/windef.h:253,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/windows.h:48,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winsock2.h:22,
from ./unistd.h:50,
from ./stdlib.h:75,
from c-strtod.c:26,
from c-strtold.c:2:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winnt.h:79:
error: parse error before numeric constant
/usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winnt.h:146:
error: parse error before numeric constant
...
The reason is a 'typedef long LONG;' line in winnt.h:79, which collides with
the use of 'LONG' in lib/c-strtold.c. This fixes it.
2010-04-03 Bruno Haible <address@hidden>
stdlib: Avoid compilation failure of c-strtold on mingw.
* lib/stdlib.in.h: Don't include <unistd.h> on native Windows systems.
--- lib/stdlib.in.h.orig Sat Apr 3 12:04:00 2010
+++ lib/stdlib.in.h Sat Apr 3 12:03:43 2010
@@ -67,10 +67,10 @@
};
#endif
-#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && !
defined __GLIBC__
+#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && !
defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined
__CYGWIN__)
/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
-/* But avoid namespace pollution on glibc systems. */
+/* But avoid namespace pollution on glibc systems and native Windows. */
# include <unistd.h>
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- c-strtold compilation failure on mingw,
Bruno Haible <=