aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-02-13 19:01:03 +0000
committerYang Tse <yangsita@gmail.com>2007-02-13 19:01:03 +0000
commitbe71ccbce3a0e9c9ca13665b0c6b8dd7b7febe7b (patch)
tree84837223f1d37c6d0d71237b2fd60d972fa5dba6 /ares
parent0db485a44836903c2854fc8c559e7874e5b9e4f0 (diff)
check for isblank() at configuration stage. If not available
provide a suitable replacement for use in our ISBLANK macro
Diffstat (limited to 'ares')
-rw-r--r--ares/configure.ac1
-rw-r--r--ares/setup_once.h8
2 files changed, 8 insertions, 1 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.