diff options
author | Andreas Schneider <asn@cynapses.org> | 2010-09-02 11:50:21 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-09-02 11:50:21 +0200 |
commit | f97928c7409b8135f9fe85b67400a1dde5292621 (patch) | |
tree | 59f137678c76a3bd9577dc6aea6e4a7134f070b5 | |
parent | bca73b8340358fbf3e8005eb77dc015c7348ff99 (diff) | |
download | libssh-f97928c7409b8135f9fe85b67400a1dde5292621.tar.gz libssh-f97928c7409b8135f9fe85b67400a1dde5292621.tar.xz libssh-f97928c7409b8135f9fe85b67400a1dde5292621.zip |
build: Fixed checking for printf function on Windows.
-rw-r--r-- | ConfigureChecks.cmake | 22 | ||||
-rw-r--r-- | config.h.cmake | 9 |
2 files changed, 20 insertions, 11 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 6a8ab240..93a6897a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -35,17 +35,6 @@ if (WIN32) set(HAVE_GETHOSTBYNAME TRUE) endif (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H) - check_function_exists(vsnprintf HAVE_VSNPRINTF) - check_function_exists(snprintf HAVE_SNPRINTF) - - if (WIN32) - check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S) - check_function_exists(_vsnprintf HAVE__VSNPRINTF) - check_function_exists(_snprintf HAVE__SNPRINTF) - check_function_exists(_snprintf_s HAVE__SNPRINTF_S) - endif (WIN32) - check_function_exists(strncpy HAVE_STRNCPY) - set(HAVE_SELECT TRUE) endif (WIN32) @@ -64,6 +53,17 @@ endif (CMAKE_HAVE_PTHREAD_H) # FUNCTIONS +check_function_exists(strncpy HAVE_STRNCPY) +check_function_exists(vsnprintf HAVE_VSNPRINTF) +check_function_exists(snprintf HAVE_SNPRINTF) + +if (WIN32) + check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S) + check_function_exists(_vsnprintf HAVE__VSNPRINTF) + check_function_exists(_snprintf HAVE__SNPRINTF) + check_function_exists(_snprintf_s HAVE__SNPRINTF_S) +endif (WIN32) + if (UNIX) # libsocket (Solaris) check_library_exists(socket getaddrinfo "" HAVE_LIBSOCKET) diff --git a/config.h.cmake b/config.h.cmake index 44f0e459..ba98214e 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -41,6 +41,15 @@ /*************************** FUNCTIONS ***************************/ +/* Define to 1 if you have the `snprintf' function. */ +#cmakedefine HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `_snprintf' function. */ +#cmakedefine HAVE__SNPRINTF 1 + +/* Define to 1 if you have the `_snprintf_s' function. */ +#cmakedefine HAVE__SNPRINTF_S 1 + /* Define to 1 if you have the `vsnprintf' function. */ #cmakedefine HAVE_VSNPRINTF 1 |