Browse Source

remove a few more empty #if/#endif pairs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys Vlasenko 14 years ago
parent
commit
7aa9c2486c

+ 3 - 4
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

+ 1 - 2
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;

+ 0 - 3
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)

+ 0 - 4
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)
 {

+ 2 - 4
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? */

+ 0 - 3
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__ */

+ 0 - 2
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). */
 

+ 2 - 5
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;

+ 0 - 2
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

+ 0 - 3
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;

+ 0 - 4
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;