Browse Source

Do hidden __*stat*

Peter S. Mazinger 18 years ago
parent
commit
36bff6b9bf

+ 3 - 2
libc/sysdeps/linux/common/fstat.c

@@ -17,7 +17,7 @@
 #define __NR___syscall_fstat __NR_fstat
 static inline _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf);
 
-int fstat(int fd, struct stat *buf)
+int attribute_hidden __fstat(int fd, struct stat *buf)
 {
 	int result;
 	struct kernel_stat kbuf;
@@ -28,7 +28,8 @@ int fstat(int fd, struct stat *buf)
 	}
 	return result;
 }
+strong_alias(__fstat,fstat)
 
 #if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(fstat, fstat64);
+weak_alias(fstat,fstat64)
 #endif

+ 3 - 1
libc/sysdeps/linux/common/fstat64.c

@@ -19,7 +19,7 @@
 static inline _syscall2(int, __syscall_fstat64,
 		int, filedes, struct kernel_stat64 *, buf);
 
-int fstat64(int fd, struct stat64 *buf)
+int attribute_hidden __fstat64(int fd, struct stat64 *buf)
 {
 	int result;
 	struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int fstat64(int fd, struct stat64 *buf)
 	}
 	return result;
 }
+strong_alias(__fstat64,fstat64)
+
 #endif							/* __UCLIBC_HAS_LFS__ */

+ 3 - 1
libc/sysdeps/linux/common/fstatfs.c

@@ -9,4 +9,6 @@
 
 #include "syscalls.h"
 #include <sys/vfs.h>
-_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
+#define __NR___fstatfs __NR_fstatfs
+attribute_hidden _syscall2(int, __fstatfs, int, fd, struct statfs *, buf);
+strong_alias(__fstatfs,fstatfs)

+ 3 - 2
libc/sysdeps/linux/common/lstat.c

@@ -18,7 +18,7 @@
 static inline _syscall2(int, __syscall_lstat,
 		const char *, file_name, struct kernel_stat *, buf);
 
-int lstat(const char *file_name, struct stat *buf)
+int attribute_hidden __lstat(const char *file_name, struct stat *buf)
 {
 	int result;
 	struct kernel_stat kbuf;
@@ -29,7 +29,8 @@ int lstat(const char *file_name, struct stat *buf)
 	}
 	return result;
 }
+strong_alias(__lstat,lstat)
 
 #if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(lstat, lstat64);
+weak_alias(lstat,lstat64)
 #endif

+ 3 - 1
libc/sysdeps/linux/common/lstat64.c

@@ -19,7 +19,7 @@
 static inline _syscall2(int, __syscall_lstat64, const char *, file_name,
 		  struct kernel_stat64 *, buf);
 
-int lstat64(const char *file_name, struct stat64 *buf)
+int attribute_hidden __lstat64(const char *file_name, struct stat64 *buf)
 {
 	int result;
 	struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int lstat64(const char *file_name, struct stat64 *buf)
 	}
 	return result;
 }
+strong_alias(__lstat64,lstat64)
+
 #endif							/* __UCLIBC_HAS_LFS__ */

+ 3 - 2
libc/sysdeps/linux/common/stat.c

@@ -17,7 +17,7 @@
 static inline _syscall2(int, __syscall_stat,
 		const char *, file_name, struct kernel_stat *, buf);
 
-int stat(const char *file_name, struct stat *buf)
+int attribute_hidden __stat(const char *file_name, struct stat *buf)
 {
 	int result;
 	struct kernel_stat kbuf;
@@ -28,7 +28,8 @@ int stat(const char *file_name, struct stat *buf)
 	}
 	return result;
 }
+strong_alias(__stat,stat)
 
 #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(stat, stat64);
+weak_alias(stat,stat64)
 #endif

+ 3 - 1
libc/sysdeps/linux/common/stat64.c

@@ -19,7 +19,7 @@
 static inline _syscall2(int, __syscall_stat64,
 		const char *, file_name, struct kernel_stat64 *, buf);
 
-int stat64(const char *file_name, struct stat64 *buf)
+int attribute_hidden __stat64(const char *file_name, struct stat64 *buf)
 {
 	int result;
 	struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int stat64(const char *file_name, struct stat64 *buf)
 	}
 	return result;
 }
+strong_alias(__stat64,stat64)
+
 #endif							/* __UCLIBC_HAS_LFS__ */

+ 2 - 2
libc/sysdeps/linux/common/statfs.c

@@ -16,8 +16,8 @@
 static inline _syscall2(int, __syscall_statfs,
 		const char *, path, struct statfs *, buf);
 
-int statfs(const char *path, struct statfs * buf)
+int attribute_hidden __statfs(const char *path, struct statfs * buf)
 {
 	return __syscall_statfs(path, buf);
 }
-
+strong_alias(__statfs,statfs)