diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-22 12:16:06 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-04-22 12:16:06 -0700 |
commit | 61bde5017786d60df7cc377a3b9f2e6bb11caeef (patch) | |
tree | e5b03bded6e0760bbedd8547b839beea7ff80ba9 | |
parent | caffed31bcc00bb588ee3bc956a93f80da80fdc6 (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/xmodmap/-/merge_requests/6>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | handle.c | 24 |
2 files changed, 1 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac index b977f04..4519639 100644 --- a/configure.ac +++ b/configure.ac @@ -41,7 +41,7 @@ m4_ifndef([XORG_MACROS_VERSION], XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -AC_CHECK_FUNCS([strncasecmp asprintf]) +AC_CHECK_FUNCS([asprintf]) # Checks for pkg-config packages PKG_CHECK_MODULES(XMODMAP, [x11 xproto >= 7.0.25]) @@ -38,10 +38,7 @@ from The Open Group. #include "wq.h" #include <stdlib.h> #include <stdint.h> - -#ifdef HAVE_STRNCASECMP #include <strings.h> -#endif static XModifierKeymap *map = NULL; @@ -830,27 +827,6 @@ do_clear(char *line, int len) add_to_work_queue (uop); } -#ifndef HAVE_STRNCASECMP -static int -strncasecmp(const char *a, const char *b, int n) -{ - int i; - int a1, b1; - - for (i = 0; i < n; i++, a++, b++) { - if (!*a) return -1; - if (!*b) return 1; - - if (*a != *b) { - a1 = (isascii(*a) && isupper(*a)) ? tolower(*a) : *a; - b1 = (isascii(*b) && isupper(*b)) ? tolower(*b) : *b; - if (a1 != b1) return b1 - a1; - } - } - return 0; -} -#endif - /* * do_pointer = get list of numbers of the form * |