This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13682] Compile error with cstdio: fgetpos not declared on AIX
- From: "oliver at FreeBSD dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2009 07:31:30 -0000
- Subject: [Bug c++/13682] Compile error with cstdio: fgetpos not declared on AIX
- References: <bug-13682-7634@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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