g++ -D_LARGE_FILES=1 on AIX 5.3

Albert Chin gcc-help@mlists.thewrittenword.com
Wed Feb 22 23:32:00 GMT 2006


Using gcc 4.0.2 on AIX 5.3:
  $ cat a.cxx
#include <iostream>
  $ g++ -D_LARGE_FILES=1 -c a.cxx
/opt/TWWfsw/gcc402/include/c++/cstdio:108: error: '::fgetpos' has not been declared
/opt/TWWfsw/gcc402/include/c++/cstdio:110: error: '::fopen' has not been declared
/opt/TWWfsw/gcc402/include/c++/cstdio:115: error: '::freopen' has not been declared
/opt/TWWfsw/gcc402/include/c++/cstdio:118: error: '::fsetpos' has not been declared

Compiling without -D_LARGE_FILES=1 works but why does building with
-D_LARGE_FILES=1 cause a problem? Maybe because of the following in
<stdio.h>:
  #ifdef _LARGE_FILES
  #define fseeko fseeko64
  #define ftello ftello64
  #define fgetpos fgetpos64
  #define fsetpos fsetpos64
  #define fopen fopen64
  #define freopen freopen64
  #endif /* _LARGE_FILES */

-- 
albert chin (china@thewrittenword.com)



More information about the Gcc-help mailing list