aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ares/configure.ac1
-rw-r--r--ares/setup_once.h8
-rw-r--r--configure.ac1
-rw-r--r--lib/setup_once.h8
4 files changed, 16 insertions, 2 deletions
diff --git a/ares/configure.ac b/ares/configure.ac
index 0165c5e90..78f239f25 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -553,6 +553,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
AC_CHECK_FUNCS( bitncmp \
+ isblank \
if_indextoname,
dnl if found
[],
diff --git a/ares/setup_once.h b/ares/setup_once.h
index 187f5e1b5..9d3908550 100644
--- a/ares/setup_once.h
+++ b/ares/setup_once.h
@@ -115,7 +115,6 @@
*/
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
-#define ISBLANK(x) (isblank((int) ((unsigned char)x)))
#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
@@ -125,6 +124,13 @@
#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
#define ISLOWER(x) (islower((int) ((unsigned char)x)))
+#ifdef HAVE_ISBLANK
+#define ISBLANK(x) (isblank((int) ((unsigned char)x)))
+#else
+#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
+ (((unsigned char)x) == '\t'))
+#endif
+
/*
* Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
diff --git a/configure.ac b/configure.ac
index 983bf540f..52efa5161 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1761,6 +1761,7 @@ AC_CHECK_FUNCS( strtoll \
getprotobyname \
getrlimit \
setrlimit \
+ isblank \
fork,
dnl if found
[],
diff --git a/lib/setup_once.h b/lib/setup_once.h
index 1c4d6c99c..827a6901e 100644
--- a/lib/setup_once.h
+++ b/lib/setup_once.h
@@ -122,7 +122,6 @@
*/
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
-#define ISBLANK(x) (isblank((int) ((unsigned char)x)))
#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
@@ -132,6 +131,13 @@
#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
#define ISLOWER(x) (islower((int) ((unsigned char)x)))
+#ifdef HAVE_ISBLANK
+#define ISBLANK(x) (isblank((int) ((unsigned char)x)))
+#else
+#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
+ (((unsigned char)x) == '\t'))
+#endif
+
/*
* Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.