Browse Source

Do hidden fopen*/remove

Peter S. Mazinger 18 years ago
parent
commit
20453d82ab
3 changed files with 5 additions and 2 deletions
  1. 2 1
      libc/stdio/fopen.c
  2. 1 0
      libc/stdio/fopen64.c
  3. 2 1
      libc/stdio/remove.c

+ 2 - 1
libc/stdio/fopen.c

@@ -11,7 +11,8 @@
 # define FILEDES_ARG    (-1)
 #endif
 
-FILE *fopen(const char * __restrict filename, const char * __restrict mode)
+FILE attribute_hidden *__fopen(const char * __restrict filename, const char * __restrict mode)
 {
 	return _stdio_fopen(((intptr_t) filename), mode, NULL, FILEDES_ARG);
 }
+strong_alias(__fopen,fopen)

+ 1 - 0
libc/stdio/fopen64.c

@@ -8,6 +8,7 @@
 #include "_stdio.h"
 
 #define __DO_LARGEFILE
+#define __fopen       __fopen64
 #define fopen         fopen64
 #define FILEDES_ARG   (-2)
 #include "fopen.c"

+ 2 - 1
libc/stdio/remove.c

@@ -19,7 +19,7 @@
  *   equivalent to rmdir(path). 
  */
 
-int remove(register const char *filename)
+int attribute_hidden __remove(register const char *filename)
 {
 	int saved_errno = errno;
 	int rv;
@@ -30,3 +30,4 @@ int remove(register const char *filename)
 	}
 	return rv;
 }
+strong_alias(__remove,remove)