mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
build: drop unused snprintf() feature check on Windows
Follow-up to 64f28b8f88 #20765
Closes #20790
This commit is contained in:
parent
30ec220a68
commit
d557c06b52
@ -33,7 +33,6 @@ if(MINGW)
|
||||
set(HAVE_GETTIMEOFDAY 1)
|
||||
set(HAVE_LIBGEN_H 1)
|
||||
set(HAVE_OPENDIR 1)
|
||||
set(HAVE_SNPRINTF 1)
|
||||
set(HAVE_STDBOOL_H 1)
|
||||
set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size()
|
||||
set(HAVE_STDINT_H 1) # detected by CMake internally in check_type_size()
|
||||
@ -60,11 +59,6 @@ else()
|
||||
set(HAVE_STDBOOL_H 0)
|
||||
endif()
|
||||
set(HAVE_BOOL_T "${HAVE_STDBOOL_H}")
|
||||
if(MSVC_VERSION GREATER_EQUAL 1900)
|
||||
set(HAVE_SNPRINTF 1)
|
||||
else()
|
||||
set(HAVE_SNPRINTF 0)
|
||||
endif()
|
||||
set(HAVE_BASENAME 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -1633,6 +1633,7 @@ if(NOT WIN32)
|
||||
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h
|
||||
check_function_exists("realpath" HAVE_REALPATH)
|
||||
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
|
||||
check_function_exists("snprintf" HAVE_SNPRINTF) # to match detection method in ./configure
|
||||
check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
|
||||
check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
|
||||
check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
|
||||
@ -1646,11 +1647,6 @@ if(NOT _ssl_enabled)
|
||||
check_symbol_exists("arc4random" "${CURL_INCLUDES};stdlib.h" HAVE_ARC4RANDOM)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
check_function_exists("snprintf" HAVE_SNPRINTF) # to match detection method in ./configure
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1900) # Earlier MSVC compilers had faulty snprintf implementations
|
||||
check_symbol_exists("snprintf" "stdio.h" HAVE_SNPRINTF) # snprintf may be a compatibility macro, not an exported function
|
||||
endif()
|
||||
if(APPLE)
|
||||
check_function_exists("mach_absolute_time" HAVE_MACH_ABSOLUTE_TIME)
|
||||
endif()
|
||||
|
||||
@ -4190,7 +4190,6 @@ AC_CHECK_FUNCS([\
|
||||
sendmsg \
|
||||
setlocale \
|
||||
setrlimit \
|
||||
snprintf \
|
||||
utime \
|
||||
utimes \
|
||||
])
|
||||
@ -4200,6 +4199,7 @@ if test "$curl_cv_native_windows" != "yes"; then
|
||||
if_nametoindex \
|
||||
realpath \
|
||||
sched_yield \
|
||||
snprintf \
|
||||
])
|
||||
CURL_CHECK_FUNC_INET_NTOP
|
||||
CURL_CHECK_FUNC_INET_PTON
|
||||
|
||||
@ -159,11 +159,6 @@
|
||||
/* Define to the function return type for send. */
|
||||
#define SEND_TYPE_RETV int
|
||||
|
||||
/* Define to 1 if you have the snprintf function. */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__MINGW32__)
|
||||
#define HAVE_SNPRINTF 1
|
||||
#endif
|
||||
|
||||
/* Must always use local implementations on Windows. */
|
||||
/* Define to 1 if you have an IPv6 capable working inet_ntop function. */
|
||||
/* #undef HAVE_INET_NTOP */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user