From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4259 invoked by alias); 5 May 2009 19:13:09 -0000 Received: (qmail 4237 invoked by uid 22791); 5 May 2009 19:13:06 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 May 2009 19:13:00 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id n45JOEFd012104; Tue, 5 May 2009 21:24:14 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id n45JODbs012102; Tue, 5 May 2009 21:24:13 +0200 Date: Tue, 05 May 2009 19:13:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] fstatat64 fixes Message-ID: <20090505192413.GE16681@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2009-05/txt/msg00000.txt.bz2 Hi! With -Wsystem-headers I've noticed that gcc complains about fstatat64 declaring struct stat64 in the prototype. Seems unlike all the other *64 functions it wasn't protected with __USE_LARGEFILE64. Also, the inline wrapper uses different guard than the prototype (__USE_GNU vs. __USE_ATFILE). 2009-05-05 Jakub Jelinek * io/sys/stat.h (fstatat64): Guard prototype with __USE_LARGEFILE64, guard __extern_inline wrapper with __USE_ATFILE instead of __USE_GNU. --- libc/io/sys/stat.h.jj 2009-03-02 16:43:58.000000000 +0100 +++ libc/io/sys/stat.h 2009-05-05 21:05:36.000000000 +0200 @@ -249,9 +249,11 @@ extern int __REDIRECT_NTH (fstatat, (int # endif # endif +# ifdef __USE_LARGEFILE64 extern int fstatat64 (int __fd, __const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); +# endif #endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K @@ -516,7 +518,7 @@ __NTH (fstat64 (int __fd, struct stat64 return __fxstat64 (_STAT_VER, __fd, __statbuf); } -# ifdef __USE_GNU +# ifdef __USE_ATFILE __extern_inline int __NTH (fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag)) Jakub