]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Do not require vsnprintf().
authorDenis Ovsienko <[email protected]>
Fri, 17 Feb 2023 08:56:15 +0000 (08:56 +0000)
committerDenis Ovsienko <[email protected]>
Fri, 17 Feb 2023 08:56:15 +0000 (08:56 +0000)
The check for vsnprintf() has been in the configure script since commit
8cb054c in 2000, and the only actual use of the function was in the
"#ifndef HAVE_SNPRINTF" block in missing/snprintf.c until commit 1ed63b5
in 2019.  Since then tcpdump does not require vsnprintf() in any way.

CMakeLists.txt
configure.ac

index 2cfe40e97cb8695d8ff069b35b1066276c33a0a7..a707f67ff14ee02f8defbfec1a73cabf8cf49d82 100644 (file)
@@ -405,15 +405,11 @@ endif(STDLIBS_HAVE_GETSERVENT)
 cmake_pop_check_state()
 
 #
-# Make sure we have vsnprintf() and snprintf(); we require them.
-# We use check_symbol_exists(), as they aren't necessarily external
-# functions - in Visual Studio, for example, they're inline functions
-# calling a common external function.
-#
-check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
-if(NOT HAVE_VSNPRINTF)
-    message(FATAL_ERROR "vsnprintf() is required but wasn't found")
-endif(NOT HAVE_VSNPRINTF)
+# Make sure we have snprintf(); we require it.
+# We use check_symbol_exists(), as it isn't necessarily an external
+# function - in Visual Studio, for example, it is an inline function
+# calling an external function.
+#
 check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
 if(NOT HAVE_SNPRINTF)
     message(FATAL_ERROR "snprintf() is required but wasn't found")
index 73e5f79f87ded819ebc3168815a7770c83ace6f3..64cc182f4972f83adf7ee5801c7f032d0a557011 100644 (file)
@@ -425,10 +425,8 @@ AC_CHECK_FUNCS(fork vfork)
 AC_CHECK_FUNCS(setlinebuf)
 
 #
-# Make sure we have vsnprintf() and snprintf(); we require them.
+# Make sure we have snprintf(); we require it.
 #
-AC_CHECK_FUNC(vsnprintf,,
-    AC_MSG_ERROR([vsnprintf() is required but wasn't found]))
 AC_CHECK_FUNC(snprintf,,
     AC_MSG_ERROR([snprintf() is required but wasn't found]))