This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fstatat64 fixes


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  <jakub@redhat.com>

	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]