]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add prototypes for snprintf et al
authorassar <assar>
Fri, 7 Jan 2000 15:59:28 +0000 (15:59 +0000)
committerassar <assar>
Fri, 7 Jan 2000 15:59:28 +0000 (15:59 +0000)
interface.h

index bc4dc596a25e45f99be272bee6b664d16d841349..c3ab42e5b4f9aa79d6e8b535faf9e1334133da3b 100644 (file)
@@ -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.118 1999-12-22 15:44:09 itojun Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.119 2000-01-07 15:59:28 assar Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
 #ifdef HAVE_OS_PROTO_H
 #include "os-proto.h"
 #endif
+#include <sys/types.h>
+#include <sys/time.h>
+
+/* snprintf et al */
+
+#include <stdarg.h>
+
+#if !defined(HAVE_SNPRINTF)
+int snprintf (char *str, size_t sz, const char *format, ...)
+     __attribute__ ((format (printf, 3, 4)));
+#endif
+
+#if !defined(HAVE_VSNPRINTF)
+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
 
 struct tok {
        int v;                  /* value */