------- Comment #7 from patrick133t at yahoo dot com 2008-06-03 18:19 ------- I see this on AIX 5.3 also. I tracked it down by creating a simple program that just does a #include <string> and then saw that it worked when compiled as:
g++ -c -o bar.o bar.cc However, it fails to compile when I do g++ -c -D_LARGE_FILES -o bar.o bar.cc I then grepped all the files that get included in the preprocessed output and found only these two reference _LARGE_FILES: /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/include/stdio.h /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.2/include/sys/types.h The problem appears to be that stdio.h makes the following definitions that then get #undef'ed in cstdio: #define fseeko fseeko64 #define ftello ftello64 #define fgetpos fgetpos64 #define fsetpos fsetpos64 #define fopen fopen64 #define freopen freopen64 Because of these defitions, the prototypes in the preprocessed output have a 64 on the end but the using ::fsetpos do not have them, and we get the error. I really think this is GCC's problem and not caused by AIX headers. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13682