wireshark/snprintf.h
Guy Harris cc21ec8124 Do __attribute__ stuff if the GCC version number is greater than or
equal to 2, not just if it's equal to 2 - GCC 3.0 makes it 3, not 2....

svn path=/trunk/; revision=3765
2001-07-22 10:25:50 +00:00

25 lines
532 B
C

/*
* $Id: snprintf.h,v 1.6 2001/07/22 10:25:48 guy Exp $
*/
#ifndef __ETHEREAL_SNPRINTF_H__
#define __ETHEREAL_SNPRINTF_H__
#if defined(HAVE_STDARG_H)
# include <stdarg.h>
#else
# include <varargs.h>
#endif
extern int vsnprintf(char *string, size_t length, const char * format,
va_list args);
#if __GNUC__ >= 2
extern int snprintf(char *string, size_t length, const char * format, ...)
__attribute__((format (printf, 3, 4)));
#else
extern int snprintf(char *string, size_t length, const char * format, ...);
#endif
#endif