summaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
authorAndrew Dunstan2011-04-28 14:56:14 +0000
committerAndrew Dunstan2011-04-28 14:56:14 +0000
commitc02d5b7c27d740830379244db4b9ef111bbf0fc8 (patch)
treef1de6c2b7db8181b7d703fc5bd6732ffecda3c8c /src/include/c.h
parent39850c7fdb82bd7c64dbb759c5754e29fc0af5f2 (diff)
Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions.
The style is set to "printf" for backwards compatibility everywhere except on Windows, where it is set to "gnu_printf", which eliminates hundreds of false error messages from modern versions of gcc arising from %m and %ll{d,u} formats.
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/c.h b/src/include/c.h
index af1be9499e..0391860846 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -773,7 +773,7 @@ typedef NameData *Name;
extern int
snprintf(char *str, size_t count, const char *fmt,...)
/* This extension allows gcc to check the format string */
-__attribute__((format(printf, 3, 4)));
+__attribute__((format(PG_PRINTF_ATTRIBUTE, 3, 4)));
#endif
#if !HAVE_DECL_VSNPRINTF