OSDN Git Service

Remove __PRINTF_INFO_NO_BITFIELD hack, UCLIBC_INTERNAL can be used instead,
[uclinux-h8/uClibc.git] / libc / stdio / old_vfprintf.c
index 8caa3d6..85a0967 100644 (file)
 /**************************************************************************/
 
 #define _ISOC99_SOURCE                 /* for ULLONG primarily... */
-#define _GNU_SOURCE                            /* for strnlen */
 #include "_stdio.h"
 /* #include <stdio.h> */
 #include <stdarg.h>
 #include <errno.h>
 #include <ctype.h>
 #include <bits/uClibc_uintmaxtostr.h>
-
-#define __PRINTF_INFO_NO_BITFIELD
 #include <printf.h>
 
 #ifdef __UCLIBC_HAS_THREADS__
 #include <pthread.h>
 #endif /* __UCLIBC_HAS_THREADS__ */
 
+/* Experimentally off - libc_hidden_proto(strlen) */
+/* Experimentally off - libc_hidden_proto(strnlen) */
+/* Experimentally off - libc_hidden_proto(memcpy) */
+libc_hidden_proto(putc_unlocked)
+libc_hidden_proto(__fputc_unlocked)
+libc_hidden_proto(__glibc_strerror_r)
+
 /*  #undef __UCLIBC_HAS_FLOATS__ */
 /*  #undef WANT_FLOAT_ERROR */
 /*  #define WANT_FLOAT_ERROR      1 */
@@ -339,6 +343,7 @@ static const char u_spec[] = "%nbopxXudics";
 /* u_radix[i] <-> u_spec[i+2] for unsigned entries only */
 static const char u_radix[] = "\x02\x08\x10\x10\x10\x0a";
 
+libc_hidden_proto(vfprintf)
 int vfprintf(FILE * __restrict op, register const char * __restrict fmt,
                         va_list ap)
 {
@@ -352,13 +357,13 @@ int vfprintf(FILE * __restrict op, register const char * __restrict fmt,
                int i;
        } intarg;
        int i, cnt, dataargtype, len;
-       const void *argptr;                     /* This does not need to be initialized. */
+       const void *argptr = argptr; /* ok to be initialized. */
        register char *p;
        const char *fmt0;
        int preci, width;
 #define upcase i
        int radix, dpoint /*, upcase*/;
-       char tmp[65];                           /* TODO - determing needed size from headers */
+       char tmp[65];           /* TODO - determine needed size from headers */
        char flag[sizeof(spec)];
        __STDIO_AUTO_THREADLOCK_VAR;
 
@@ -709,3 +714,4 @@ int vfprintf(FILE * __restrict op, register const char * __restrict fmt,
 
        return i;
 }
+libc_hidden_def(vfprintf)