svn commit: trunk/uClibc/libc: inet inet/rpc misc/fnmatch misc/regex mi etc...

psm at uclibc.org psm at uclibc.org
Tue Jan 3 17:17:23 UTC 2006


Author: psm
Date: 2006-01-03 09:17:14 -0800 (Tue, 03 Jan 2006)
New Revision: 13052

Log:
Get rid of tolower/toupper jump reloc, correct tow* for XLOCALE

Modified:
   trunk/uClibc/libc/inet/ntop.c
   trunk/uClibc/libc/inet/rpc/rcmd.c
   trunk/uClibc/libc/misc/fnmatch/fnmatch.c
   trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c
   trunk/uClibc/libc/misc/regex/regcomp.c
   trunk/uClibc/libc/misc/regex/regex_internal.c
   trunk/uClibc/libc/misc/regex/regex_old.c
   trunk/uClibc/libc/misc/wctype/wctype.c
   trunk/uClibc/libc/string/strcasestr.c


Changeset:
Modified: trunk/uClibc/libc/inet/ntop.c
===================================================================
--- trunk/uClibc/libc/inet/ntop.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/inet/ntop.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -249,7 +249,7 @@
  * So undef it here so we get the function version of tolower
  * instead.
  */
-#undef tolower
+#undef __tolower
 
 static int
 inet_pton6(const char *src, u_char *dst)
@@ -271,7 +271,7 @@
 	curtok = src;
 	saw_xdigit = 0;
 	val = 0;
-	while ((ch = tolower (*src++)) != '\0') {
+	while ((ch = __tolower (*src++)) != '\0') {
 		const char *pch;
 
 		pch = __strchr(xdigits, ch);

Modified: trunk/uClibc/libc/inet/rpc/rcmd.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/rcmd.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/inet/rpc/rcmd.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -673,7 +673,7 @@
 	}
 
 	for (;*p && !isspace(*p); ++p) {
-	    *p = tolower (*p);
+	    *p = __tolower (*p);
 	}
 
 	/* Next we want to find the permitted name for the remote user.  */

Modified: trunk/uClibc/libc/misc/fnmatch/fnmatch.c
===================================================================
--- trunk/uClibc/libc/misc/fnmatch/fnmatch.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/fnmatch/fnmatch.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -245,7 +245,7 @@
 
 /* Note that this evaluates C many times.  */
 # if defined _LIBC || defined __UCLIBC__
-#  define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
+#  define FOLD(c) ((flags & FNM_CASEFOLD) ? __tolower (c) : (c))
 # else
 #  define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
 # endif

Modified: trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c
===================================================================
--- trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/fnmatch/fnmatch_old.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -56,7 +56,7 @@
 	register char c;
 
 /* Note that this evaluates C many times.  */
-# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
+# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? __tolower (c) : (c))
 
 	while ((c = *p++) != '\0') {
 		c = FOLD(c);

Modified: trunk/uClibc/libc/misc/regex/regcomp.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regcomp.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/regex/regcomp.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -292,7 +292,7 @@
 {
   fastmap[ch] = 1;
   if (icase)
-    fastmap[tolower (ch)] = 1;
+    fastmap[__tolower (ch)] = 1;
 }
 
 /* Helper function for re_compile_fastmap.

Modified: trunk/uClibc/libc/misc/regex/regex_internal.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_internal.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/regex/regex_internal.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -289,7 +289,7 @@
 	    {
 	      /* In case of a singlebyte character.  */
 	      pstr->mbs[byte_idx]
-		= toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
+		= __toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
 	      /* The next step uses the assumption that wchar_t is encoded
 		 ASCII-safe: all ASCII values can be converted like this.  */
 	      pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
@@ -523,7 +523,7 @@
       if (BE (pstr->trans != NULL, 0))
 	ch = pstr->trans[ch];
       if (islower (ch))
-	pstr->mbs[char_idx] = toupper (ch);
+	pstr->mbs[char_idx] = __toupper (ch);
       else
 	pstr->mbs[char_idx] = ch;
     }

Modified: trunk/uClibc/libc/misc/regex/regex_old.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_old.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/regex/regex_old.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -275,7 +275,7 @@
 # ifdef _tolower
 #  define TOLOWER(c) _tolower(c)
 # else
-#  define TOLOWER(c) tolower(c)
+#  define TOLOWER(c) __tolower(c)
 # endif
 
 # ifndef NULL

Modified: trunk/uClibc/libc/misc/wctype/wctype.c
===================================================================
--- trunk/uClibc/libc/misc/wctype/wctype.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/misc/wctype/wctype.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -378,7 +378,9 @@
 
 #endif /* __LOCALE_C_ONLY */
 
+#ifndef L_towlower_l
 strong_alias(__towlower,towlower)
+#endif
 
 #endif
 /**********************************************************************/
@@ -484,7 +486,9 @@
 
 #endif /* __LOCALE_C_ONLY */
 
+#ifndef L_towupper_l
 strong_alias(__towupper,towupper)
+#endif
 
 #endif
 /**********************************************************************/
@@ -724,11 +728,11 @@
 
 #ifndef _tolower
 #warning _tolower is undefined!
-#define _tolower(c)    tolower(c)
+#define _tolower(c)    __tolower(c)
 #endif
 #ifndef _toupper
 #warning _toupper is undefined!
-#define _toupper(c)    toupper(c)
+#define _toupper(c)    __toupper(c)
 #endif
 
 wint_t attribute_hidden __towctrans(wint_t wc, wctrans_t desc)
@@ -880,11 +884,14 @@
 #ifdef L_towctrans_l
 strong_alias(__towctrans_l, towctrans_l)
 #endif /* L_towctrans_l */
-strong_alias(__towctrans,towctrans)
 
 #endif /* __LOCALE_C_ONLY */
 
+#ifndef L_towctrans_l
+strong_alias(__towctrans,towctrans)
 #endif
+
+#endif
 /**********************************************************************/
 #ifdef L_wctrans
 

Modified: trunk/uClibc/libc/string/strcasestr.c
===================================================================
--- trunk/uClibc/libc/string/strcasestr.c	2006-01-03 17:15:15 UTC (rev 13051)
+++ trunk/uClibc/libc/string/strcasestr.c	2006-01-03 17:17:14 UTC (rev 13052)
@@ -19,7 +19,7 @@
 			return (char *) s1;;
 		}
 		if ((*p == *s)
-			|| (tolower(*((unsigned char *)p)) == tolower(*((unsigned char *)s)))
+			|| (__tolower(*((unsigned char *)p)) == __tolower(*((unsigned char *)s)))
 			) {
 			++p;
 			++s;
@@ -34,7 +34,7 @@
 #else
 	while (*p && *s) {
 		if ((*p == *s)
-			|| (tolower(*((unsigned char *)p)) == tolower(*((unsigned char *)s)))
+			|| (__tolower(*((unsigned char *)p)) == __tolower(*((unsigned char *)s)))
 			) {
 			++p;
 			++s;




More information about the uClibc-cvs mailing list