OSDN Git Service

global data uses libc_hidden_data_def, convert all -I hope- and add some new
authorPeter S. Mazinger <ps.m@gmx.net>
Wed, 1 Feb 2006 09:22:45 +0000 (09:22 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Wed, 1 Feb 2006 09:22:45 +0000 (09:22 -0000)
17 files changed:
libc/inet/in6_addr.c
libc/inet/resolv.c
libc/misc/ctype/ctype.c
libc/misc/error/error.c
libc/misc/gnu/obstack.c
libc/misc/internals/__uClibc_main.c
libc/misc/locale/locale.c
libc/misc/time/time.c
libc/misc/wchar/wchar.c
libc/stdio/__fsetlocking.c
libc/stdio/_fopen.c
libc/stdio/_stdio.c
libc/stdio/_stdio.h
libc/stdio/fflush.c
libc/stdlib/atexit.c
libc/unistd/getopt.c
libm/s_lib_version.c

index a5303da..c2ab375 100644 (file)
 #ifdef __UCLIBC_HAS_IPV6__
 const struct in6_addr in6addr_any =
 { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
-//libc_hidden_proto(in6addr_any)
-//libc_hidden_def(in6addr_any)
 libc_hidden_proto(in6addr_loopback)
 const struct in6_addr in6addr_loopback =
 { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
-libc_hidden_def(in6addr_loopback)
+libc_hidden_data_def(in6addr_loopback)
 #endif /* __UCLIBC_HAS_IPV6__ */
 
 
index 885413d..9b9a42a 100644 (file)
@@ -237,6 +237,7 @@ extern char * __searchdomain[MAX_SEARCH] attribute_hidden;
 #ifdef __UCLIBC_HAS_THREADS__
 # include <pthread.h>
 extern pthread_mutex_t __resolv_lock;
+libc_hidden_proto(__resolv_lock)
 #endif
 #define BIGLOCK        __pthread_mutex_lock(&__resolv_lock)
 #define BIGUNLOCK      __pthread_mutex_unlock(&__resolv_lock)
@@ -1021,6 +1022,7 @@ char * __searchdomain[MAX_SEARCH];
 #ifdef __UCLIBC_HAS_THREADS__
 # include <pthread.h>
 pthread_mutex_t __resolv_lock = PTHREAD_MUTEX_INITIALIZER;
+libc_hidden_data_def(__resolv_lock)
 #endif
 
 /*
index d470a2e..6f71b14 100644 (file)
@@ -856,16 +856,16 @@ const __ctype_mask_t __C_ctype_b_data[] = {
        /*  254  M-~  */ 0,
        /*  255  M-^? */ 0
 };
-libc_hidden_def(__C_ctype_b_data)
+libc_hidden_data_def(__C_ctype_b_data)
 
 libc_hidden_proto(__C_ctype_b)
 const __ctype_mask_t *__C_ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
-libc_hidden_def(__C_ctype_b)
+libc_hidden_data_def(__C_ctype_b)
 
 #ifndef __UCLIBC_HAS_XLOCALE__
 
 const __ctype_mask_t *__ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
-libc_hidden_def(__ctype_b)
+libc_hidden_data_def(__ctype_b)
 
 #endif
 
@@ -975,19 +975,19 @@ const __ctype_touplow_t __C_ctype_tolower_data[] = {
         248,          249,          250,          251,
         252,          253,          254,          255
 };
-libc_hidden_def(__C_ctype_tolower_data)
+libc_hidden_data_def(__C_ctype_tolower_data)
 
 libc_hidden_proto(__C_ctype_tolower)
 const __ctype_touplow_t *__C_ctype_tolower = __C_ctype_tolower_data
                                                                                        + __UCLIBC_CTYPE_TO_TBL_OFFSET;
-libc_hidden_def(__C_ctype_tolower)
+libc_hidden_data_def(__C_ctype_tolower)
 
 #ifndef __UCLIBC_HAS_XLOCALE__
 
 libc_hidden_proto(__ctype_tolower)
 const __ctype_touplow_t *__ctype_tolower = __C_ctype_tolower_data
                                                                                        + __UCLIBC_CTYPE_TO_TBL_OFFSET;
-libc_hidden_def(__ctype_tolower)
+libc_hidden_data_def(__ctype_tolower)
 
 #endif
 
@@ -1097,19 +1097,19 @@ const __ctype_touplow_t __C_ctype_toupper_data[] = {
         248,          249,          250,          251,
         252,          253,          254,          255
 };
-libc_hidden_def(__C_ctype_toupper_data)
+libc_hidden_data_def(__C_ctype_toupper_data)
 
 libc_hidden_proto(__C_ctype_toupper)
 const __ctype_touplow_t *__C_ctype_toupper = __C_ctype_toupper_data
                                                                                        + __UCLIBC_CTYPE_TO_TBL_OFFSET;
-libc_hidden_def(__C_ctype_toupper)
+libc_hidden_data_def(__C_ctype_toupper)
 
 #ifndef __UCLIBC_HAS_XLOCALE__
 
 libc_hidden_proto(__ctype_toupper)
 const __ctype_touplow_t *__ctype_toupper = __C_ctype_toupper_data
                                                                                        + __UCLIBC_CTYPE_TO_TBL_OFFSET;
-libc_hidden_def(__ctype_toupper)
+libc_hidden_data_def(__ctype_toupper)
 
 #endif
 
index 3e44a01..bc6117d 100644 (file)
@@ -39,7 +39,9 @@ libc_hidden_proto(stdout)
 libc_hidden_proto(stderr)
 
 /* This variable is incremented each time `error' is called.  */
+libc_hidden_proto(error_message_count)
 unsigned int error_message_count = 0;
+libc_hidden_data_def(error_message_count)
 /* Sometimes we want to have at most one error per line.  This
    variable controls whether this mode is selected or not.  */
 int error_one_per_line;
index c1ae758..9931118 100644 (file)
@@ -97,7 +97,7 @@ void (*obstack_alloc_failed_handler) (void) = print_and_abort;
 static void print_and_abort ();
 void (*obstack_alloc_failed_handler) () = print_and_abort;
 # endif
-libc_hidden_def(obstack_alloc_failed_handler)
+libc_hidden_data_def(obstack_alloc_failed_handler)
 
 
 /* Exit value used when `print_and_abort' is used.  */
@@ -118,7 +118,7 @@ libc_hidden_proto(fwprintf)
 
 libc_hidden_proto(obstack_exit_failure)
 int obstack_exit_failure = EXIT_FAILURE;
-libc_hidden_def(obstack_exit_failure)
+libc_hidden_data_def(obstack_exit_failure)
 
 /* The non-GNU-C macros copy the obstack into this global variable
    to avoid multiple evaluation.  */
index 39dceac..1318fc9 100644 (file)
@@ -97,7 +97,7 @@ strong_alias (__progname_full, program_invocation_name)
  */
 libc_hidden_proto(__environ)
 char **__environ = 0;
-libc_hidden_def(__environ)
+libc_hidden_data_def(__environ)
 /* psm: arm segfaults with strong_alias, although defined */
 weak_alias(__environ,environ)
 
@@ -105,7 +105,7 @@ weak_alias(__environ,environ)
 extern size_t __pagesize;
 libc_hidden_proto(__pagesize)
 size_t __pagesize = 0;
-libc_hidden_def(__pagesize)
+libc_hidden_data_def(__pagesize)
 
 #ifndef O_NOFOLLOW
 # define O_NOFOLLOW    0
index 5ad829d..e53731e 100644 (file)
@@ -377,12 +377,12 @@ libc_hidden_proto(__ctype_toupper)
 __uclibc_locale_t __global_locale_data;
 
 __locale_t __global_locale = &__global_locale_data;
-libc_hidden_def(__global_locale)
+libc_hidden_data_def(__global_locale)
 
 #ifdef __UCLIBC_HAS_XLOCALE__
 libc_hidden_proto(__curlocale_var)
 __locale_t __curlocale_var = &__global_locale_data;
-libc_hidden_def(__curlocale_var)
+libc_hidden_data_def(__curlocale_var)
 #endif
 
 /*----------------------------------------------------------------------*/
index 84f201d..fb79883 100644 (file)
@@ -1705,13 +1705,13 @@ static const char vals[] = {
 /* Initialize to UTC. */
 libc_hidden_proto(daylight)
 int daylight = 0;
-libc_hidden_def(daylight)
+libc_hidden_data_def(daylight)
 libc_hidden_proto(timezone)
 long timezone = 0;
-libc_hidden_def(timezone)
+libc_hidden_data_def(timezone)
 libc_hidden_proto(tzname)
 char *tzname[2] = { (char *) UTC, (char *) (UTC-1) };
-libc_hidden_def(tzname)
+libc_hidden_data_def(tzname)
 
 #ifdef __UCLIBC_HAS_THREADS__
 attribute_hidden pthread_mutex_t _time_tzlock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
index 099769c..a795986 100644 (file)
@@ -1269,7 +1269,7 @@ const unsigned char __iconv_codesets[] =
        "\x08\x02""UTF-8\x00"
        "\x0b\x01""US-ASCII\x00"
        "\x07\x01""ASCII";                      /* Must be last! (special case to save a nul) */
-libc_hidden_def(__iconv_codesets)
+libc_hidden_data_def(__iconv_codesets)
 
 libc_hidden_proto(strcasecmp)
 
index 2e87100..746a098 100644 (file)
@@ -9,6 +9,9 @@
 #include <stdio_ext.h>
 
 libc_hidden_proto(__fsetlocking)
+#ifdef __UCLIBC_HAS_THREADS__
+libc_hidden_proto(_stdio_user_locking)
+#endif
 
 /* Not threadsafe. */
 
index 02051ef..4ca0282 100644 (file)
@@ -11,6 +11,10 @@ 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
index 5c8b720..dc8bd07 100644 (file)
@@ -129,15 +129,15 @@ static FILE _stdio_streams[] = {
 FILE *stdin  = _stdio_streams;
 libc_hidden_def(stdin)
 FILE *stdout = _stdio_streams + 1;
-libc_hidden_def(stdout)
+libc_hidden_data_def(stdout)
 libc_hidden_proto(stderr)
 FILE *stderr = _stdio_streams + 2;
-libc_hidden_def(stderr)
+libc_hidden_data_def(stderr)
 
 #ifdef __STDIO_GETC_MACRO
 libc_hidden_proto(__stdin)
 FILE *__stdin = _stdio_streams;                 /* For getchar() macro. */
-libc_hidden_def(__stdin)
+libc_hidden_data_def(__stdin)
 #endif
 #ifdef __STDIO_PUTC_MACRO
 FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */
@@ -159,9 +159,11 @@ 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
 
@@ -170,7 +172,9 @@ 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)
 {
index 1c31647..81942f0 100644 (file)
 libc_hidden_proto(stdin)
 libc_hidden_proto(stdout)
 
+libc_hidden_proto(_stdio_openlist)
+
 #ifdef __UCLIBC_HAS_THREADS__
 #include <pthread.h>
+libc_hidden_proto(_stdio_openlist_lock)
 
 #define __STDIO_THREADLOCK_OPENLIST \
        __pthread_mutex_lock(&_stdio_openlist_lock)
index c0f58d8..a2e1cf9 100644 (file)
@@ -16,6 +16,7 @@ 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) \
index 75972b5..959d08e 100644 (file)
@@ -49,6 +49,7 @@ libc_hidden_proto(_exit)
 #ifdef __UCLIBC_HAS_THREADS__
 # include <pthread.h>
 extern pthread_mutex_t mylock;
+libc_hidden_proto(mylock)
 #endif
 #define LOCK   __pthread_mutex_lock(&mylock)
 #define UNLOCK __pthread_mutex_unlock(&mylock)
@@ -314,6 +315,7 @@ extern void weak_function _stdio_term(void) attribute_hidden;
 attribute_hidden void (*__exit_cleanup) (int) = 0;
 #ifdef __UCLIBC_HAS_THREADS__
 pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+libc_hidden_data_def(mylock)
 #endif
 
 #ifdef __UCLIBC_CTOR_DTOR__
index 5141879..770345a 100644 (file)
@@ -84,7 +84,7 @@ extern int _getopt_internal (int argc, char *const *argv, const char *optstring,
    each non-option ARGV-element is returned here.  */
 
 char *optarg = NULL;
-libc_hidden_def(optarg)
+libc_hidden_data_def(optarg)
 
 /* Index in ARGV of the next element to be scanned.
    This is used for communication to and from the caller
@@ -100,20 +100,20 @@ libc_hidden_def(optarg)
 
 /* 1003.2 says this must be 1 before any call.  */
 int optind = 1;
-libc_hidden_def(optind)
+libc_hidden_data_def(optind)
 
 /* Callers store zero here to inhibit the error message
    for unrecognized options.  */
 
 int opterr = 1;
-libc_hidden_def(opterr)
+libc_hidden_data_def(opterr)
 
 /* Set to an option character which was unrecognized.
    This must be initialized on some systems to avoid linking in the
    system's own getopt implementation.  */
 
 int optopt = '?';
-libc_hidden_def(optopt)
+libc_hidden_data_def(optopt)
 
 /* The next char to be scanned in the option-element
    in which the last option character we returned was found.
index 91cd5fc..4028dfd 100644 (file)
@@ -38,4 +38,4 @@ _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
 #endif
 #endif
 #endif
-libm_hidden_def(_LIB_VERSION)
+libm_hidden_data_def(_LIB_VERSION)