Modified: gdb/defs.h =================================================================== --- gdb/defs.h 2008-09-13 01:57:56 UTC (rev 135288) +++ gdb/defs.h 2008-09-13 04:09:52 UTC (rev 135289) @@ -30,6 +30,31 @@ #include #include +/* The libdecnumber library, on which GDB depends, includes a header file + called gstdint.h instead of relying directly on stdint.h. GDB, on the + other hand, includes stdint.h directly, relying on the fact that gnulib + generates a copy if the system doesn't provide one or if it is missing + some features. Unfortunately, gstdint.h and stdint.h cannot be included + at the same time, which may happen when we include a file from + libdecnumber. + + The first time we encountered this problem, we thought we had resolved + it by having a file named gstdint.h in this directory that would simply + contain a #include of stdint.h, thus hoping to "redirect" the gstdint.h + include in libdecnumber. Unfortunately, it turns out that this doesn't + work after all, mostly because libdecnumber includes gstdint.h using + the double quotes as opposed to the angle brackets. The search path + in implementation defined, but it seems that the gstdint.h files in + libdecnumber is picked up after all, thus defeating our trick. + + The following macro definition is a horrible hack that prevents + the effective inclusion of gstdint.h, as all the definitions it + provides are guarded against GCC_GENERATED_STDINT_H. We already + have gnulib/stdint.h included, so it's ok to blank out gstdint.h. + It's horrible but it allows to fix the build issues it gstdint.h + causes while we work on a more suitable fix. */ +#define GCC_GENERATED_STDINT_H 1 + #ifdef HAVE_STDDEF_H #include #endif