I compiled today the pretest version of GDB 7.9 using the latest
MinGW32 runtime v3.21, and hit a build failure:

     gcc -DHAVE_CONFIG_H -I. -I../.././gnulib/import -I..      -O2 -g3 
-D__USE_MINGW_ACCESS -MT rename.o -MD -MP -MF .deps/rename.Tpo -c -o rename.o 
../.././gnulib/import/rename.c
     In file included from 
d:\usr\bin\../lib/gcc/mingw32/4.7.2/../../../../include/unistd.h:95:0,
                      from ./unistd.h:43,
                      from ../.././gnulib/import/rename.c:35:
     d:\usr\bin\../lib/gcc/mingw32/4.7.2/../../../../include/parts/time.h:65:8: 
error: redefinition of 'struct rpl_timespec'
     In file included from ./sys/stat.h:44:0,
                      from ../.././gnulib/import/rename.c:34:
     ./time.h:386:8: note: originally defined here
     Makefile:1390: recipe for target `rename.o' failed
     make[8]: *** [rename.o] Error 1
     make[8]: Leaving directory 
`/d/usr/eli/utils/gdb-7.8.90/gdb/build-gnulib/import'
     Makefile:1410: recipe for target `all-recursive' failed
     make[7]: *** [all-recursive] Error 1

This happens because MinGW 3.21 now does define 'struct timespec'.  It
does that in an internal header file included by unistd.h.  The
definition there is different from what gnulib provides, thus the
error.

So I think that gnulib ought to test unistd.h as one of the headers
that could potentially define this structure, in addition to the ones
it already tests: pthread.h, time.h, and sys/time.h.

TIA

Reply via email to