svn commit: trunk/uClibc/libc: inet inet/rpc misc/regex misc/wchar

psm at uclibc.org psm at uclibc.org
Tue Dec 6 14:55:04 UTC 2005


Author: psm
Date: 2005-12-06 06:53:37 -0800 (Tue, 06 Dec 2005)
New Revision: 12704

Log:
Make use internal str*casecmp/wcscoll

Modified:
   trunk/uClibc/libc/inet/resolv.c
   trunk/uClibc/libc/inet/rpc/ruserpass.c
   trunk/uClibc/libc/misc/regex/regex.c
   trunk/uClibc/libc/misc/regex/regex_old.c
   trunk/uClibc/libc/misc/wchar/wchar.c


Changeset:
Modified: trunk/uClibc/libc/inet/resolv.c
===================================================================
--- trunk/uClibc/libc/inet/resolv.c	2005-12-06 14:51:16 UTC (rev 12703)
+++ trunk/uClibc/libc/inet/resolv.c	2005-12-06 14:53:37 UTC (rev 12704)
@@ -1535,7 +1535,7 @@
 		} else {
 			/* GET_HOSTS_BYNAME */
 			for (i = 1; i < aliases; i++)
-				if (strcasecmp(name, alias[i]) == 0)
+				if (__strcasecmp(name, alias[i]) == 0)
 					break;
 			if (i >= aliases)
 				continue;

Modified: trunk/uClibc/libc/inet/rpc/ruserpass.c
===================================================================
--- trunk/uClibc/libc/inet/rpc/ruserpass.c	2005-12-06 14:51:16 UTC (rev 12703)
+++ trunk/uClibc/libc/inet/rpc/ruserpass.c	2005-12-06 14:53:37 UTC (rev 12704)
@@ -149,18 +149,11 @@
 			 * or official hostname.  Also allow match of
 			 * incompletely-specified host in local domain.
 			 */
-			if (strcasecmp(host, tokval) == 0)
+			if (__strcasecmp(host, tokval) == 0)
 				goto match;
-/*			if (__strcasecmp(hostname, tokval) == 0)
-				goto match;
-			if ((tmp = __strchr(hostname, '.')) != NULL &&
-			    __strcasecmp(tmp, mydomain) == 0 &&
-			    __strncasecmp(hostname, tokval, tmp-hostname) == 0 &&
-			    tokval[tmp - hostname] == '\0')
-				goto match; */
 			if ((tmp = __strchr(host, '.')) != NULL &&
-			    strcasecmp(tmp, mydomain) == 0 &&
-			    strncasecmp(host, tokval, tmp - host) == 0 &&
+			    __strcasecmp(tmp, mydomain) == 0 &&
+			    __strncasecmp(host, tokval, tmp - host) == 0 &&
 			    tokval[tmp - host] == '\0')
 				goto match;
 			continue;

Modified: trunk/uClibc/libc/misc/regex/regex.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex.c	2005-12-06 14:51:16 UTC (rev 12703)
+++ trunk/uClibc/libc/misc/regex/regex.c	2005-12-06 14:53:37 UTC (rev 12704)
@@ -54,6 +54,8 @@
 #define strlen __strlen
 #define strncpy __strncpy
 #define getenv __getenv
+#define strcasecmp __strcasecmp
+#define wcscoll __wcscoll
 
 extern void *__mempcpy (void *__restrict __dest,
 			__const void *__restrict __src, size_t __n) /*attribute_hidden*/;

Modified: trunk/uClibc/libc/misc/regex/regex_old.c
===================================================================
--- trunk/uClibc/libc/misc/regex/regex_old.c	2005-12-06 14:51:16 UTC (rev 12703)
+++ trunk/uClibc/libc/misc/regex/regex_old.c	2005-12-06 14:53:37 UTC (rev 12704)
@@ -28,6 +28,7 @@
 #define wcslen __wcslen
 /* for some reason this does not work */
 #define memcpy __memcpy
+#define wcscoll __wcscoll
 
 /* To exclude some unwanted junk.... */
 #undef _LIBC

Modified: trunk/uClibc/libc/misc/wchar/wchar.c
===================================================================
--- trunk/uClibc/libc/misc/wchar/wchar.c	2005-12-06 14:51:16 UTC (rev 12703)
+++ trunk/uClibc/libc/misc/wchar/wchar.c	2005-12-06 14:53:37 UTC (rev 12704)
@@ -1267,7 +1267,7 @@
 	int codeset;
 
 	for (s = __iconv_codesets ; *s ; s += *s) {
-		if (!strcasecmp(s+2, name)) {
+		if (!__strcasecmp(s+2, name)) {
 			return s[1];
 		}
 	}
@@ -1280,7 +1280,7 @@
 	s = __LOCALE_DATA_CODESET_LIST;
 	do {
 		++codeset;		/* Increment codeset first. */
-		if (!strcasecmp(__LOCALE_DATA_CODESET_LIST+*s, name)) {
+		if (!__strcasecmp(__LOCALE_DATA_CODESET_LIST+*s, name)) {
 			return codeset;
 		}
 	} while (*++s);




More information about the uClibc-cvs mailing list