]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
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

ares/configure.ac
ares/setup_once.h
configure.ac
lib/setup_once.h

index 0165c5e902263c8e9b9edb612932675068c2e65d..78f239f25e539637edd6183b88e7341569b2988b 100644 (file)
@@ -553,6 +553,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
 
 
 AC_CHECK_FUNCS( bitncmp \
+                isblank \
                 if_indextoname,
 dnl if found
 [],
index 187f5e1b50c1dbbd71868f5c3e2334ac39563348..9d3908550add7c145ec5d881afa460588643cd6d 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.
index 983bf540fa69717614d98d04cfb902b8732bacc4..52efa51615ce6a192f219cce9ed25a2c2617fe8a 100644 (file)
@@ -1761,6 +1761,7 @@ AC_CHECK_FUNCS( strtoll \
                 getprotobyname \
                 getrlimit \
                 setrlimit \
+                isblank \
                 fork,
 dnl if found
 [],
index 1c4d6c99cc9af3de1788a02d0ad3ccdbac594f31..827a6901e582c0a7af1c53bf85e89459f76c798d 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.