diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | utils.c | 29 | ||||
-rw-r--r-- | utils.h | 5 |
3 files changed, 1 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index cf90f71..3758b62 100644 --- a/configure.ac +++ b/configure.ac @@ -44,8 +44,6 @@ if test ! -f "cfgparse.c"; then fi fi -AC_CHECK_FUNCS([strcasecmp]) - # Checks for pkg-config packages PKG_CHECK_MODULES(XKBEVD, xkbfile x11) @@ -125,32 +125,3 @@ uInternalError(const char *s, ...) /***====================================================================***/ -#ifndef HAVE_STRCASECMP -int -uStrCaseCmp(const char *str1, const char *str2) -{ - char buf1[512], buf2[512]; - - char c, *s; - - register int n; - - for (n = 0, s = buf1; (c = *str1++); n++) { - if (isupper(c)) - c = tolower(c); - if (n > 510) - break; - *s++ = c; - } - *s = '\0'; - for (n = 0, s = buf2; (c = *str2++); n++) { - if (isupper(c)) - c = tolower(c); - if (n > 510) - break; - *s++ = c; - } - *s = '\0'; - return (strcmp(buf1, buf2)); -} -#endif @@ -39,6 +39,7 @@ #include <X11/Xfuncs.h> #include <stdarg.h> #include <stddef.h> +#include <strings.h> _XFUNCPROTOBEGIN @@ -94,11 +95,7 @@ extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2); #define uStringPrefix(p,s) (strncmp(p,s,strlen(p))==0) #define uStringCompare(s1,s2) (strcmp(s1,s2)) #define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) -#ifdef HAVE_STRCASECMP #define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) -#else -extern int uStrCaseCmp(const char *s1, const char *s2); -#endif #define uStringDup(s1) (strdup(s1)) /***====================================================================***/ |