@@ -169,6 +169,9 @@ extern unsigned char pg_ascii_tolower(unsigned char ch);
169
169
#ifdef snprintf
170
170
#undef snprintf
171
171
#endif
172
+ #ifdef vsprintf
173
+ #undef vsprintf
174
+ #endif
172
175
#ifdef sprintf
173
176
#undef sprintf
174
177
#endif
@@ -187,6 +190,7 @@ extern int
187
190
pg_snprintf (char * str , size_t count , const char * fmt ,...)
188
191
/* This extension allows gcc to check the format string */
189
192
__attribute__((format (PG_PRINTF_ATTRIBUTE , 3 , 4 )));
193
+ extern int pg_vsprintf (char * str , const char * fmt , va_list args );
190
194
extern int
191
195
pg_sprintf (char * str , const char * fmt ,...)
192
196
/* This extension allows gcc to check the format string */
@@ -209,13 +213,15 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
209
213
#ifdef __GNUC__
210
214
#define vsnprintf (...) pg_vsnprintf(__VA_ARGS__)
211
215
#define snprintf (...) pg_snprintf(__VA_ARGS__)
216
+ #define vsprintf (...) pg_vsprintf(__VA_ARGS__)
212
217
#define sprintf (...) pg_sprintf(__VA_ARGS__)
213
218
#define vfprintf (...) pg_vfprintf(__VA_ARGS__)
214
219
#define fprintf (...) pg_fprintf(__VA_ARGS__)
215
220
#define printf (...) pg_printf(__VA_ARGS__)
216
221
#else
217
222
#define vsnprintf pg_vsnprintf
218
223
#define snprintf pg_snprintf
224
+ #define vsprintf pg_vsprintf
219
225
#define sprintf pg_sprintf
220
226
#define vfprintf pg_vfprintf
221
227
#define fprintf pg_fprintf
0 commit comments