summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2019-03-29 19:07:43 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-03-29 19:07:43 -0700
commit6c4de3386ee102040fc567708958a60a9d254b02 (patch)
tree9f16773028ea13178d48e4e86d01a00fd366aa05
parent2d017a68e12acf2463edc9cfbdae0aea3ce477b1 (diff)
Convert check for strcasecmp to normal autoconf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac4
-rw-r--r--src/XKBfileInt.h2
-rw-r--r--src/xkbmisc.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 9611b8c..f33861f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,9 +40,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Checks for library functions.
-AC_CHECK_FUNCS([strndup])
-AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1,
- [Do not have 'strcasecmp'.]))
+AC_CHECK_FUNCS([strcasecmp strndup])
AC_CHECK_FUNC(getc_unlocked, AC_DEFINE([HAVE_UNLOCKED_STDIO], 1,
['Unlocked stdio']), [])
diff --git a/src/XKBfileInt.h b/src/XKBfileInt.h
index c5f5145..e0332cb 100644
--- a/src/XKBfileInt.h
+++ b/src/XKBfileInt.h
@@ -69,7 +69,7 @@ _XkbDupString(const char *s)
#define _XkbStrCaseEqual(s1,s2) (_XkbStrCaseCmp(s1,s2)==0)
-#ifdef NEED_STRCASECMP
+#ifndef HAVE_STRCASECMP
extern int _XkbStrCaseCmp(char *s1, char *s2);
#else
#define _XkbStrCaseCmp strcasecmp
diff --git a/src/xkbmisc.c b/src/xkbmisc.c
index 2f9b532..b025048 100644
--- a/src/xkbmisc.c
+++ b/src/xkbmisc.c
@@ -684,7 +684,7 @@ XkbNameMatchesPattern(char *name, char *ptrn)
return (name[0] == '\0');
}
-#ifdef NEED_STRCASECMP
+#ifndef HAVE_STRCASECMP
_X_HIDDEN int
_XkbStrCaseCmp(char *str1, char *str2)
{