check for isblank() at configuration stage. If not available
authorYang Tse <yangsita@gmail.com>
Tue, 13 Feb 2007 19:01:03 +0000 (19:01 +0000)
committerYang Tse <yangsita@gmail.com>
Tue, 13 Feb 2007 19:01:03 +0000 (19:01 +0000)
provide a suitable replacement for use in our ISBLANK macro

configure.ac
setup_once.h

index 0165c5e..78f239f 100644 (file)
@@ -553,6 +553,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
 
 
 AC_CHECK_FUNCS( bitncmp \
+                isblank \
                 if_indextoname,
 dnl if found
 [],
index 187f5e1..9d39085 100644 (file)
  */
 
 #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)))
 #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.