[git commit] Check #if feature test macros are defined where they may not be
Ron
ron at debian.org
Fri Jun 26 19:14:21 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=4dc09127f6782c77f3d92268d78a46f8a1a8492d
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl
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 at debian.org>
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
libc/misc/fnmatch/fnmatch.c | 2 +-
libpthread/linuxthreads.old/cancel.c | 6 +++---
libpthread/linuxthreads.old/libc_pthread_init.c | 4 ++--
libpthread/linuxthreads.old/pthread.c | 2 +-
libpthread/linuxthreads.old/ptlongjmp.c | 4 ++--
libpthread/linuxthreads.old/specific.c | 2 +-
.../linuxthreads.old_db/td_thr_tls_get_addr.c | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index ed86fe8..4416717 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/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
diff --git a/libpthread/linuxthreads.old/cancel.c b/libpthread/linuxthreads.old/cancel.c
index 03a85e4..47534be 100644
--- a/libpthread/linuxthreads.old/cancel.c
+++ b/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
diff --git a/libpthread/linuxthreads.old/libc_pthread_init.c b/libpthread/linuxthreads.old/libc_pthread_init.c
index 6cdad84..6bd0807 100644
--- a/libpthread/linuxthreads.old/libc_pthread_init.c
+++ b/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);
diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c
index e1e6c9f..c988131 100644
--- a/libpthread/linuxthreads.old/pthread.c
+++ b/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,
diff --git a/libpthread/linuxthreads.old/ptlongjmp.c b/libpthread/linuxthreads.old/ptlongjmp.c
index b3ff274..5213a4d 100644
--- a/libpthread/linuxthreads.old/ptlongjmp.c
+++ b/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;
diff --git a/libpthread/linuxthreads.old/specific.c b/libpthread/linuxthreads.old/specific.c
index 67e8eda..8e08aa4 100644
--- a/libpthread/linuxthreads.old/specific.c
+++ b/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. */
diff --git a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c b/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
index a28b074..19821d6 100644
--- a/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
+++ b/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;
--
1.6.3.3
More information about the uClibc-cvs
mailing list