OSDN Git Service

Make use internal str*casecmp/wcscoll
authorPeter S. Mazinger <ps.m@gmx.net>
Tue, 6 Dec 2005 14:53:37 +0000 (14:53 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Tue, 6 Dec 2005 14:53:37 +0000 (14:53 -0000)
libc/inet/resolv.c
libc/inet/rpc/ruserpass.c
libc/misc/regex/regex.c
libc/misc/regex/regex_old.c
libc/misc/wchar/wchar.c

index a6dc549..d2f90a2 100644 (file)
@@ -1535,7 +1535,7 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, const char * name, int type,
                } 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;
index b6fd482..70a8696 100644 (file)
@@ -149,18 +149,11 @@ next:
                         * 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;
index bf8958a..789e78b 100644 (file)
@@ -54,6 +54,8 @@ extern int __iswctype (wint_t __wc, wctype_t __desc) /*attribute_hidden*/;
 #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*/;
index 69b77c4..486e29c 100644 (file)
@@ -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
index 1691e00..9f3da86 100644 (file)
@@ -1267,7 +1267,7 @@ static int find_codeset(const char *name)
        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 @@ static int find_codeset(const char *name)
        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);