diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:45:53 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-12-06 03:45:53 +0000 |
| commit | 821e7539de6922c96e2a4fc5baa11fdc335072c9 (patch) | |
| tree | 8ee7f5ac1797850d304a3b10ff4a7ca4d4f2a2dc /libc/stdio | |
| parent | bd7bace793536f027790396d6358c14299e8595b (diff) | |
| download | uClibc-alpine-821e7539de6922c96e2a4fc5baa11fdc335072c9.tar.bz2 uClibc-alpine-821e7539de6922c96e2a4fc5baa11fdc335072c9.tar.xz | |
More merging from trunk.
Diffstat (limited to 'libc/stdio')
| -rw-r--r-- | libc/stdio/__fsetlocking.c | 4 | ||||
| -rw-r--r-- | libc/stdio/_stdio.h | 6 | ||||
| -rw-r--r-- | libc/stdio/_uintmaxtostr.c | 3 | ||||
| -rw-r--r-- | libc/stdio/fgetc.c | 12 | ||||
| -rw-r--r-- | libc/stdio/fgets.c | 4 | ||||
| -rw-r--r-- | libc/stdio/fputc.c | 12 | ||||
| -rw-r--r-- | libc/stdio/getdelim.c | 5 | ||||
| -rw-r--r-- | libc/stdio/getline.c | 7 | ||||
| -rw-r--r-- | libc/stdio/old_vfprintf.c | 1 | ||||
| -rw-r--r-- | libc/stdio/open_memstream.c | 3 | ||||
| -rw-r--r-- | libc/stdio/popen.c | 13 | ||||
| -rw-r--r-- | libc/stdio/puts.c | 4 | ||||
| -rw-r--r-- | libc/stdio/scanf.c | 1 | ||||
| -rw-r--r-- | libc/stdio/setbuf.c | 2 | ||||
| -rw-r--r-- | libc/stdio/setbuffer.c | 2 | ||||
| -rw-r--r-- | libc/stdio/setlinebuf.c | 2 | ||||
| -rw-r--r-- | libc/stdio/setvbuf.c | 3 | ||||
| -rw-r--r-- | libc/stdio/ungetc.c | 3 | ||||
| -rw-r--r-- | libc/stdio/vasprintf.c | 2 | ||||
| -rw-r--r-- | libc/stdio/vfprintf.c | 1 |
20 files changed, 45 insertions, 45 deletions
diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c index 77690e269..5b6070cc3 100644 --- a/libc/stdio/__fsetlocking.c +++ b/libc/stdio/__fsetlocking.c @@ -15,7 +15,7 @@ * glibc treats invalid locking_mode args as FSETLOCKING_INTERNAL. */ -int attribute_hidden __libc_fsetlocking(FILE *stream, int locking_mode) +int attribute_hidden __fsetlocking_internal(FILE *stream, int locking_mode) { #ifdef __UCLIBC_HAS_THREADS__ int current = 1 + (stream->__user_locking & 1); @@ -44,4 +44,4 @@ int attribute_hidden __libc_fsetlocking(FILE *stream, int locking_mode) #endif } -strong_alias(__libc_fsetlocking,__fsetlocking) +strong_alias(__fsetlocking_internal,__fsetlocking) diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h index fdab8b8dc..858f2716b 100644 --- a/libc/stdio/_stdio.h +++ b/libc/stdio/_stdio.h @@ -273,6 +273,8 @@ extern int __stdio_trans2w(FILE *__restrict stream) attribute_hidden; extern int __stdio_trans2r_o(FILE *__restrict stream, int oflag) attribute_hidden; extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidden; +extern int __setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __THROW attribute_hidden; /**********************************************************************/ #ifdef __STDIO_BUFFERS @@ -371,7 +373,7 @@ extern size_t __fwrite_unlocked(const void *__restrict ptr, size_t size, extern size_t __fread_unlocked(void *__restrict ptr, size_t size, size_t nmemb, FILE *__restrict stream) attribute_hidden; -extern int __libc_fputc_unlocked(int c, FILE *stream) attribute_hidden; +extern int __fputc_unlocked_internal(int c, FILE *stream) attribute_hidden; extern int __fflush_unlocked(FILE *stream) attribute_hidden; @@ -381,7 +383,7 @@ extern void __clearerr_unlocked(FILE *stream); extern int __feof_unlocked(FILE *stream); extern int __ferror_unlocked(FILE *stream); -extern int __libc_fgetc_unlocked(FILE *stream) attribute_hidden; +extern int __fgetc_unlocked_internal(FILE *stream) attribute_hidden; extern char *__fgets_unlocked(char *__restrict s, int n, FILE * __restrict stream) attribute_hidden; diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c index 847d23560..bf92506d5 100644 --- a/libc/stdio/_uintmaxtostr.c +++ b/libc/stdio/_uintmaxtostr.c @@ -17,7 +17,7 @@ #define INTERNAL_DIV_MOD #endif -char attribute_hidden *__libc__uintmaxtostr(register char * __restrict bufend, uintmax_t uval, +char attribute_hidden *_uintmaxtostr(register char * __restrict bufend, uintmax_t uval, int base, __UIM_CASE alphacase) { int negative; @@ -149,4 +149,3 @@ char attribute_hidden *__libc__uintmaxtostr(register char * __restrict bufend, u return bufend; } -strong_alias(__libc__uintmaxtostr,_uintmaxtostr) diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index 78fca8422..be9322714 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int attribute_hidden __libc_fgetc_unlocked(FILE *stream) +int attribute_hidden __fgetc_unlocked_internal(FILE *stream) { __STDIO_STREAM_VALIDATE(stream); @@ -69,12 +69,12 @@ int attribute_hidden __libc_fgetc_unlocked(FILE *stream) return EOF; } -strong_alias(__libc_fgetc_unlocked,__fgetc_unlocked) -weak_alias(__fgetc_unlocked,fgetc_unlocked) -weak_alias(__fgetc_unlocked,getc_unlocked) +strong_alias(__fgetc_unlocked_internal,__fgetc_unlocked) +weak_alias(__fgetc_unlocked_internal,fgetc_unlocked) +weak_alias(__fgetc_unlocked_internal,getc_unlocked) #ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fgetc_unlocked,fgetc) -weak_alias(__fgetc_unlocked,getc) +weak_alias(__fgetc_unlocked_internal,fgetc) +weak_alias(__fgetc_unlocked_internal,getc) #endif #elif defined __UCLIBC_HAS_THREADS__ diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c index 743a2ea54..52c856f35 100644 --- a/libc/stdio/fgets.c +++ b/libc/stdio/fgets.c @@ -5,8 +5,6 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define __fgetc_unlocked __libc_fgetc_unlocked - #include "_stdio.h" #ifdef __DO_UNLOCKED @@ -36,7 +34,7 @@ char attribute_hidden *__fgets_unlocked(char *__restrict s, int n, break; } } else { - if ((c = __fgetc_unlocked(stream)) == EOF) { + if ((c = __fgetc_unlocked_internal(stream)) == EOF) { if (__FERROR_UNLOCKED(stream)) { goto ERROR; } diff --git a/libc/stdio/fputc.c b/libc/stdio/fputc.c index 46ebb163c..b319263a1 100644 --- a/libc/stdio/fputc.c +++ b/libc/stdio/fputc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int attribute_hidden __libc_fputc_unlocked(int c, register FILE *stream) +int attribute_hidden __fputc_unlocked_internal(int c, register FILE *stream) { __STDIO_STREAM_VALIDATE(stream); @@ -69,12 +69,12 @@ int attribute_hidden __libc_fputc_unlocked(int c, register FILE *stream) return EOF; } -strong_alias(__libc_fputc_unlocked,__fputc_unlocked) -weak_alias(__fputc_unlocked,fputc_unlocked) -weak_alias(__fputc_unlocked,putc_unlocked) +strong_alias(__fputc_unlocked_internal,__fputc_unlocked) +weak_alias(__fputc_unlocked_internal,fputc_unlocked) +weak_alias(__fputc_unlocked_internal,putc_unlocked) #ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fputc_unlocked,fputc) -weak_alias(__fputc_unlocked,putc) +weak_alias(__fputc_unlocked_internal,fputc) +weak_alias(__fputc_unlocked_internal,putc) #endif #elif defined __UCLIBC_HAS_THREADS__ diff --git a/libc/stdio/getdelim.c b/libc/stdio/getdelim.c index f21b16062..e1b808340 100644 --- a/libc/stdio/getdelim.c +++ b/libc/stdio/getdelim.c @@ -20,7 +20,7 @@ #define GETDELIM_GROWBY 64 -ssize_t attribute_hidden __libc_getdelim(char **__restrict lineptr, size_t *__restrict n, +ssize_t attribute_hidden __getdelim(char **__restrict lineptr, size_t *__restrict n, int delimiter, register FILE *__restrict stream) { register char *buf; @@ -74,5 +74,4 @@ ssize_t attribute_hidden __libc_getdelim(char **__restrict lineptr, size_t *__re return pos; } -strong_alias(__libc_getdelim,__getdelim) -weak_alias(__getdelim,getdelim) +strong_alias(__getdelim,getdelim) diff --git a/libc/stdio/getline.c b/libc/stdio/getline.c index 7424dc024..943526abe 100644 --- a/libc/stdio/getline.c +++ b/libc/stdio/getline.c @@ -5,12 +5,13 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define __getdelim __libc_getdelim +#define getdelim __getdelim #include "_stdio.h" -ssize_t getline(char **__restrict lineptr, size_t *__restrict n, +ssize_t attribute_hidden __getline(char **__restrict lineptr, size_t *__restrict n, FILE *__restrict stream) { - return __getdelim(lineptr, n, '\n', stream); + return getdelim(lineptr, n, '\n', stream); } +strong_alias(__getline,getline) diff --git a/libc/stdio/old_vfprintf.c b/libc/stdio/old_vfprintf.c index abf535a16..aafc4a1ed 100644 --- a/libc/stdio/old_vfprintf.c +++ b/libc/stdio/old_vfprintf.c @@ -127,7 +127,6 @@ /**************************************************************************/ -#define _uintmaxtostr __libc__uintmaxtostr #define strnlen __strnlen #define _ISOC99_SOURCE /* for ULLONG primarily... */ diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c index 358486010..5799005d9 100644 --- a/libc/stdio/open_memstream.c +++ b/libc/stdio/open_memstream.c @@ -124,7 +124,7 @@ static const cookie_io_functions_t _oms_io_funcs = { * (ie replace the FILE buffer with the cookie buffer and update FILE bufstart, * etc. whenever we seek). */ -FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc) +FILE attribute_hidden *__open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc) { register __oms_cookie *cookie; register FILE *fp; @@ -160,3 +160,4 @@ FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc) return NULL; } +strong_alias(__open_memstream,open_memstream) diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c index 6de09253c..2e9985a39 100644 --- a/libc/stdio/popen.c +++ b/libc/stdio/popen.c @@ -14,6 +14,8 @@ * Fix failure exit code for failed execve(). */ +#define waitpid __waitpid +#define execl __execl #include <stdio.h> #include <stdlib.h> @@ -30,14 +32,11 @@ #endif #ifdef __UCLIBC_HAS_THREADS__ -#include <pthread.h> +# include <pthread.h> static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER; -# define LOCK __pthread_mutex_lock(&mylock) -# define UNLOCK __pthread_mutex_unlock(&mylock); -#else -# define LOCK ((void) 0) -# define UNLOCK ((void) 0) -#endif +#endif +#define LOCK __pthread_mutex_lock(&mylock) +#define UNLOCK __pthread_mutex_unlock(&mylock) #ifndef VFORK_LOCK # define VFORK_LOCK LOCK diff --git a/libc/stdio/puts.c b/libc/stdio/puts.c index 37ae243bf..3a510325b 100644 --- a/libc/stdio/puts.c +++ b/libc/stdio/puts.c @@ -5,8 +5,6 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define __fputc_unlocked __libc_fputc_unlocked - #include "_stdio.h" int puts(register const char * __restrict s) @@ -24,7 +22,7 @@ int puts(register const char * __restrict s) /* Note: Nonportable as fputs need only return nonnegative on success. */ if ((n = __fputs_unlocked(s, stream)) != EOF) { ++n; - if (__fputc_unlocked('\n', stream) == EOF) { + if (__fputc_unlocked_internal('\n', stream) == EOF) { n = EOF; } } diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 1d6522417..98db1c3ac 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -46,6 +46,7 @@ #define wcslen __wcslen #define mbsrtowcs __mbsrtowcs #define mbrtowc __mbrtowc +#define ungetc __ungetc #define _ISOC99_SOURCE /* for LLONG_MAX primarily... */ #define _GNU_SOURCE diff --git a/libc/stdio/setbuf.c b/libc/stdio/setbuf.c index 21158638b..02a4736ac 100644 --- a/libc/stdio/setbuf.c +++ b/libc/stdio/setbuf.c @@ -10,6 +10,6 @@ void setbuf(FILE * __restrict stream, register char * __restrict buf) { #ifdef __STDIO_BUFFERS - setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ); + __setvbuf(stream, buf, ((buf != NULL) ? _IOFBF : _IONBF), BUFSIZ); #endif } diff --git a/libc/stdio/setbuffer.c b/libc/stdio/setbuffer.c index ccd4d275e..d1f12a1af 100644 --- a/libc/stdio/setbuffer.c +++ b/libc/stdio/setbuffer.c @@ -16,6 +16,6 @@ void setbuffer(FILE * __restrict stream, register char * __restrict buf, size_t size) { #ifdef __STDIO_BUFFERS - setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size); + __setvbuf(stream, buf, (buf ? _IOFBF : _IONBF), size); #endif } diff --git a/libc/stdio/setlinebuf.c b/libc/stdio/setlinebuf.c index 6147fa8f4..56e89e11b 100644 --- a/libc/stdio/setlinebuf.c +++ b/libc/stdio/setlinebuf.c @@ -15,6 +15,6 @@ void setlinebuf(FILE * __restrict stream) { #ifdef __STDIO_BUFFERS - setvbuf(stream, NULL, _IOLBF, (size_t) 0); + __setvbuf(stream, NULL, _IOLBF, (size_t) 0); #endif } diff --git a/libc/stdio/setvbuf.c b/libc/stdio/setvbuf.c index 3fe62c6a8..d12d1576a 100644 --- a/libc/stdio/setvbuf.c +++ b/libc/stdio/setvbuf.c @@ -14,7 +14,7 @@ #error Assumption violated for buffering mode flags #endif -int setvbuf(register FILE * __restrict stream, register char * __restrict buf, +int attribute_hidden __setvbuf(register FILE * __restrict stream, register char * __restrict buf, int mode, size_t size) { #ifdef __STDIO_BUFFERS @@ -104,3 +104,4 @@ int setvbuf(register FILE * __restrict stream, register char * __restrict buf, #endif } +strong_alias(__setvbuf,setvbuf) diff --git a/libc/stdio/ungetc.c b/libc/stdio/ungetc.c index 1b9197a18..de3f1d16b 100644 --- a/libc/stdio/ungetc.c +++ b/libc/stdio/ungetc.c @@ -24,7 +24,7 @@ * (See section 7.19.6.2 of the C9X rationale -- WG14/N897.) */ -int ungetc(int c, register FILE *stream) +int attribute_hidden __ungetc(int c, register FILE *stream) { __STDIO_AUTO_THREADLOCK_VAR; @@ -75,3 +75,4 @@ int ungetc(int c, register FILE *stream) return c; } +strong_alias(__ungetc,ungetc) diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c index 688ab7cd5..512317c51 100644 --- a/libc/stdio/vasprintf.c +++ b/libc/stdio/vasprintf.c @@ -5,6 +5,8 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ +#define open_memstream __open_memstream + #include "_stdio.h" #include <stdarg.h> #include <bits/uClibc_va_copy.h> diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c index 4675dacc2..e3f389a6b 100644 --- a/libc/stdio/vfprintf.c +++ b/libc/stdio/vfprintf.c @@ -88,7 +88,6 @@ * treats this as an error. */ -#define _uintmaxtostr __libc__uintmaxtostr #define strnlen __strnlen #define wcslen __wcslen #define wcsnlen __wcsnlen |
