|
6 | 6 | * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California
|
8 | 8 | *
|
9 |
| - * $PostgreSQL: pgsql/src/include/port.h,v 1.71 2005/03/1117:20:34 momjian Exp $ |
| 9 | + * $PostgreSQL: pgsql/src/include/port.h,v 1.72 2005/03/1119:13:42 momjian Exp $ |
10 | 10 | *
|
11 | 11 | *-------------------------------------------------------------------------
|
12 | 12 | */
|
@@ -112,17 +112,27 @@ extern int pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
|
112 | 112 | externintpg_snprintf(char*str,size_tcount,constchar*fmt,...)
|
113 | 113 | /* This extension allows gcc to check the format string */
|
114 | 114 | __attribute__((format(printf,3,4)));
|
| 115 | +externintpg_fprintf(FILE*stream,constchar*fmt,...) |
| 116 | +/* This extension allows gcc to check the format string */ |
| 117 | +__attribute__((format(printf,2,3))); |
115 | 118 | externintpg_printf(constchar*fmt,...)
|
116 | 119 | /* This extension allows gcc to check the format string */
|
117 | 120 | __attribute__((format(printf,1,2)));
|
118 | 121 |
|
| 122 | +/* |
| 123 | + *The GCC-specific code below prevents the __attribute__(... 'printf') |
| 124 | + *above from being replaced, and this is required because gcc doesn't |
| 125 | + *know anything about pg_printf. |
| 126 | + */ |
119 | 127 | #ifdef__GNUC__
|
120 |
| -#definevsnprintf(...)pg_vsnprintf(__VA_ARGS__) |
| 128 | +#definevsnprintf(...)pg_vsnprintf(__VA_ARGS__) |
121 | 129 | #definesnprintf(...)pg_snprintf(__VA_ARGS__)
|
| 130 | +#definefprintf(...)pg_fprintf(__VA_ARGS__) |
122 | 131 | #defineprintf(...)pg_printf(__VA_ARGS__)
|
123 | 132 | #else
|
124 | 133 | #definevsnprintfpg_vsnprintf
|
125 | 134 | #definesnprintfpg_snprintf
|
| 135 | +#definefprintfpg_fprintf |
126 | 136 | #defineprintfpg_printf
|
127 | 137 | #endif
|
128 | 138 | #endif
|
|