From b3ad6a015b8fd7668b55d11c1bc3061c2fc67572 Mon Sep 17 00:00:00 2001 From: pouete Date: Wed, 30 Dec 2015 12:19:36 +0100 Subject: [PATCH] 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 --- ConfigureChecks.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b839b715..9109d8fc 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -120,8 +120,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)