aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpouete <pouete@pouete.net>2015-12-30 12:19:36 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2015-12-30 19:51:26 +0100
commit32b72555eee588d526adc54f4a810bebec265b34 (patch)
tree175bd7477a54195999ad79955910944ab609057a
parent32af6a2390702fffc6e6a4415508205a6b2a2f72 (diff)
downloadlibssh-32b72555eee588d526adc54f4a810bebec265b34.tar.gz
libssh-32b72555eee588d526adc54f4a810bebec265b34.tar.xz
libssh-32b72555eee588d526adc54f4a810bebec265b34.zip
cmake: use check_symbol for (v)snprintf
Updated how snprintf and vsnprintf are discovered by cmake. Visual studio 2015 now include it in the file stdio.h. More information here : https://msdn.microsoft.com/en-us/library/bb531344.aspx Reviewed-By: Aris Adamantiadis <aris@0xbadc0de.be>
-rw-r--r--ConfigureChecks.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index cce68064..7d306872 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -111,8 +111,9 @@ endif (NOT WITH_GCRYPT)
check_function_exists(isblank HAVE_ISBLANK)
check_function_exists(strncpy HAVE_STRNCPY)
-check_function_exists(vsnprintf HAVE_VSNPRINTF)
-check_function_exists(snprintf HAVE_SNPRINTF)
+
+check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
+check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
if (WIN32)
check_function_exists(_strtoui64 HAVE__STRTOUI64)