]> granicus.if.org Git - check/commitdiff
cmake: add checks for remaining printf functions
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 2 Jan 2014 02:42:55 +0000 (02:42 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 2 Jan 2014 02:42:55 +0000 (02:42 +0000)
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

index 2a4573add5865cca19a0305a30b830d03e2fdb3d..4386f35c8aca453d2f547dc115cbcd3d3f468701 100644 (file)
@@ -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)