diff --git a/CMakeLists.txt b/CMakeLists.txt index 01b764db..39553f9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,7 +312,6 @@ include(PickyWarnings) # Keep this synced with src/libssh2_setup.h if(WIN32) if(MINGW) - set(HAVE_SNPRINTF 1) set(HAVE_UNISTD_H 1) set(HAVE_INTTYPES_H 1) set(HAVE_SYS_TIME_H 1) @@ -330,11 +329,6 @@ if(WIN32) set(HAVE_STRTOLL 0) set(HAVE_STRTOI64 1) endif() - if(MSVC_VERSION GREATER_EQUAL 1900) - set(HAVE_SNPRINTF 1) - else() - set(HAVE_SNPRINTF 0) - endif() endif() set(HAVE_POLL 0) set(HAVE_SELECT 1) @@ -372,7 +366,6 @@ if(NOT HAVE_STRTOLL) # Try _strtoi64() if strtoll() is not available check_symbol_exists("_strtoi64" "stdlib.h" HAVE_STRTOI64) endif() -check_symbol_exists("snprintf" "stdio.h" HAVE_SNPRINTF) if(NOT WIN32) check_symbol_exists("explicit_bzero" "string.h" HAVE_EXPLICIT_BZERO) check_symbol_exists("explicit_memset" "string.h" HAVE_EXPLICIT_MEMSET) diff --git a/configure.ac b/configure.ac index db4c91f6..282729f0 100644 --- a/configure.ac +++ b/configure.ac @@ -409,7 +409,7 @@ case $host in ;; esac -AC_CHECK_FUNCS(gettimeofday select strtoll explicit_bzero explicit_memset memset_s snprintf) +AC_CHECK_FUNCS(gettimeofday select strtoll explicit_bzero explicit_memset memset_s) dnl Check for select() into ws2_32 for Msys/Mingw if test "$ac_cv_func_select" != "yes"; then diff --git a/os400/libssh2_config.h b/os400/libssh2_config.h index 105f0946..46f44cc3 100644 --- a/os400/libssh2_config.h +++ b/os400/libssh2_config.h @@ -120,10 +120,6 @@ /* Use OS/400 Qc3 */ #define LIBSSH2_OS400QC3 -/* Use our platform-specific local implementation: - _libssh2_os400_snprintf */ -#define HAVE_SNPRINTF 1 - /* Define to the subdirectory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" diff --git a/src/libssh2_config_cmake.h.in b/src/libssh2_config_cmake.h.in index 0c978732..62a40a8d 100644 --- a/src/libssh2_config_cmake.h.in +++ b/src/libssh2_config_cmake.h.in @@ -49,7 +49,6 @@ #cmakedefine HAVE_GETTIMEOFDAY #cmakedefine HAVE_STRTOLL #cmakedefine HAVE_STRTOI64 -#cmakedefine HAVE_SNPRINTF #cmakedefine HAVE_EXPLICIT_BZERO #cmakedefine HAVE_EXPLICIT_MEMSET #cmakedefine HAVE_MEMSET_S diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 29d4bf7a..638c6b73 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -138,12 +138,12 @@ #define SSH2_PRINTF(fmt, arg) #endif -/* Use local implementation when not available */ -#ifdef HAVE_SNPRINTF -#define ssh2_snprintf snprintf -#else +/* Use local implementation with /* Want safe, 'n += snprintf(b + n ...)' like function. Returns number of chars diff --git a/vms/libssh2_config.h b/vms/libssh2_config.h index 8bd0851a..bed3930f 100644 --- a/vms/libssh2_config.h +++ b/vms/libssh2_config.h @@ -29,7 +29,6 @@ typedef unsigned int socklen_t; /* missing in headers on VMS */ #define HAVE_ARPA_INET_H #define HAVE_GETTIMEOFDAY 1 -#define HAVE_SNPRINTF 1 #define POSIX_C_SOURCE