diff options
author | Andreas Schneider <asn@cynapses.org> | 2010-07-13 15:10:19 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-08-03 18:13:59 +0200 |
commit | 296f6a9217cb7afa080edb0efc16d309db77c06b (patch) | |
tree | 85395c82c66a1292d99a751a2a94f65b940ba8fb /ConfigureChecks.cmake | |
parent | d688ed2553cd756d9e0bdacd62145d1e9e1f1367 (diff) | |
download | libssh-296f6a9217cb7afa080edb0efc16d309db77c06b.tar.gz libssh-296f6a9217cb7afa080edb0efc16d309db77c06b.tar.xz libssh-296f6a9217cb7afa080edb0efc16d309db77c06b.zip |
build: Fixed the Windows preprocessor macros and defines.
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 2506546f..4594153e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -16,9 +16,9 @@ set(SYSCONFDIR ${SYSCONF_INSTALL_DIR}) set(BINARYDIR ${CMAKE_BINARY_DIR}) set(SOURCEDIR ${CMAKE_SOURCE_DIR}) -if(CMAKE_COMPILER_IS_GNUCC) +if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW) check_c_compiler_flag("-fvisibility=hidden" WITH_VISIBILITY_HIDDEN) -endif(CMAKE_COMPILER_IS_GNUCC) +endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW) # HEADER FILES check_include_file(argp.h HAVE_ARGP_H) @@ -36,11 +36,14 @@ if (WIN32) endif (HAVE_WSPIAPI_H OR HAVE_WS2TCPIP_H) check_function_exists(vsnprintf HAVE_VSNPRINTF) - if(NOT HAVE_VSNPRINTF) + check_function_exists(snprintf HAVE_SNPRINTF) + + if (WIN32) check_function_exists(_vsnprintf_s HAVE__VSNPRINTF_S) check_function_exists(_vsnprintf HAVE__VSNPRINTF) - endif(NOT 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) |