This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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] PPC64 remove warnings for struct kernel_stat


For systems where STAT_IS_KERNEL_STAT (like powerpc64) "struct kernel_stat" is not declared. So the new xstatconv.h is generating warnings like:

In file included from ../sysdeps/unix/sysv/linux/xstat.c:33:
../sysdeps/unix/sysv/linux/xstatconv.h:23: warning: `struct kernel_stat' declared inside parameter list
../sysdeps/unix/sysv/linux/xstatconv.h:23: warning: its scope is only this definition or declaration, which is probably not what you want


So the externs in xstatconv.h that refer to struct kernel_stat should be guarded with #ifndef STAT_IS_KERNEL_STAT.

Also linunx/fxstat.c, lxstat.c, and xstat.c contain externs for __syscall_[*]stat that reference stuct kernel_stat. In each case the __syscall_[*]stat symbol is not used and should be removed.

2003-06-26 Steven Munroe <sjmunroe@us.ibm.com>

	* sysdeps/unix/sysv/linux/xstatconv.h [!STAT_IS_KERNEL_STAT]:
	Conditionalize function definitions that use struct kernel_stat.
	* sysdeps/unix/sysv/linux/fxstat.c: Remove __syscall_fstat
	extern.
	* sysdeps/unix/sysv/linux/lxstat.c: Remove __syscall_lstat
	extern.
	* sysdeps/unix/sysv/linux/xstat.c: Remove __syscall_stat extern.
diff -urp libc23-cvstip-20030626/sysdeps/unix/sysv/linux/fxstat.c libc23/sysdeps/unix/sysv/linux/fxstat.c
--- libc23-cvstip-20030626/sysdeps/unix/sysv/linux/fxstat.c	2003-06-11 17:36:15.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/fxstat.c	2003-06-26 13:55:34.000000000 -0500
@@ -33,8 +33,6 @@
 
 #include <xstatconv.h>
 
-extern int __syscall_fstat (int, struct kernel_stat *__unbounded);
-
 /* Get information about the file FD in BUF.  */
 int
 __fxstat (int vers, int fd, struct stat *buf)
diff -urp libc23-cvstip-20030626/sysdeps/unix/sysv/linux/lxstat.c libc23/sysdeps/unix/sysv/linux/lxstat.c
--- libc23-cvstip-20030626/sysdeps/unix/sysv/linux/lxstat.c	2003-06-11 17:36:15.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/lxstat.c	2003-06-26 14:06:08.000000000 -0500
@@ -32,9 +32,6 @@
 
 #include <xstatconv.h>
 
-extern int __syscall_lstat (const char *__unbounded,
-			    struct kernel_stat *__unbounded);
-
 /* Get information about the file NAME in BUF.  */
 int
 __lxstat (int vers, const char *name, struct stat *buf)
diff -urp libc23-cvstip-20030626/sysdeps/unix/sysv/linux/xstat.c libc23/sysdeps/unix/sysv/linux/xstat.c
--- libc23-cvstip-20030626/sysdeps/unix/sysv/linux/xstat.c	2003-06-11 17:36:15.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/xstat.c	2003-06-26 14:05:10.000000000 -0500
@@ -32,9 +32,6 @@
 
 #include <xstatconv.h>
 
-extern int __syscall_stat (const char *__unbounded,
-			   struct kernel_stat *__unbounded);
-
 /* Get information about the file NAME in BUF.  */
 int
 __xstat (int vers, const char *name, struct stat *buf)
diff -urp libc23-cvstip-20030626/sysdeps/unix/sysv/linux/xstatconv.h libc23/sysdeps/unix/sysv/linux/xstatconv.h
--- libc23-cvstip-20030626/sysdeps/unix/sysv/linux/xstatconv.h	2003-06-11 17:32:03.000000000 -0500
+++ libc23/sysdeps/unix/sysv/linux/xstatconv.h	2003-06-26 13:52:57.000000000 -0500
@@ -19,7 +19,8 @@
 
 #include "kernel-features.h"
 
-
+#ifndef STAT_IS_KERNEL_STAT
 extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
 extern int __xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf);
+#endif
 extern int __xstat32_conv (int vers, struct stat64 *kbuf, struct stat *buf);

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