svn commit: trunk/uClibc: libc/inet libc/misc/fnmatch libc/misc/ft etc...
vda at uclibc.org
vda at uclibc.org
Sun Dec 14 16:04:02 UTC 2008
Author: vda
Date: 2008-12-14 08:04:01 -0800 (Sun, 14 Dec 2008)
New Revision: 24414
Log:
heed compiler warnings about checking non-defined variables in #if directives
Modified:
trunk/uClibc/libc/inet/getaddrinfo.c
trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c
trunk/uClibc/libc/misc/ftw/ftw.c
trunk/uClibc/libc/misc/regex/regex_old.c
trunk/uClibc/libpthread/linuxthreads.old/attr.c
trunk/uClibc/libpthread/linuxthreads.old/pthread.c
trunk/uClibc/libpthread/linuxthreads.old/specific.c
Changeset:
Modified: trunk/uClibc/libc/inet/getaddrinfo.c
===================================================================
--- trunk/uClibc/libc/inet/getaddrinfo.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libc/inet/getaddrinfo.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -716,9 +716,9 @@
(*pai)->ai_protocol = st2->protocol;
(*pai)->ai_addrlen = socklen;
(*pai)->ai_addr = (void *) (*pai) + sizeof(struct addrinfo);
-#if SALEN
+#if defined SALEN
(*pai)->ai_addr->sa_len = socklen;
-#endif /* SALEN */
+#endif
(*pai)->ai_addr->sa_family = family;
#if defined __UCLIBC_HAS_IPV6__
Modified: trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c
===================================================================
--- trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -15,7 +15,7 @@
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Modified: trunk/uClibc/libc/misc/ftw/ftw.c
===================================================================
--- trunk/uClibc/libc/misc/ftw/ftw.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libc/misc/ftw/ftw.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -105,11 +105,11 @@
/* libc_hidden_proto(lstat) */
/* libc_hidden_proto(stat) */
-#if ! _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
+#if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
char *stpcpy ();
#endif
-#if ! _LIBC && ! defined HAVE_MEMPCPY && ! defined mempcpy
+#if !defined _LIBC && ! defined HAVE_MEMPCPY && ! defined mempcpy
/* Be CAREFUL that there are no side effects in N. */
# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
#endif
@@ -162,7 +162,7 @@
/* Arrange to make lstat calls go through the wrapper function
on systems with an lstat function that does not dereference symlinks
that are specified with a trailing slash. */
-#if ! _LIBC && ! LSTAT_FOLLOWS_SLASHED_SYMLINK && !defined __UCLIBC__
+#if !defined _LIBC && !defined LSTAT_FOLLOWS_SLASHED_SYMLINK && !defined __UCLIBC__
int rpl_lstat (const char *, struct stat *);
# undef lstat
# define lstat(Name, Stat_buf) rpl_lstat(Name, Stat_buf)
Modified: trunk/uClibc/libc/misc/regex/regex_old.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_old.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libc/misc/regex/regex_old.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -120,7 +120,7 @@
# endif
/* This is for other GNU distributions with internationalized messages. */
-# if HAVE_LIBINTL_H || defined _LIBC
+# if defined HAVE_LIBINTL_H || defined _LIBC
# include <libintl.h>
# ifdef _LIBC
# undef gettext
@@ -208,7 +208,7 @@
# endif /* not emacs */
-# if defined _LIBC || HAVE_LIMITS_H
+# if defined _LIBC || defined HAVE_LIMITS_H
# include <limits.h>
# endif
@@ -2230,7 +2230,7 @@
}
# ifndef DEFINED_ONCE
-# if defined _LIBC || WIDE_CHAR_SUPPORT
+# if defined _LIBC || defined WIDE_CHAR_SUPPORT
/* The GNU C library provides support for user-defined character classes
and the functions from ISO C amendement 1. */
# ifdef CHARCLASS_NAME_MAX
@@ -3286,7 +3286,7 @@
the leading `:' and `[' (but set bits for them). */
if (c == ':' && *p == ']')
{
-# if defined _LIBC || WIDE_CHAR_SUPPORT
+# if defined _LIBC || defined WIDE_CHAR_SUPPORT
boolean is_lower = STREQ (str, "lower");
boolean is_upper = STREQ (str, "upper");
wctype_t wt;
@@ -4542,7 +4542,7 @@
unsigned this_char;
const char *p = *p_ptr;
reg_errcode_t ret;
-# if _LIBC
+# ifdef _LIBC
const unsigned char *collseq;
unsigned int start_colseq;
unsigned int end_colseq;
@@ -4560,7 +4560,7 @@
/* Report an error if the range is empty and the syntax prohibits this. */
ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
-# if _LIBC
+# ifdef _LIBC
collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_COLLSEQMB);
Modified: trunk/uClibc/libpthread/linuxthreads.old/attr.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/attr.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libpthread/linuxthreads.old/attr.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -61,7 +61,7 @@
libpthread_hidden_def(pthread_attr_init)
/* uClibc: leave out this for now. */
-#if DO_PTHREAD_VERSIONING_WITH_UCLIBC
+#if defined DO_PTHREAD_VERSIONING_WITH_UCLIBC
#if defined __PIC__ && defined DO_VERSIONING
default_symbol_version (__pthread_attr_init_2_1, pthread_attr_init, GLIBC_2.1);
Modified: trunk/uClibc/libpthread/linuxthreads.old/pthread.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/pthread.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libpthread/linuxthreads.old/pthread.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -321,7 +321,7 @@
struct pthread_functions __pthread_functions =
{
-#if !(USE_TLS && HAVE___THREAD)
+#if !(defined USE_TLS && HAVE___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,
Modified: trunk/uClibc/libpthread/linuxthreads.old/specific.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/specific.c 2008-12-14 15:45:25 UTC (rev 24413)
+++ trunk/uClibc/libpthread/linuxthreads.old/specific.c 2008-12-14 16:04:01 UTC (rev 24414)
@@ -167,7 +167,7 @@
__pthread_unlock(THREAD_GETMEM(self, p_lock));
}
-#if !(USE_TLS && HAVE___THREAD)
+#if !(defined USE_TLS && HAVE___THREAD)
/* Thread-specific data for libc. */
More information about the uClibc-cvs
mailing list