diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-21 18:32:07 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-21 18:32:07 +0000 |
commit | 25fbf2080e743bc6ddd3674789d8836b185cb924 (patch) | |
tree | 5ac0343276c82ae209a3373d236be052e6d98bb4 /libc | |
parent | b27c9f65148e96c01cafe37490d054bdeded5f2a (diff) |
Hide some
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdio/_stdio.h | 30 | ||||
-rw-r--r-- | libc/stdio/_wfwrite.c | 2 | ||||
-rw-r--r-- | libc/stdio/fflush.c | 2 | ||||
-rw-r--r-- | libc/stdio/fgetc.c | 2 | ||||
-rw-r--r-- | libc/stdio/fgetpos.c | 8 | ||||
-rw-r--r-- | libc/stdio/fgetpos64.c | 2 | ||||
-rw-r--r-- | libc/stdio/fgets.c | 2 | ||||
-rw-r--r-- | libc/stdio/fgetwc.c | 2 | ||||
-rw-r--r-- | libc/stdio/fgetws.c | 4 | ||||
-rw-r--r-- | libc/stdio/fileno.c | 2 | ||||
-rw-r--r-- | libc/stdio/fputc.c | 2 | ||||
-rw-r--r-- | libc/stdio/fputs.c | 2 | ||||
-rw-r--r-- | libc/stdio/fputwc.c | 2 | ||||
-rw-r--r-- | libc/stdio/fputws.c | 8 | ||||
-rw-r--r-- | libc/stdio/fread.c | 2 | ||||
-rw-r--r-- | libc/stdio/fseeko.c | 9 | ||||
-rw-r--r-- | libc/stdio/ftello.c | 9 | ||||
-rw-r--r-- | libc/stdio/fwrite.c | 2 | ||||
-rw-r--r-- | libc/stdio/getchar.c | 2 | ||||
-rw-r--r-- | libc/stdio/scanf.c | 4 |
20 files changed, 53 insertions, 45 deletions
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h index 22caaa0ef..b8b99b26f 100644 --- a/libc/stdio/_stdio.h +++ b/libc/stdio/_stdio.h @@ -347,20 +347,20 @@ extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidde #endif /* __STDIO_BUFFERS */ /**********************************************************************/ -extern int __fputs_unlocked(const char *__restrict s, FILE *__restrict stream); +extern int __fputs_unlocked(const char *__restrict s, FILE *__restrict stream) attribute_hidden; extern int __putchar_unlocked(int c); extern size_t __fwrite_unlocked(const void *__restrict ptr, size_t size, - size_t nmemb, FILE *__restrict stream); + size_t nmemb, FILE *__restrict stream) attribute_hidden; extern size_t __fread_unlocked(void *__restrict ptr, size_t size, - size_t nmemb, FILE *__restrict stream); + size_t nmemb, FILE *__restrict stream) attribute_hidden; -extern int __fputc_unlocked(int c, FILE *stream); +extern int __fputc_unlocked(int c, FILE *stream) attribute_hidden; -extern int __fflush_unlocked(FILE *stream); +extern int __fflush_unlocked(FILE *stream) attribute_hidden; extern int __stdio_adjust_position(FILE *__restrict stream, __offmax_t *pos) attribute_hidden; @@ -368,17 +368,19 @@ extern void __clearerr_unlocked(FILE *stream); extern int __feof_unlocked(FILE *stream); extern int __ferror_unlocked(FILE *stream); -extern int __fgetc_unlocked(FILE *stream); +extern int __fgetc_unlocked(FILE *stream) attribute_hidden; extern char *__fgets_unlocked(char *__restrict s, int n, - FILE * __restrict stream); + FILE * __restrict stream) attribute_hidden; -extern int __fileno_unlocked(FILE *stream); +extern int __fileno_unlocked(FILE *stream) attribute_hidden; -extern int __getchar_unlocked(void); +extern int __getchar_unlocked(void) attribute_hidden; +extern int __fseek(FILE *stream, long int offset, int whence) attribute_hidden; +extern long int __ftell(FILE *stream) attribute_hidden; #ifdef __UCLIBC_HAS_LFS__ -extern int __fseeko64(FILE *stream, __off64_t offset, int whence); -extern __off64_t __ftello64(FILE *stream); +extern int __fseeko64(FILE *stream, __off64_t offset, int whence) attribute_hidden; +extern __off64_t __ftello64(FILE *stream) attribute_hidden; #endif #ifdef __STDIO_HAS_OPENLIST @@ -420,10 +422,10 @@ extern FILE *_stdio_fopen(intptr_t fname_or_mode, #ifdef __UCLIBC_HAS_WCHAR__ extern size_t _wstdio_fwrite(const wchar_t *__restrict ws, size_t n, - FILE *__restrict stream); + FILE *__restrict stream) attribute_hidden; -extern wint_t __fgetwc_unlocked(register FILE *stream); -extern wint_t __fputwc_unlocked(wchar_t wc, FILE *stream); +extern wint_t __fgetwc_unlocked(register FILE *stream) attribute_hidden; +extern wint_t __fputwc_unlocked(wchar_t wc, FILE *stream) attribute_hidden; #endif /**********************************************************************/ diff --git a/libc/stdio/_wfwrite.c b/libc/stdio/_wfwrite.c index 8f9469162..a31622bf8 100644 --- a/libc/stdio/_wfwrite.c +++ b/libc/stdio/_wfwrite.c @@ -19,7 +19,7 @@ extern size_t __wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, size_t NWC, size_t len, mbstate_t *__restrict ps); -size_t _wstdio_fwrite(const wchar_t *__restrict ws, size_t n, +size_t attribute_hidden _wstdio_fwrite(const wchar_t *__restrict ws, size_t n, register FILE *__restrict stream) { size_t r, count; diff --git a/libc/stdio/fflush.c b/libc/stdio/fflush.c index fa50db15a..b4226d0f1 100644 --- a/libc/stdio/fflush.c +++ b/libc/stdio/fflush.c @@ -31,7 +31,7 @@ #endif -int __fflush_unlocked(register FILE *stream) +int attribute_hidden __fflush_unlocked(register FILE *stream) { #ifdef __STDIO_BUFFERS diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index c68c1fdb5..3df25c39a 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int __fgetc_unlocked(FILE *stream) +int attribute_hidden __fgetc_unlocked(FILE *stream) { __STDIO_STREAM_VALIDATE(stream); diff --git a/libc/stdio/fgetpos.c b/libc/stdio/fgetpos.c index 84cf0b98c..03c18ab93 100644 --- a/libc/stdio/fgetpos.c +++ b/libc/stdio/fgetpos.c @@ -7,6 +7,10 @@ #include "_stdio.h" +#ifndef __DO_LARGEFILE +#define FTELL __ftell +#endif + int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos) { #ifdef __STDIO_MBSTATE @@ -16,7 +20,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos) __STDIO_AUTO_THREADLOCK(stream); - if ((pos->__pos = ftell(stream)) >= 0) { + if ((pos->__pos = FTELL(stream)) >= 0) { __COPY_MBSTATE(&(pos->__mbstate), &(stream->__state)); pos->__mblen_pending = stream->__ungot_width[0]; retval = 0; @@ -28,7 +32,7 @@ int fgetpos(FILE * __restrict stream, register fpos_t * __restrict pos) #else - return ((pos->__pos = ftell(stream)) >= 0) ? 0 : -1; + return ((pos->__pos = FTELL(stream)) >= 0) ? 0 : -1; #endif } diff --git a/libc/stdio/fgetpos64.c b/libc/stdio/fgetpos64.c index f86c332f1..6368bbe07 100644 --- a/libc/stdio/fgetpos64.c +++ b/libc/stdio/fgetpos64.c @@ -10,5 +10,5 @@ #define __DO_LARGEFILE #define fgetpos fgetpos64 #define fpos_t fpos64_t -#define ftell ftello64 +#define FTELL __ftello64 #include "fgetpos.c" diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c index 4b32ad612..345ccf512 100644 --- a/libc/stdio/fgets.c +++ b/libc/stdio/fgets.c @@ -9,7 +9,7 @@ #ifdef __DO_UNLOCKED -char *__fgets_unlocked(char *__restrict s, int n, +char attribute_hidden *__fgets_unlocked(char *__restrict s, int n, register FILE * __restrict stream) { register char *p; diff --git a/libc/stdio/fgetwc.c b/libc/stdio/fgetwc.c index a78f52212..560c4ed73 100644 --- a/libc/stdio/fgetwc.c +++ b/libc/stdio/fgetwc.c @@ -17,7 +17,7 @@ static void munge_stream(register FILE *stream, unsigned char *buf) __STDIO_STREAM_DISABLE_PUTC(stream); } -wint_t __fgetwc_unlocked(register FILE *stream) +wint_t attribute_hidden __fgetwc_unlocked(register FILE *stream) { wint_t wi; wchar_t wc[1]; diff --git a/libc/stdio/fgetws.c b/libc/stdio/fgetws.c index 16f8873b3..e31ea3c41 100644 --- a/libc/stdio/fgetws.c +++ b/libc/stdio/fgetws.c @@ -8,11 +8,11 @@ #include "_stdio.h" extern wchar_t *__fgetws_unlocked(wchar_t *__restrict ws, int n, - FILE *__restrict stream); + FILE *__restrict stream) attribute_hidden; #ifdef __DO_UNLOCKED -wchar_t *__fgetws_unlocked(wchar_t *__restrict ws, int n, +wchar_t attribute_hidden *__fgetws_unlocked(wchar_t *__restrict ws, int n, FILE *__restrict stream) { register wchar_t *p = ws; diff --git a/libc/stdio/fileno.c b/libc/stdio/fileno.c index 30ae90ad3..4ea21d748 100644 --- a/libc/stdio/fileno.c +++ b/libc/stdio/fileno.c @@ -9,7 +9,7 @@ #ifdef __DO_UNLOCKED -int __fileno_unlocked(register FILE *stream) +int attribute_hidden __fileno_unlocked(register FILE *stream) { __STDIO_STREAM_VALIDATE(stream); diff --git a/libc/stdio/fputc.c b/libc/stdio/fputc.c index ad3c95517..82215f465 100644 --- a/libc/stdio/fputc.c +++ b/libc/stdio/fputc.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int __fputc_unlocked(int c, register FILE *stream) +int attribute_hidden __fputc_unlocked(int c, register FILE *stream) { __STDIO_STREAM_VALIDATE(stream); diff --git a/libc/stdio/fputs.c b/libc/stdio/fputs.c index e4d10659f..4a4d8e480 100644 --- a/libc/stdio/fputs.c +++ b/libc/stdio/fputs.c @@ -14,7 +14,7 @@ #ifdef __DO_UNLOCKED -int __fputs_unlocked(register const char * __restrict s, +int attribute_hidden __fputs_unlocked(register const char * __restrict s, FILE * __restrict stream) { size_t n = strlen(s); diff --git a/libc/stdio/fputwc.c b/libc/stdio/fputwc.c index ef7a6d627..dbea948dc 100644 --- a/libc/stdio/fputwc.c +++ b/libc/stdio/fputwc.c @@ -9,7 +9,7 @@ #ifdef __DO_UNLOCKED -wint_t __fputwc_unlocked(wchar_t wc, FILE *stream) +wint_t attribute_hidden __fputwc_unlocked(wchar_t wc, FILE *stream) { return _wstdio_fwrite(&wc, 1, stream) ? wc : WEOF; } diff --git a/libc/stdio/fputws.c b/libc/stdio/fputws.c index f3270fde8..aa5a514cb 100644 --- a/libc/stdio/fputws.c +++ b/libc/stdio/fputws.c @@ -8,11 +8,11 @@ #include "_stdio.h" extern int __fputws_unlocked(const wchar_t *__restrict ws, - FILE *__restrict stream); + FILE *__restrict stream) attribute_hidden; #ifdef __DO_UNLOCKED -int __fputws_unlocked(const wchar_t *__restrict ws, +int attribute_hidden __fputws_unlocked(const wchar_t *__restrict ws, register FILE *__restrict stream) { size_t n = wcslen(ws); @@ -20,9 +20,9 @@ int __fputws_unlocked(const wchar_t *__restrict ws, return (_wstdio_fwrite(ws, n, stream) == n) ? 0 : -1; } -weak_alias(__fputws_unlocked,fputws_unlocked); +weak_alias(__fputws_unlocked,fputws_unlocked) #ifndef __UCLIBC_HAS_THREADS__ -weak_alias(__fputws_unlocked,fputws); +weak_alias(__fputws_unlocked,fputws) #endif #elif defined __UCLIBC_HAS_THREADS__ diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c index 73414e26c..10ae37418 100644 --- a/libc/stdio/fread.c +++ b/libc/stdio/fread.c @@ -9,7 +9,7 @@ #ifdef __DO_UNLOCKED -size_t __fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb, +size_t attribute_hidden __fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb, FILE * __restrict stream) { __STDIO_STREAM_VALIDATE(stream); diff --git a/libc/stdio/fseeko.c b/libc/stdio/fseeko.c index 3fa15050d..c795356e7 100644 --- a/libc/stdio/fseeko.c +++ b/libc/stdio/fseeko.c @@ -12,11 +12,11 @@ #endif #ifndef __DO_LARGEFILE -# define FSEEK fseek +# define FSEEK __fseek # define OFFSET_TYPE long int #endif -int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence) +int attribute_hidden FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence) { #if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE) @@ -74,7 +74,8 @@ int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence) } #ifdef __DO_LARGEFILE -weak_alias(__fseeko64,fseeko64); +weak_alias(__fseeko64,fseeko64) #else -weak_alias(fseek,fseeko); +weak_alias(__fseek,fseek) +weak_alias(fseek,fseeko) #endif diff --git a/libc/stdio/ftello.c b/libc/stdio/ftello.c index 4a934db2b..7f5c53126 100644 --- a/libc/stdio/ftello.c +++ b/libc/stdio/ftello.c @@ -8,11 +8,11 @@ #include "_stdio.h" #ifndef __DO_LARGEFILE -# define FTELL ftell +# define FTELL __ftell # define OFFSET_TYPE long int #endif -OFFSET_TYPE FTELL(register FILE *stream) +OFFSET_TYPE attribute_hidden FTELL(register FILE *stream) { #if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE) @@ -47,7 +47,8 @@ OFFSET_TYPE FTELL(register FILE *stream) } #ifdef __DO_LARGEFILE -weak_alias(__ftello64,ftello64); +weak_alias(__ftello64,ftello64) #else -weak_alias(ftell,ftello); +weak_alias(__ftell,ftell) +weak_alias(ftell,ftello) #endif diff --git a/libc/stdio/fwrite.c b/libc/stdio/fwrite.c index 7bb0a8022..50af8f7a5 100644 --- a/libc/stdio/fwrite.c +++ b/libc/stdio/fwrite.c @@ -9,7 +9,7 @@ #ifdef __DO_UNLOCKED -size_t __fwrite_unlocked(const void * __restrict ptr, size_t size, +size_t attribute_hidden __fwrite_unlocked(const void * __restrict ptr, size_t size, size_t nmemb, register FILE * __restrict stream) { __STDIO_STREAM_VALIDATE(stream); diff --git a/libc/stdio/getchar.c b/libc/stdio/getchar.c index 902cec16e..ec578919b 100644 --- a/libc/stdio/getchar.c +++ b/libc/stdio/getchar.c @@ -12,7 +12,7 @@ #ifdef __DO_UNLOCKED -int __getchar_unlocked(void) +int attribute_hidden __getchar_unlocked(void) { register FILE *stream = stdin; diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 5b932063c..80a8821e7 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -1015,7 +1015,7 @@ static int sc_getc(register struct scan_cookie *sc) sc->fp->__modeflags |= __FLAG_EOF; return EOF; } - } else if ((wc = fgetwc_unlocked(sc->fp)) == WEOF) { + } else if ((wc = __fgetwc_unlocked(sc->fp)) == WEOF) { return EOF; } @@ -1061,7 +1061,7 @@ static int scan_getwc(register struct scan_cookie *sc) sc->ungot_flag |= 2; return -1; } - } else if ((wc = fgetwc_unlocked(sc->fp)) == WEOF) { + } else if ((wc = __fgetwc_unlocked(sc->fp)) == WEOF) { sc->ungot_flag |= 2; return -1; } |