diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-06 14:53:37 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-12-06 14:53:37 +0000 |
commit | 92a148d641dced0bdb03bc9e6166356499e49f80 (patch) | |
tree | c3ac0e234053bd85b9d4dbbd2d50d84b227a47d0 /libc | |
parent | 0c091da2f8c2745c97d0069cfa4acae169d57b41 (diff) |
Make use internal str*casecmp/wcscoll
Diffstat (limited to 'libc')
-rw-r--r-- | libc/inet/resolv.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/ruserpass.c | 13 | ||||
-rw-r--r-- | libc/misc/regex/regex.c | 2 | ||||
-rw-r--r-- | libc/misc/regex/regex_old.c | 1 | ||||
-rw-r--r-- | libc/misc/wchar/wchar.c | 4 |
5 files changed, 9 insertions, 13 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index a6dc549b8..d2f90a270 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -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; diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index b6fd482c5..70a86969b 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -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; diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c index bf8958a66..789e78b49 100644 --- a/libc/misc/regex/regex.c +++ b/libc/misc/regex/regex.c @@ -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*/; diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c index 69b77c4c3..486e29c40 100644 --- a/libc/misc/regex/regex_old.c +++ b/libc/misc/regex/regex_old.c @@ -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 diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 1691e00e0..9f3da8626 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -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); |