diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-22 11:34:30 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-22 11:34:30 -0700 |
commit | f1559aca5e9720f0a253ffbfbf1aaa55807c2494 (patch) | |
tree | a2db6e9c95df38187a754b6963ff1ba70b9c087d | |
parent | 29396321dad13c4edddc8d3a8de2baf07b0e0c8d (diff) |
It has been required since Unix98/SUSv2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/app/xkbutils/-/merge_requests/7>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | utils.c | 31 | ||||
-rw-r--r-- | utils.h | 6 |
3 files changed, 1 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac index 01096c1..0cbfc40 100644 --- a/configure.ac +++ b/configure.ac @@ -38,8 +38,6 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AC_CHECK_FUNCS([strcasecmp]) - # xkbvleds checks PKG_CHECK_MODULES(XKBVLEDS, [xproto >= 7.0.17 xaw7 xt x11]) @@ -123,34 +123,3 @@ uInternalError(const char *s, ...) va_end(ap); return; } - -/***====================================================================***/ - -#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 @@ -65,12 +66,7 @@ extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); /***====================================================================***/ #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 /***====================================================================***/ |