aboutsummaryrefslogtreecommitdiff
path: root/src/include/pg_config_manual.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/pg_config_manual.h')
-rw-r--r--src/include/pg_config_manual.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h
index 7cf1a643d37..5f4cf93a249 100644
--- a/src/include/pg_config_manual.h
+++ b/src/include/pg_config_manual.h
@@ -154,6 +154,21 @@
*/
#define MAX_RANDOM_VALUE (0x7FFFFFFF)
+/*
+ * Set the format style used by gcc to check printf type functions. We really
+ * want the "gnu_printf" style set, which includes what glibc uses, such
+ * as %m for error strings and %lld for 64 bit long longs. But not all gcc
+ * compilers are known to support it, so we just use "printf" which all
+ * gcc versions alive are known to support, except on Windows where
+ * using "gnu_printf" style makes a dramatic difference. Maybe someday
+ * we'll have a configure test for this, if we ever discover use of more
+ * variants to be necessary.
+ */
+#ifdef WIN32
+#define PG_PRINTF_ATTRIBUTE gnu_printf
+#else
+#define PG_PRINTF_ATTRIBUTE printf
+#endif
/*
*------------------------------------------------------------------------