diff options
author | Yang Tse <yangsita@gmail.com> | 2007-02-13 19:01:03 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-02-13 19:01:03 +0000 |
commit | 902d0283b78f0afae06b6099818da3180af4938d (patch) | |
tree | df47f82f0f8c0f21563c9d7db2bfc5ace2513c45 /setup_once.h | |
parent | 2bd57a6d3079af9235f84b2bacced2794f8acdd3 (diff) | |
download | c-ares-902d0283b78f0afae06b6099818da3180af4938d.tar.gz c-ares-902d0283b78f0afae06b6099818da3180af4938d.tar.bz2 c-ares-902d0283b78f0afae06b6099818da3180af4938d.zip |
check for isblank() at configuration stage. If not available
provide a suitable replacement for use in our ISBLANK macro
Diffstat (limited to 'setup_once.h')
-rw-r--r-- | setup_once.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/setup_once.h b/setup_once.h index 187f5e1..9d39085 100644 --- a/setup_once.h +++ b/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. |