summaryrefslogtreecommitdiff
path: root/main/php.h
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-08-28 05:23:08 +0000
committerSascha Schumann <sas@php.net>2003-08-28 05:23:08 +0000
commit5ef7cc4cb6b064828f1cd8d54eb97891142f9da4 (patch)
tree5007c71a82de70e4cca1f50c3c8d3240adc621b4 /main/php.h
parent095efa09afdff99b50f9ec58d37e93587bd8dd48 (diff)
downloadphp-git-5ef7cc4cb6b064828f1cd8d54eb97891142f9da4.tar.gz
Let GCC check format arguments
Diffstat (limited to 'main/php.h')
-rw-r--r--main/php.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/php.h b/main/php.h
index 86fff71683..67206f76f2 100644
--- a/main/php.h
+++ b/main/php.h
@@ -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