Philipp Thomas writes:
Jesse Marlin <jlm@compgen.com> [Mon, 28 Apr 2003 12:48:01 -0400]:
In file included from /usr/include/_G_config.h:44, from /usr/include/libio.h:32, from /usr/include/stdio.h:72, from test_plan_xml_to_rnf.c:48: /usr/include/gconv.h:72: error: parse error before "size_t" /usr/include/gconv.h:88: error: parse error before "size_t" /usr/include/gconv.h:97: error: parse error before "size_t" /usr/include/gconv.h:174: error: parse error before "size_t" I just tried to compile the same code above with a gcc-3.1.1 that I copied from my old SuSE 7.2 system and it works.
The first thing I'd do is put an '#include <sys/types.h>' at the top of the includes in test_plan_xml_to_rnf.c. glibc has changed quite a bit since 7.2 and there are a few headers that gcc generates at compile time (/usr/lib/gcc-lib/<target>/<version>/include)
That did seem to help out a lot. It doesn't seem to affect everything that includes stdio.h, but some stuff it does. The manual pages don't reflect any include changes either. Here are some errors from a build I just attempted with gcc-3.1.1. Notice the mixed in gcc-3.3 headers there. From my understanding gcc is supposed to know where to look for its headers. Keep in mind that this compiles fine on every machine we have here except this one with SuSE 8.2 on it. The errors make no sense at all. I've only included a small portion here, this goes on for about a mile :) In file included from CGR.h:31: /usr/include/stdio.h:0: warning: unrecognized text at end of #line /usr/include/stdio.h:27: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:28, from CGR.h:31: /usr/include/features.h:0: warning: unrecognized text at end of #line /usr/include/features.h:290: warning: unrecognized text at end of #line In file included from /usr/include/features.h:291, from /usr/include/stdio.h:28, from CGR.h:31: /usr/include/sys/cdefs.h:0: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:28, from CGR.h:31: /usr/include/features.h:291: warning: unrecognized text at end of #line /usr/include/features.h:313: warning: unrecognized text at end of #line In file included from /usr/include/features.h:314, from /usr/include/stdio.h:28, from CGR.h:31: /usr/include/gnu/stubs.h:0: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:28, from CGR.h:31: /usr/include/features.h:314: warning: unrecognized text at end of #line In file included from CGR.h:31: /usr/include/stdio.h:28: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:34, from CGR.h:31: /usr/lib/gcc-lib/i486-suse-linux/3.3/include/stddef.h:0: warning: unrecognized text at end of #line /usr/lib/gcc-lib/i486-suse-linux/3.3/include/stddef.h:212: warning: unrecognized text at end of #line In file included from CGR.h:31: /usr/include/stdio.h:34: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:36, from CGR.h:31: /usr/include/bits/types.h:0: warning: unrecognized text at end of #line /usr/include/bits/types.h:27: warning: unrecognized text at end of #line In file included from /usr/include/bits/types.h:28, from /usr/include/stdio.h:36, from CGR.h:31: /usr/include/bits/wordsize.h:0: warning: unrecognized text at end of #line In file included from /usr/include/stdio.h:36, from CGR.h:31: /usr/include/bits/types.h:28: warning: unrecognized text at end of #line In file included from /usr/include/bits/types.h:31, from /usr/include/stdio.h:36, from CGR.h:31: /usr/lib/gcc-lib/i486-suse-linux/3.3/include/stddef.h:0: warning: unrecognized text at end of #line