Browse Source

Check #if feature test macros are defined where they may not be

Once again all of these reduce the noise from gcc-4.4.
Replaces a few more (USE_TLS && HAVE___THREAD) with USE___THREAD while we need
to mess with them for this anyhow.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Ron 15 years ago
parent
commit
11a52734e4

+ 1 - 1
libc/misc/fnmatch/fnmatch.c

@@ -17,7 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 

+ 3 - 3
libpthread/linuxthreads.old/cancel.c

@@ -31,7 +31,7 @@ extern void __rpc_thread_destroy(void);
 
 #ifdef _STACK_GROWS_DOWN
 # define FRAME_LEFT(frame, other) ((char *) frame >= (char *) other)
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 # define FRAME_LEFT(frame, other) ((char *) frame <= (char *) other)
 #else
 # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
@@ -193,10 +193,10 @@ void __pthread_perform_cleanup(char *currentframe)
 
   for (c = THREAD_GETMEM(self, p_cleanup); c != NULL; c = c->__prev)
     {
-#if _STACK_GROWS_DOWN
+#ifdef _STACK_GROWS_DOWN
       if ((char *) c <= currentframe)
 	break;
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       if ((char *) c >= currentframe)
 	break;
 #else

+ 2 - 2
libpthread/linuxthreads.old/libc_pthread_init.c

@@ -26,7 +26,7 @@
 
 /* Experimentally off - libc_hidden_proto(memcpy) */
 
-#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
+#if ! defined USE___THREAD && defined __UCLIBC_HAS_XLOCALE__
 /* libc_hidden_proto(uselocale) */
 #endif
 
@@ -42,7 +42,7 @@ int * __libc_pthread_init (const struct pthread_functions *functions)
 	  sizeof (__libc_pthread_functions));
 #endif
 
-#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
+#if ! defined USE___THREAD && defined __UCLIBC_HAS_XLOCALE__
   /* Initialize thread-locale current locale to point to the global one.
      With __thread support, the variable's initializer takes care of this.  */
   uselocale (LC_GLOBAL_LOCALE);

+ 1 - 1
libpthread/linuxthreads.old/pthread.c

@@ -321,7 +321,7 @@ libpthread_hidden_proto(pthread_condattr_init)
 
 struct pthread_functions __pthread_functions =
   {
-#if !(defined USE_TLS && HAVE___THREAD)
+#ifndef USE___THREAD
     .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
     .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
     .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,

+ 2 - 2
libpthread/linuxthreads.old/ptlongjmp.c

@@ -35,13 +35,13 @@ static void pthread_cleanup_upto(__jmp_buf target)
        c != NULL && _JMPBUF_UNWINDS(target, c);
        c = c->__prev)
     {
-#if _STACK_GROWS_DOWN
+#ifdef _STACK_GROWS_DOWN
       if ((char *) c <= currentframe)
 	{
 	  c = NULL;
 	  break;
 	}
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       if ((char *) c >= currentframe)
 	{
 	  c = NULL;

+ 1 - 1
libpthread/linuxthreads.old/specific.c

@@ -167,7 +167,7 @@ void __pthread_destroy_specifics(void)
     __pthread_unlock(THREAD_GETMEM(self, p_lock));
 }
 
-#if !(defined USE_TLS && HAVE___THREAD)
+#ifndef USE___THREAD
 
 /* Thread-specific data for libc. */
 

+ 1 - 1
libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c

@@ -31,7 +31,7 @@ td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)),
 		     size_t offset __attribute__ ((unused)),
 		     void **address __attribute__ ((unused)))
 {
-#if USE_TLS
+#ifdef USE_TLS
   size_t modid;
   union dtv pdtv, *dtvp;