From 2b0c9995e4df8440f72b7522b14c838c83b814b5 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 2 Jan 2001 22:47:04 +0000 Subject: [PATCH] Patch from Pekka Savola to keep from dragging in our version of "snprintf()" unless the platform on which we're running lacks "snprintf()" or "vsnprintf()" - if it lacks one of the "asprintf" family of routines, we don't drag it in, as we don't use those routines. --- config.h.in | 12 ------------ configure | 6 +++--- interface.h | 22 +--------------------- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/config.h.in b/config.h.in index e113bcee..79fb02b3 100644 --- a/config.h.in +++ b/config.h.in @@ -98,12 +98,6 @@ /* The number of bytes in a short. */ #undef SIZEOF_SHORT -/* Define if you have the asnprintf function. */ -#undef HAVE_ASNPRINTF - -/* Define if you have the asprintf function. */ -#undef HAVE_ASPRINTF - /* Define if you have the bpf_dump function. */ #undef HAVE_BPF_DUMP @@ -158,12 +152,6 @@ /* Define if you have the strlcpy function. */ #undef HAVE_STRLCPY -/* Define if you have the vasnprintf function. */ -#undef HAVE_VASNPRINTF - -/* Define if you have the vasprintf function. */ -#undef HAVE_VASPRINTF - /* Define if you have the vfprintf function. */ #undef HAVE_VFPRINTF diff --git a/configure b/configure index 688f6de8..38386ce9 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.130 +# From configure.in Revision: 1.131 @@ -3010,7 +3010,7 @@ EOF fi needsnprintf=no -for ac_func in vsnprintf snprintf asprintf asnprintf vasprintf vasnprintf +for ac_func in vsnprintf snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3017: checking for $ac_func" >&5 @@ -4019,7 +4019,7 @@ fi else V_PCAPDEP=$libpcap if test -r $d/pcap.h; then - V_INCLS="-I$d $V_INCLS" + V_INCLS="-I$d $V_INCLS" elif test -r $srcdir/../libpcap/pcap.h; then V_INCLS="-I$d -I$srcdir/../libpcap $V_INCLS" else diff --git a/interface.h b/interface.h index 8aa556b9..860c4d88 100644 --- a/interface.h +++ b/interface.h @@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.148 2000-12-21 10:43:21 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.149 2001-01-02 22:47:06 guy Exp $ (LBL) */ #ifndef tcpdump_interface_h @@ -48,26 +48,6 @@ int vsnprintf (char *str, size_t sz, const char *format, va_list ap) __attribute__((format (printf, 3, 0))); #endif -#if !defined(HAVE_ASPRINTF) -int asprintf (char **ret, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); -#endif - -#if !defined(HAVE_VASPRINTF) -int vasprintf (char **ret, const char *format, va_list ap) - __attribute__((format (printf, 2, 0))); -#endif - -#if !defined(HAVE_ASNPRINTF) -int asnprintf (char **ret, size_t max_sz, const char *format, ...) - __attribute__ ((format (printf, 3, 4))); -#endif - -#if !defined(HAVE_VASNPRINTF) -int vasnprintf (char **ret, size_t max_sz, const char *format, va_list ap) - __attribute__((format (printf, 3, 0))); -#endif - #ifndef HAVE_STRLCAT extern size_t strlcat (char *, const char *, size_t); #endif -- 2.39.5