This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13682] Compile error with cstdio: fgetpos not declared on AIX



------- Comment #8 from oliver at FreeBSD dot org  2009-08-20 07:31 -------
I fixed this on my AIX system by changing
/opt/pkg/gcc34/include/c++/3.4.6/cstdio.

I uncommented the undef's:

<snip>
// Get rid of those macros defined in <stdio.h> in lieu of real functions.
#undef clearerr
#undef fclose
#undef feof
#undef ferror
#undef fflush
#undef fgetc
/* get db4 to compile #undef fgetpos */
#undef fgets
/* get db4 to compile #undef fopen */
#undef fprintf
#undef fputc
#undef fputs
#undef fread
/* get db4 to compile #undef freopen */
#undef fscanf
#undef fseek
/* get db4 to compile #undef fsetpos */
#undef ftell
#undef fwrite
</snip>

This made db4 compile..... So I guess this is of course a gcc problem because
this headers are supplied by gcc!
As in #7 stated, on AIX the functions are redefined to use the 64-Bit functions
for large-file support. #undef'ing them later removes the definition to the
64-Bit functions but only them are declared on aix when large file support is
defined.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13682


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]