From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9913 invoked by alias); 3 Jun 2008 18:20:42 -0000 Received: (qmail 9539 invoked by uid 48); 3 Jun 2008 18:19:52 -0000 Date: Tue, 03 Jun 2008 18:20:00 -0000 Message-ID: <20080603181952.9538.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/13682] Compile error with cstdio: fgetpos not declared on AIX In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "patrick133t at yahoo dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00131.txt.bz2 ------- 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 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