diff options
Diffstat (limited to 'src/include/c.h')
-rw-r--r-- | src/include/c.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/c.h b/src/include/c.h index 1e50103095b..0a4757e29fd 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -126,10 +126,14 @@ /* GCC and XLC support format attributes */ #if defined(__GNUC__) || defined(__IBMC__) #define pg_attribute_format_arg(a) __attribute__((format_arg(a))) -#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a))) +/* Use for functions wrapping stdio's printf, which often doesn't take %m: */ +#define pg_attribute_printf(f,a) __attribute__((format(printf, f, a))) +/* Use for elog/ereport, which implement %m for themselves: */ +#define pg_attribute_printf_m(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE_M, f, a))) #else #define pg_attribute_format_arg(a) #define pg_attribute_printf(f,a) +#define pg_attribute_printf_m(f,a) #endif /* GCC, Sunpro and XLC support aligned, packed and noreturn */ |