svn commit: trunk/uClibc: libc/inet libc/misc/ctype libc/misc/erro etc...

psm at uclibc.org psm at uclibc.org
Wed Feb 1 09:22:57 UTC 2006


Author: psm
Date: 2006-02-01 01:22:45 -0800 (Wed, 01 Feb 2006)
New Revision: 13778

Log:
global data uses libc_hidden_data_def, convert all -I hope- and add some new

Modified:
   trunk/uClibc/libc/inet/in6_addr.c
   trunk/uClibc/libc/inet/resolv.c
   trunk/uClibc/libc/misc/ctype/ctype.c
   trunk/uClibc/libc/misc/error/error.c
   trunk/uClibc/libc/misc/gnu/obstack.c
   trunk/uClibc/libc/misc/internals/__uClibc_main.c
   trunk/uClibc/libc/misc/locale/locale.c
   trunk/uClibc/libc/misc/time/time.c
   trunk/uClibc/libc/misc/wchar/wchar.c
   trunk/uClibc/libc/stdio/__fsetlocking.c
   trunk/uClibc/libc/stdio/_fopen.c
   trunk/uClibc/libc/stdio/_stdio.c
   trunk/uClibc/libc/stdio/_stdio.h
   trunk/uClibc/libc/stdio/fflush.c
   trunk/uClibc/libc/stdlib/atexit.c
   trunk/uClibc/libc/unistd/getopt.c
   trunk/uClibc/libm/s_lib_version.c


Changeset:
Modified: trunk/uClibc/libc/inet/in6_addr.c
===================================================================
--- trunk/uClibc/libc/inet/in6_addr.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/inet/in6_addr.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -24,12 +24,10 @@
 #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__ */
 
 

Modified: trunk/uClibc/libc/inet/resolv.c
===================================================================
--- trunk/uClibc/libc/inet/resolv.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/inet/resolv.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -237,6 +237,7 @@
 #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 @@
 #ifdef __UCLIBC_HAS_THREADS__
 # include <pthread.h>
 pthread_mutex_t __resolv_lock = PTHREAD_MUTEX_INITIALIZER;
+libc_hidden_data_def(__resolv_lock)
 #endif
 
 /*

Modified: trunk/uClibc/libc/misc/ctype/ctype.c
===================================================================
--- trunk/uClibc/libc/misc/ctype/ctype.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/ctype/ctype.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -856,16 +856,16 @@
 	/*  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 @@
 	 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 @@
 	 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
 

Modified: trunk/uClibc/libc/misc/error/error.c
===================================================================
--- trunk/uClibc/libc/misc/error/error.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/error/error.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -39,7 +39,9 @@
 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;

Modified: trunk/uClibc/libc/misc/gnu/obstack.c
===================================================================
--- trunk/uClibc/libc/misc/gnu/obstack.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/gnu/obstack.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -97,7 +97,7 @@
 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(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.  */

Modified: trunk/uClibc/libc/misc/internals/__uClibc_main.c
===================================================================
--- trunk/uClibc/libc/misc/internals/__uClibc_main.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/internals/__uClibc_main.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -97,7 +97,7 @@
  */
 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 @@
 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

Modified: trunk/uClibc/libc/misc/locale/locale.c
===================================================================
--- trunk/uClibc/libc/misc/locale/locale.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/locale/locale.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -377,12 +377,12 @@
 __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
 
 /*----------------------------------------------------------------------*/

Modified: trunk/uClibc/libc/misc/time/time.c
===================================================================
--- trunk/uClibc/libc/misc/time/time.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/time/time.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -1705,13 +1705,13 @@
 /* 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;

Modified: trunk/uClibc/libc/misc/wchar/wchar.c
===================================================================
--- trunk/uClibc/libc/misc/wchar/wchar.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/misc/wchar/wchar.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -1269,7 +1269,7 @@
 	"\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)
 

Modified: trunk/uClibc/libc/stdio/__fsetlocking.c
===================================================================
--- trunk/uClibc/libc/stdio/__fsetlocking.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdio/__fsetlocking.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -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. */
 

Modified: trunk/uClibc/libc/stdio/_fopen.c
===================================================================
--- trunk/uClibc/libc/stdio/_fopen.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdio/_fopen.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -11,6 +11,10 @@
 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

Modified: trunk/uClibc/libc/stdio/_stdio.c
===================================================================
--- trunk/uClibc/libc/stdio/_stdio.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdio/_stdio.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -129,15 +129,15 @@
 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 *_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 @@
 #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)
 {

Modified: trunk/uClibc/libc/stdio/_stdio.h
===================================================================
--- trunk/uClibc/libc/stdio/_stdio.h	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdio/_stdio.h	2006-02-01 09:22:45 UTC (rev 13778)
@@ -23,8 +23,11 @@
 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)

Modified: trunk/uClibc/libc/stdio/fflush.c
===================================================================
--- trunk/uClibc/libc/stdio/fflush.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdio/fflush.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -16,6 +16,7 @@
 #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) \

Modified: trunk/uClibc/libc/stdlib/atexit.c
===================================================================
--- trunk/uClibc/libc/stdlib/atexit.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/stdlib/atexit.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -49,6 +49,7 @@
 #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 @@
 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__

Modified: trunk/uClibc/libc/unistd/getopt.c
===================================================================
--- trunk/uClibc/libc/unistd/getopt.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libc/unistd/getopt.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -84,7 +84,7 @@
    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 @@
 
 /* 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.

Modified: trunk/uClibc/libm/s_lib_version.c
===================================================================
--- trunk/uClibc/libm/s_lib_version.c	2006-02-01 03:07:15 UTC (rev 13777)
+++ trunk/uClibc/libm/s_lib_version.c	2006-02-01 09:22:45 UTC (rev 13778)
@@ -38,4 +38,4 @@
 #endif
 #endif
 #endif
-libm_hidden_def(_LIB_VERSION)
+libm_hidden_data_def(_LIB_VERSION)




More information about the uClibc-cvs mailing list