diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-10-30 17:30:07 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-10-30 17:30:07 +0100 |
commit | cfea3813071755c8a17985d8bae7447b30c95790 (patch) | |
tree | 3d6e5c35dc8fc64919715e44c096f1a009074efd | |
parent | 099b914fd9e3859d170a4f1bdb21ef0ba994b6f8 (diff) | |
download | libssh-cfea3813071755c8a17985d8bae7447b30c95790.tar.gz libssh-cfea3813071755c8a17985d8bae7447b30c95790.tar.xz libssh-cfea3813071755c8a17985d8bae7447b30c95790.zip |
cmake: Check for isblank().
-rw-r--r-- | ConfigureChecks.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | include/libssh/priv.h | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 1c89c4c7..e5233eeb 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -93,6 +93,7 @@ endif (NOT WITH_GCRYPT) # FUNCTIONS +check_function_exists(isblank HAVE_ISBLANK) check_function_exists(strncpy HAVE_STRNCPY) check_function_exists(vsnprintf HAVE_VSNPRINTF) check_function_exists(snprintf HAVE_SNPRINTF) diff --git a/config.h.cmake b/config.h.cmake index f7f8957f..1835e070 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -79,6 +79,9 @@ /* Define to 1 if you have the `_vsnprintf_s' function. */ #cmakedefine HAVE__VSNPRINTF_S 1 +/* Define to 1 if you have the `isblank' function. */ +#cmakedefine HAVE_ISBLANK 1 + /* Define to 1 if you have the `strncpy' function. */ #cmakedefine HAVE_STRNCPY 1 diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 43f749bb..364f8e97 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -67,7 +67,9 @@ # define strcasecmp _stricmp # define strncasecmp _strnicmp -# define isblank(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r') +# if ! defined(HAVE_ISBLANK) +# define isblank(ch) ((ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r') +# endif # define usleep(X) Sleep(((X)+1000)/1000) |