Let GCC check format arguments

This commit is contained in:
Sascha Schumann 2003-08-28 05:23:08 +00:00
parent 095efa09af
commit 5ef7cc4cb6
3 changed files with 11 additions and 5 deletions

View file

@ -226,6 +226,12 @@ char *strerror(int);
#define LONG_MIN (- LONG_MAX - 1)
#endif
#ifdef __GNUC__
# define PHP_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first)))
#else
# define PHP_ATTRIBUTE_FORMAT(type, idx, first)
#endif
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF
#include "snprintf.h"
#endif