svn commit: trunk/uClibc/libc/misc/fnmatch

psm at uclibc.org psm at uclibc.org
Tue Feb 28 13:23:41 UTC 2006


Author: psm
Date: 2006-02-28 05:23:39 -0800 (Tue, 28 Feb 2006)
New Revision: 14364

Log:
Cleanup/sync w/ glibc

Modified:
   trunk/uClibc/libc/misc/fnmatch/fnmatch.c


Changeset:
Modified: trunk/uClibc/libc/misc/fnmatch/fnmatch.c
===================================================================
--- trunk/uClibc/libc/misc/fnmatch/fnmatch.c	2006-02-28 12:28:21 UTC (rev 14363)
+++ trunk/uClibc/libc/misc/fnmatch/fnmatch.c	2006-02-28 13:23:39 UTC (rev 14364)
@@ -102,22 +102,17 @@
 /* We need some of the locale data (the collation sequence information)
    but there is no interface to get this information in general.  Therefore
    we support a correct implementation only in glibc.  */
-#if defined _LIBC
+#ifdef _LIBC
 # include "../locale/localeinfo.h"
 # include "../locale/elem-hash.h"
 # include "../locale/coll-lookup.h"
 # include <shlib-compat.h>
 
 # define CONCAT(a,b) __CONCAT(a,b)
-# if defined _LIBC
 # define mbsrtowcs __mbsrtowcs
-# endif
 # define fnmatch __fnmatch
-extern int fnmatch (const char *pattern, const char *string, int flags) attribute_hidden;
+extern int fnmatch (const char *pattern, const char *string, int flags);
 #endif
-#ifdef __UCLIBC__
-# define CONCAT(a,b) __CONCAT(a,b)
-#endif
 
 /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set.  */
 #define NO_LEADING_PERIOD(flags) \
@@ -175,13 +170,13 @@
 #   define CHAR_CLASS_MAX_LENGTH 256
 #  endif
 
-#  if defined _LIBC
+#  ifdef _LIBC
 #   define IS_CHAR_CLASS(string) __wctype (string)
 #  else
 #   define IS_CHAR_CLASS(string) wctype (string)
 #  endif
 
-#  if defined _LIBC
+#  ifdef _LIBC
 #   define ISWCTYPE(WC, WT)	__iswctype (WC, WT)
 #  else
 #   define ISWCTYPE(WC, WT)	iswctype (WC, WT)
@@ -253,8 +248,8 @@
 # endif
 
 /* Note that this evaluates C many times.  */
-# if defined _LIBC
-#  define FOLD(c) ((flags & FNM_CASEFOLD) ? __tolower (c) : (c))
+# ifdef _LIBC
+#  define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
 # else
 #  define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
 # endif
@@ -265,7 +260,7 @@
 # define EXT	ext_match
 # define END	end_pattern
 # define L(CS)	CS
-# if defined _LIBC
+# ifdef _LIBC
 #  define BTOWC(C)	__btowc (C)
 # else
 #  define BTOWC(C)	btowc (C)
@@ -280,8 +275,8 @@
 
 # if HANDLE_MULTIBYTE
 /* Note that this evaluates C many times.  */
-#  if defined _LIBC
-#   define FOLD(c) ((flags & FNM_CASEFOLD) ? __towlower (c) : (c))
+#  ifdef _LIBC
+#   define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c))
 #  else
 #   define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? towlower (c) : (c))
 #  endif
@@ -361,7 +356,7 @@
 
   *cp = '\0';
 
-#  if defined _LIBC
+#  ifdef _LIBC
   return __wctype (s);
 #  else
   return wctype (s);
@@ -465,16 +460,14 @@
 			   flags & FNM_PERIOD, flags);
 }
 
-# if defined _LIBC
+# ifdef _LIBC
 #  undef fnmatch
-#  ifndef __UCLIBC__
 versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3);
 #  if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3)
 strong_alias (__fnmatch, __fnmatch_old)
 compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0);
 #  endif
 libc_hidden_ver (__fnmatch, fnmatch)
-#  endif
 # else
 libc_hidden_def(fnmatch)
 # endif




More information about the uClibc-cvs mailing list