From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1213 invoked by alias); 16 May 2011 13:17:06 -0000 Received: (qmail 1200 invoked by uid 22791); 16 May 2011 13:17:05 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_FX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 May 2011 13:16:51 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/48996] fixincl on Red Hat EL 5 breaks sys/stat.h fstat64() X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 16 May 2011 13:26:00 -0000 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: 2011-05/txt/msg01256.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48996 --- Comment #3 from Richard Guenther 2011-05-16 13:07:56 UTC --- I don't see anything wrong with the fixinclude though it is a bit fragile as it wants to fixup both prototype and redicrected inline function and both are not guarded with the same #ifdefs: #ifdef __USE_LARGEFILE64 extern int stat64 (__const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); #endif but # if defined __USE_LARGEFILE64 \ && (! defined __USE_FILE_OFFSET64 \ || (defined __REDIRECT_NTH && defined __OPTIMIZE__)) extern __inline__ int __NTH (fstat64 (int __fd, struct stat64 *__statbuf)) { return __fxstat64 (_STAT_VER, __fd, __statbuf); } ... so if only the fixed fstat64 prototype remains after preprocessing that will trigger the error you saw. So, do you have a testcase that fails to build? And which flags do you pass?