Browse Source

Fix namespace pollution by hiding statfix and statfix64 by
prepending an __ to the name. Not perfect but better.
-Erik

Eric Andersen 23 years ago
parent
commit
d4e1ba6966

+ 1 - 1
libc/sysdeps/linux/common/statfix.c

@@ -26,7 +26,7 @@
 #include "statfix.h"
 
 /* Convert from the kernel's version of struct stat to libc's version  */
-void statfix(struct libc_stat *libcstat, struct kernel_stat *kstat)
+void __statfix(struct libc_stat *libcstat, struct kernel_stat *kstat)
 {
 	memset(libcstat, 0, sizeof(struct libc_stat));
 	libcstat->st_dev = kstat->st_dev;

+ 1 - 1
libc/sysdeps/linux/common/statfix.h

@@ -22,7 +22,7 @@
 #undef stat64
 #undef stat
 
-extern void statfix(struct libc_stat *libcstat, struct kernel_stat *kstat);
+extern void __statfix(struct libc_stat *libcstat, struct kernel_stat *kstat);
 extern int __fxstat(int version, int fd, struct libc_stat * statbuf);
 
 #endif

+ 1 - 1
libc/sysdeps/linux/common/statfix64.c

@@ -29,7 +29,7 @@
 #ifdef __UCLIBC_HAVE_LFS__
 
 /* Convert from the kernel's version of struct stat to libc's version  */
-void statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat)
+void __statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat)
 {
 	memset(libcstat, 0, sizeof(struct libc_stat64));
 	libcstat->st_dev = kstat->st_dev;

+ 2 - 2
libc/sysdeps/linux/common/statfix64.h

@@ -45,7 +45,7 @@
 #undef stat64
 #undef stat
 
-extern void statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat);
+extern void __statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat);
 extern int __fxstat64(int version, int fd, struct libc_stat64 * statbuf);
 
 #else   
@@ -72,7 +72,7 @@ extern int __fxstat64(int version, int fd, struct libc_stat64 * statbuf);
 #undef stat64
 #undef stat
 
-extern void statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat);
+extern void __statfix64(struct libc_stat64 *libcstat, struct kernel_stat64 *kstat);
 extern int __fxstat64(int version, int fd, struct libc_stat64 * statbuf);
 
 

+ 6 - 6
libc/sysdeps/linux/common/syscalls.c

@@ -985,7 +985,7 @@ int __xstat(int version, const char * file_name, struct libc_stat * cstat)
 	int result = __stat(file_name, &kstat);
 
 	if (result == 0) { 
-		statfix(cstat, &kstat);
+		__statfix(cstat, &kstat);
 	}
 	return result;
 }
@@ -1014,7 +1014,7 @@ int __lxstat(int version, const char * file_name, struct libc_stat * cstat)
 	int result = __lstat(file_name, &kstat);
 
 	if (result == 0) { 
-		statfix(cstat, &kstat);
+		__statfix(cstat, &kstat);
 	}
 	return result;
 }
@@ -1043,7 +1043,7 @@ int __fxstat(int version, int fd, struct libc_stat * cstat)
 	int result = __fstat(fd, &kstat);
 
 	if (result == 0) { 
-		statfix(cstat, &kstat);
+		__statfix(cstat, &kstat);
 	}
 	return result;
 }
@@ -1706,7 +1706,7 @@ int __xstat64(int version, const char * file_name, struct libc_stat64 * cstat)
 	int result = __stat64(file_name, &kstat);
 
 	if (result == 0) { 
-		statfix64(cstat, &kstat);
+		__statfix64(cstat, &kstat);
 	}
 	return result;
 }
@@ -1733,7 +1733,7 @@ int __lxstat64(int version, const char * file_name, struct libc_stat64 * cstat)
 	int result = __lstat64(file_name, &kstat);
 
 	if (result == 0) { 
-		statfix64(cstat, &kstat);
+		__statfix64(cstat, &kstat);
 	}
 	return result;
 }
@@ -1760,7 +1760,7 @@ int __fxstat64(int version, int fd, struct libc_stat64 * cstat)
 	int result = __fstat64(fd, &kstat);
 
 	if (result == 0) { 
-		statfix64(cstat, &kstat);
+		__statfix64(cstat, &kstat);
 	}
 	return result;
 }