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