check for isblank() at configuration stage. If not available
provide a suitable replacement for use in our ISBLANK macro
This commit is contained in:
@@ -553,6 +553,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|||||||
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS( bitncmp \
|
AC_CHECK_FUNCS( bitncmp \
|
||||||
|
isblank \
|
||||||
if_indextoname,
|
if_indextoname,
|
||||||
dnl if found
|
dnl if found
|
||||||
[],
|
[],
|
||||||
|
|||||||
@@ -115,7 +115,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
|
#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 ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
|
||||||
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
||||||
#define ISXDIGIT(x) (isxdigit((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 ISUPPER(x) (isupper((int) ((unsigned char)x)))
|
||||||
#define ISLOWER(x) (islower((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.
|
* Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
|
||||||
|
|||||||
@@ -1761,6 +1761,7 @@ AC_CHECK_FUNCS( strtoll \
|
|||||||
getprotobyname \
|
getprotobyname \
|
||||||
getrlimit \
|
getrlimit \
|
||||||
setrlimit \
|
setrlimit \
|
||||||
|
isblank \
|
||||||
fork,
|
fork,
|
||||||
dnl if found
|
dnl if found
|
||||||
[],
|
[],
|
||||||
|
|||||||
@@ -122,7 +122,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
|
#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 ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
|
||||||
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
||||||
#define ISXDIGIT(x) (isxdigit((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 ISUPPER(x) (isupper((int) ((unsigned char)x)))
|
||||||
#define ISLOWER(x) (islower((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.
|
* Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
|
||||||
|
|||||||
Reference in New Issue
Block a user