[git commit nptl] remove a few more empty #if/#endif pairs

Denys Vlasenko vda.linux at googlemail.com
Sat Sep 19 00:14:12 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=55fa359b3f06fd01ee30267c7795b2dd1cf32bf2
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libc/misc/fnmatch/fnmatch.c         |    7 +++----
 libc/misc/time/time.c               |    3 +--
 libc/stdio/fseeko.c                 |    3 ---
 libc/stdio/vasprintf.c              |    4 ----
 libc/stdio/vdprintf.c               |    6 ++----
 libc/stdio/vsnprintf.c              |    3 ---
 libc/stdlib/stdlib.c                |    2 --
 libc/string/_collate.c              |    7 ++-----
 libc/string/strncasecmp.c           |    2 --
 libc/sysdeps/linux/common/setegid.c |    3 ---
 libc/sysdeps/linux/common/seteuid.c |    4 ----
 11 files changed, 8 insertions(+), 36 deletions(-)

diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index f069e5c..d25619b 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/libc/misc/fnmatch/fnmatch.c
@@ -340,10 +340,9 @@ is_char_class (const wchar_t *wcs)
 #  include "fnmatch_loop.c"
 # endif
 
-#ifdef __UCLIBC_HAS_WCHAR__
-#else
-#undef MB_CUR_MAX
-#define MB_CUR_MAX 1
+#ifndef __UCLIBC_HAS_WCHAR__
+# undef MB_CUR_MAX
+# define MB_CUR_MAX 1
 #endif
 
 int
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 0597138..583c17a 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1172,8 +1172,7 @@ LOOP:
 
 					i = 16 + 6;	/* 0-fill, width = 4 */
 				}
-#ifdef __UCLIBC_HAS_TM_EXTENSIONS__
-#else
+#ifndef __UCLIBC_HAS_TM_EXTENSIONS__
 				__UCLIBC_MUTEX_UNLOCK(_time_tzlock);
 				if (*p == 'Z') {
 					goto OUTPUT;
diff --git a/libc/stdio/fseeko.c b/libc/stdio/fseeko.c
index 5f3bbbb..3caf1ac 100644
--- a/libc/stdio/fseeko.c
+++ b/libc/stdio/fseeko.c
@@ -16,9 +16,6 @@
 # define OFFSET_TYPE   long int
 #endif
 
-#ifdef __UCLIBC_HAS_LFS__
-#endif
-
 int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence)
 {
 #if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE)
diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c
index 175c497..a901ee8 100644
--- a/libc/stdio/vasprintf.c
+++ b/libc/stdio/vasprintf.c
@@ -22,10 +22,6 @@
 #warning Skipping vasprintf since no vsnprintf!
 #else
 
-#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
-#else
-#endif
-
 int vasprintf(char **__restrict buf, const char * __restrict format,
 			 va_list arg)
 {
diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c
index ceafafa..457018b 100644
--- a/libc/stdio/vdprintf.c
+++ b/libc/stdio/vdprintf.c
@@ -11,8 +11,6 @@
 #include "_stdio.h"
 #include <stdarg.h>
 
-#ifdef __USE_OLD_VFPRINTF__
-#endif
 
 int vdprintf(int filedes, const char * __restrict format, va_list arg)
 {
@@ -42,10 +40,10 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg)
 
 #ifdef __UCLIBC_HAS_WCHAR__
 	f.__ungot_width[0] = 0;
-#endif /* __UCLIBC_HAS_WCHAR__ */
+#endif
 #ifdef __STDIO_MBSTATE
 	__INIT_MBSTATE(&(f.__state));
-#endif /* __STDIO_MBSTATE */
+#endif
 
 /* _vfprintf_internal doesn't do any locking, locking init is here
  * only because of fflush_unlocked. TODO? */
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c
index 7ff464e..31adc52 100644
--- a/libc/stdio/vsnprintf.c
+++ b/libc/stdio/vsnprintf.c
@@ -9,9 +9,6 @@
 #include <stdarg.h>
 
 
-#ifdef __USE_OLD_VFPRINTF__
-#endif
-
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning WISHLIST: Implement vsnprintf for non-buffered and no custom stream case.
 #endif /* __UCLIBC_MJN3_ONLY__ */
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index eb34dfc..ad0c4aa 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -635,8 +635,6 @@ unsigned long long attribute_hidden _stdlib_strto_ll(register const Wchar * __re
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
-#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__
-#endif
 /* This is the main work fuction which handles both strtoll (sflag = 1) and
  * strtoull (sflag = 0). */
 
diff --git a/libc/string/_collate.c b/libc/string/_collate.c
index eadbd6c..77d9eb6 100644
--- a/libc/string/_collate.c
+++ b/libc/string/_collate.c
@@ -19,9 +19,6 @@
 #include <errno.h>
 #include <assert.h>
 
-#ifdef WANT_WIDE
-#endif
-
 #ifdef __UCLIBC_HAS_LOCALE__
 #if defined(L_strxfrm) || defined(L_strxfrm_l) || defined(L_wcsxfrm) || defined(L_wcsxfrm_l)
 
@@ -512,9 +509,9 @@ int __XL_NPP(wcscoll) (const Wchar *s0, const Wchar *s1   __LOCALE_PARAM )
 	if (!CUR_COLLATE->num_weights) { /* C locale */
 #ifdef WANT_WIDE
 		return wcscmp(s0, s1);
-#else  /* WANT_WIDE */
+#else
 		return strcmp(s0, s1);
-#endif /* WANT_WIDE */
+#endif
 	}
 
 	pass = 0;
diff --git a/libc/string/strncasecmp.c b/libc/string/strncasecmp.c
index b290e5a..2af305e 100644
--- a/libc/string/strncasecmp.c
+++ b/libc/string/strncasecmp.c
@@ -21,8 +21,6 @@
 # ifdef __UCLIBC_DO_XLOCALE
 #  define TOLOWER(C) tolower_l((C), locale_arg)
 # else
-#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__
-#endif
 #  define TOLOWER(C) tolower((C))
 # endif
 #endif
diff --git a/libc/sysdeps/linux/common/setegid.c b/libc/sysdeps/linux/common/setegid.c
index d1daf31..30329bc 100644
--- a/libc/sysdeps/linux/common/setegid.c
+++ b/libc/sysdeps/linux/common/setegid.c
@@ -11,9 +11,6 @@
 #include <sys/types.h>
 #include <sys/syscall.h>
 
-#if (defined __NR_setresgid || defined __NR_setresgid32) && defined __USE_GNU
-#endif
-
 int setegid(gid_t gid)
 {
     int result;
diff --git a/libc/sysdeps/linux/common/seteuid.c b/libc/sysdeps/linux/common/seteuid.c
index 44f0854..3e1611d 100644
--- a/libc/sysdeps/linux/common/seteuid.c
+++ b/libc/sysdeps/linux/common/seteuid.c
@@ -16,10 +16,6 @@
 #undef __NR_setresuid32
 #endif
 
-
-#if (defined __NR_setresuid || defined __NR_setresuid32) && defined __USE_GNU
-#endif
-
 int seteuid(uid_t uid)
 {
     int result;
-- 
1.6.3.3



More information about the uClibc-cvs mailing list