From 42c1ad48fa946f00d67d0b023f50e5d6d8fc293f Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Fri, 10 Mar 2006 16:20:23 +0000 Subject: Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, most of global data relocations are back --- libc/stdio/__fsetlocking.c | 3 --- libc/stdio/_fopen.c | 4 ---- libc/stdio/_fpmaxtostr.c | 3 --- libc/stdio/_scanf.c | 3 --- libc/stdio/_stdio.c | 11 ----------- libc/stdio/_stdio.h | 6 ------ libc/stdio/_uintmaxtostr.c | 3 --- libc/stdio/_vfprintf.c | 8 -------- libc/stdio/fflush.c | 1 - libc/stdio/gets.c | 4 +--- libc/stdio/perror.c | 1 - 11 files changed, 1 insertion(+), 46 deletions(-) (limited to 'libc/stdio') diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c index 746a098f9..2e8710076 100644 --- a/libc/stdio/__fsetlocking.c +++ b/libc/stdio/__fsetlocking.c @@ -9,9 +9,6 @@ #include libc_hidden_proto(__fsetlocking) -#ifdef __UCLIBC_HAS_THREADS__ -libc_hidden_proto(_stdio_user_locking) -#endif /* Not threadsafe. */ diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c index 4ca028275..02051eff9 100644 --- a/libc/stdio/_fopen.c +++ b/libc/stdio/_fopen.c @@ -11,10 +11,6 @@ libc_hidden_proto(isatty) libc_hidden_proto(open) libc_hidden_proto(fcntl) -#ifdef __UCLIBC_HAS_THREADS__ -libc_hidden_proto(_stdio_user_locking) -#endif - /* * Cases: * fopen64 : filename != NULL, stream == NULL, filedes == -2 diff --git a/libc/stdio/_fpmaxtostr.c b/libc/stdio/_fpmaxtostr.c index 9b87f64cf..f5632337d 100644 --- a/libc/stdio/_fpmaxtostr.c +++ b/libc/stdio/_fpmaxtostr.c @@ -12,9 +12,6 @@ #include libc_hidden_proto(memset) -#ifdef __UCLIBC_HAS_LOCALE__ -libc_hidden_proto(__global_locale) -#endif typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf); diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c index df78e7ad3..bbbcdcc17 100644 --- a/libc/stdio/_scanf.c +++ b/libc/stdio/_scanf.c @@ -101,9 +101,6 @@ libc_hidden_proto(fgetwc_unlocked) #ifdef __UCLIBC_HAS_XLOCALE__ libc_hidden_proto(__ctype_b_loc) #else -#ifdef __UCLIBC_HAS_LOCALE__ -libc_hidden_proto(__global_locale) -#endif libc_hidden_proto(__ctype_b) #endif diff --git a/libc/stdio/_stdio.c b/libc/stdio/_stdio.c index 63fc370dd..6c96d8660 100644 --- a/libc/stdio/_stdio.c +++ b/libc/stdio/_stdio.c @@ -125,19 +125,12 @@ static FILE _stdio_streams[] = { 0 ) }; -/* psm: moved to _stdio.h: libc_hidden_proto(stdin/stdout) */ FILE *stdin = _stdio_streams; -libc_hidden_data_def(stdin) FILE *stdout = _stdio_streams + 1; -libc_hidden_data_def(stdout) -libc_hidden_proto(stderr) FILE *stderr = _stdio_streams + 2; -libc_hidden_data_def(stderr) #ifdef __STDIO_GETC_MACRO -libc_hidden_proto(__stdin) FILE *__stdin = _stdio_streams; /* For getchar() macro. */ -libc_hidden_data_def(__stdin) #endif #ifdef __STDIO_PUTC_MACRO FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */ @@ -159,11 +152,9 @@ FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */ */ FILE *_stdio_openlist = _stdio_streams; -libc_hidden_data_def(_stdio_openlist) # ifdef __UCLIBC_HAS_THREADS__ pthread_mutex_t _stdio_openlist_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; -libc_hidden_data_def(_stdio_openlist_lock) int _stdio_openlist_delflag = 0; # endif @@ -172,9 +163,7 @@ int _stdio_openlist_delflag = 0; #ifdef __UCLIBC_HAS_THREADS__ /* 2 if threading not initialized and 0 otherwise; */ -libc_hidden_proto(_stdio_user_locking) int _stdio_user_locking = 2; -libc_hidden_data_def(_stdio_user_locking) void attribute_hidden __stdio_init_mutex(pthread_mutex_t *m) { diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h index 83d43352b..348f5ec5d 100644 --- a/libc/stdio/_stdio.h +++ b/libc/stdio/_stdio.h @@ -20,14 +20,8 @@ #include #endif -libc_hidden_proto(stdin) -libc_hidden_proto(stdout) - -libc_hidden_proto(_stdio_openlist) - #ifdef __UCLIBC_HAS_THREADS__ #include -libc_hidden_proto(_stdio_openlist_lock) #define __STDIO_THREADLOCK_OPENLIST \ __pthread_mutex_lock(&_stdio_openlist_lock) diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c index f9c83506e..4310d6458 100644 --- a/libc/stdio/_uintmaxtostr.c +++ b/libc/stdio/_uintmaxtostr.c @@ -12,9 +12,6 @@ #include libc_hidden_proto(memcpy) -#ifdef __UCLIBC_HAS_LOCALE__ -libc_hidden_proto(__global_locale) -#endif /* Avoid using long long / and % operations to cut down dependencies on * libgcc.a. Definitely helps on i386 at least. */ diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c index a32960f2e..d6965ca83 100644 --- a/libc/stdio/_vfprintf.c +++ b/libc/stdio/_vfprintf.c @@ -512,10 +512,6 @@ size_t parse_printf_format(register const char *template, /**********************************************************************/ #ifdef L__ppfs_init -#ifdef __UCLIBC_HAS_LOCALE__ -libc_hidden_proto(__global_locale) -#endif - int attribute_hidden _ppfs_init(register ppfs_t *ppfs, const char *fmt0) { int r; @@ -1254,10 +1250,6 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf #define _outnwcs(stream, wstring, len) _wstdio_fwrite(wstring, len, stream) #define FP_OUT _fp_out_wide -#ifdef __UCLIBC_HAS_LOCALE__ -libc_hidden_proto(__global_locale) -#endif - static size_t _outnstr(FILE *stream, const char *s, size_t wclen) { /* NOTE!!! len here is the number of wchars we want to generate!!! */ diff --git a/libc/stdio/fflush.c b/libc/stdio/fflush.c index a2e1cf916..c0f58d8af 100644 --- a/libc/stdio/fflush.c +++ b/libc/stdio/fflush.c @@ -16,7 +16,6 @@ libc_hidden_proto(fflush_unlocked) #endif /* __UCLIBC_MJN3_ONLY__ */ #ifdef __UCLIBC_HAS_THREADS__ -libc_hidden_proto(_stdio_user_locking) /* Even if the stream is set to user-locking, we still need to lock * when all (lbf) writing streams are flushed. */ #define MY_STDIO_THREADLOCK(STREAM) \ diff --git a/libc/stdio/gets.c b/libc/stdio/gets.c index 5ff7869dc..dc541339b 100644 --- a/libc/stdio/gets.c +++ b/libc/stdio/gets.c @@ -13,9 +13,7 @@ link_warning(gets, "the 'gets' function is dangerous and should not be used.") libc_hidden_proto(getchar_unlocked) libc_hidden_proto(__fgetc_unlocked) -#ifdef __STDIO_GETC_MACRO -libc_hidden_proto(__stdin) -#else +#ifndef __STDIO_GETC_MACRO #define __stdin stdin #endif diff --git a/libc/stdio/perror.c b/libc/stdio/perror.c index 2c3cbbdb5..993fcf428 100644 --- a/libc/stdio/perror.c +++ b/libc/stdio/perror.c @@ -9,7 +9,6 @@ libc_hidden_proto(fprintf) libc_hidden_proto(__glibc_strerror_r) -libc_hidden_proto(stderr) #ifdef __UCLIBC_MJN3_ONLY__ #warning CONSIDER: Increase buffer size for error message (non-%m case)? -- cgit v1.2.3