From 1a6d3ae53f79e3407b33635d26a518c5699362cf Mon Sep 17 00:00:00 2001 From: brarcher Date: Thu, 2 Jan 2014 02:42:55 +0000 Subject: [PATCH] cmake: add checks for remaining printf functions snprintf.c expects several HAVE_* definitions, and by only checking snprintf, most are unavailable which cause linking problems with MSVC git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@993 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a4573a..4386f35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,13 +109,19 @@ check_function_exists(malloc HAVE_MALLOC) check_function_exists(realloc HAVE_REALLOC) check_function_exists(setenv HAVE_DECL_SETENV) check_function_exists(sigaction HAVE_SIGACTION) -check_function_exists(snprintf HAVE_SNPRINTF) check_function_exists(strdup HAVE_DECL_STRDUP) check_function_exists(strsignal HAVE_DECL_STRSIGNAL) check_function_exists(_getpid HAVE__GETPID) check_function_exists(_localtime64_s HAVE__LOCALTIME64_S) check_function_exists(_strdup HAVE__STRDUP) +# printf related checks +check_function_exists(snprintf HAVE_SNPRINTF) +check_function_exists(vsnprintf HAVE_VSNPRINTF) +check_function_exists(vasnprintf HAVE_VASNPRINTF) +check_function_exists(asprintf HAVE_ASPRINTF) +check_function_exists(vasprintf HAVE_VASPRINTF) + if(HAVE_FORK) add_definitions(-DHAVE_FORK=1) set(HAVE_FORK 1) -- 2.40.0