OSDN Git Service

Hide some of the f* *printf, use them as well
authorPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 14:49:09 +0000 (14:49 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Thu, 8 Dec 2005 14:49:09 +0000 (14:49 -0000)
16 files changed:
libc/stdio/_fopen.c
libc/stdio/_stdio.c
libc/stdio/asprintf.c
libc/stdio/dprintf.c
libc/stdio/fdopen.c
libc/stdio/fileno.c
libc/stdio/fmemopen.c
libc/stdio/fopencookie.c
libc/stdio/open_memstream.c
libc/stdio/popen.c
libc/stdio/remove.c
libc/stdio/swprintf.c
libc/stdio/tmpfile.c
libc/stdio/vasprintf.c
libc/stdio/vdprintf.c
libc/stdio/vswprintf.c

index e33c50f..46ea8a2 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define isatty __isatty
+
 #include "_stdio.h"
 
 /*
index b5f1141..727f9e3 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define isatty __isatty
+
 #include "_stdio.h"
 
 /* This is pretty much straight from uClibc, but with one important
index 36ed807..207b35a 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define vasprintf __vasprintf
+
 #include "_stdio.h"
 #include <stdarg.h>
 
@@ -12,7 +14,7 @@
 #warning Skipping asprintf and __asprintf since no vsnprintf!
 #else
 
-int __asprintf(char **__restrict buf, const char * __restrict format, ...)
+int attribute_hidden __asprintf(char **__restrict buf, const char * __restrict format, ...)
 {
        va_list arg;
        int rv;
@@ -24,6 +26,6 @@ int __asprintf(char **__restrict buf, const char * __restrict format, ...)
        return rv;
 }
 
-weak_alias(__asprintf,asprintf)
+strong_alias(__asprintf,asprintf)
 
 #endif
index dfdd497..1fc46c7 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define vdprintf __vdprintf
+
 #include "_stdio.h"
 #include <stdarg.h>
 
index fa08c97..9b08b4b 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "_stdio.h"
 
-FILE *fdopen(int filedes, const char *mode)
+FILE attribute_hidden *__fdopen(int filedes, const char *mode)
 {
        intptr_t cur_mode;
 
@@ -15,3 +15,4 @@ FILE *fdopen(int filedes, const char *mode)
                ? _stdio_fopen(cur_mode, mode, NULL, filedes) 
                : NULL;
 }
+strong_alias(__fdopen,fdopen)
index 4ea21d7..526a4eb 100644 (file)
@@ -23,12 +23,13 @@ int attribute_hidden __fileno_unlocked(register FILE *stream)
 
 weak_alias(__fileno_unlocked,fileno_unlocked);
 #ifndef __UCLIBC_HAS_THREADS__
+hidden_weak_alias(__fileno_unlocked,__fileno);
 weak_alias(__fileno_unlocked,fileno);
 #endif
 
 #elif defined __UCLIBC_HAS_THREADS__
 
-int fileno(register FILE *stream)
+int attribute_hidden __fileno(register FILE *stream)
 {
        int retval;
        __STDIO_AUTO_THREADLOCK_VAR;
@@ -41,5 +42,5 @@ int fileno(register FILE *stream)
 
        return retval;
 }
-
+strong_alias(__fileno,fileno)
 #endif
index 7febe1a..fc78702 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define fopencookie __fopencookie
+
 #include "_stdio.h"
 
 #ifndef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
index 73a5a02..a70e17b 100644 (file)
@@ -28,7 +28,7 @@
 /* Currently no real reentrancy issues other than a possible double close(). */
 
 #ifndef __BCC__
-FILE *fopencookie(void * __restrict cookie, const char * __restrict mode,
+FILE attribute_hidden *__fopencookie(void * __restrict cookie, const char * __restrict mode,
                                  cookie_io_functions_t io_functions)
 #else
 FILE *_fopencookie(void * __restrict cookie, const char * __restrict mode,
@@ -57,3 +57,6 @@ FILE *_fopencookie(void * __restrict cookie, const char * __restrict mode,
 
        return stream;
 }
+#ifndef __BCC__
+strong_alias(__fopencookie,fopencookie)
+#endif
index 5799005..f750cd1 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define fopencookie __fopencookie
+
 #include "_stdio.h"
 
 #ifndef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
index 00c2d7b..14a36aa 100644 (file)
@@ -17,6 +17,7 @@
 #define waitpid __waitpid
 #define execl __execl
 #define dup2 __dup2
+#define fdopen __fdopen
 
 #include <stdio.h>
 #include <stdlib.h>
index aaef334..d471ae2 100644 (file)
@@ -5,6 +5,9 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define rmdir __rmdir
+#define unlink __unlink
+
 #include "_stdio.h"
 
 #include <unistd.h>
index bdb0924..b373df8 100644 (file)
@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define vswprintf __vswprintf
+
 #include "_stdio.h"
 #include <stdarg.h>
 #include <wchar.h>
index 488ddd7..fa9bd50 100644 (file)
@@ -16,6 +16,8 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#define fdopen __fdopen
+
 #include <features.h>
 #include <stdio.h>
 #include <unistd.h>
index 512317c..8aa2c9a 100644 (file)
@@ -20,7 +20,7 @@
 #warning Skipping vasprintf since no vsnprintf!
 #else
 
-int vasprintf(char **__restrict buf, const char * __restrict format,
+int attribute_hidden __vasprintf(char **__restrict buf, const char * __restrict format,
                         va_list arg)
 {
 #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
@@ -73,6 +73,7 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
        return rv;
 
 #endif /* __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ */
+strong_alias(__vasprintf,vasprintf)
 }
 
 #endif
index de8362c..5628738 100644 (file)
@@ -8,7 +8,7 @@
 #include "_stdio.h"
 #include <stdarg.h>
 
-int vdprintf(int filedes, const char * __restrict format, va_list arg)
+int attribute_hidden __vdprintf(int filedes, const char * __restrict format, va_list arg)
 {
        FILE f;
        int rv;
@@ -60,3 +60,4 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg)
 
        return rv;
 }
+strong_alias(__vdprintf,vdprintf)
index a5839b7..d7dca5e 100644 (file)
@@ -13,7 +13,7 @@
 #warning Skipping vswprintf since no buffering!
 #else  /* __STDIO_BUFFERS */
 
-int vswprintf(wchar_t *__restrict buf, size_t size,
+int attribute_hidden __vswprintf(wchar_t *__restrict buf, size_t size,
                          const wchar_t * __restrict format, va_list arg)
 {
        FILE f;
@@ -66,5 +66,6 @@ int vswprintf(wchar_t *__restrict buf, size_t size,
        }
        return rv;
 }
+strong_alias(__vswprintf,vswprintf)
 
 #endif /* __STDIO_BUFFERS */