@@ -161,6 +161,9 @@ extern unsigned char pg_tolower(unsigned char ch);
161
161
#ifdef snprintf
162
162
#undef snprintf
163
163
#endif
164
+ #ifdef vsprintf
165
+ #undef vsprintf
166
+ #endif
164
167
#ifdef sprintf
165
168
#undef sprintf
166
169
#endif
@@ -179,6 +182,7 @@ extern int
179
182
pg_snprintf (char * str , size_t count , const char * fmt ,...)
180
183
/* This extension allows gcc to check the format string */
181
184
__attribute__((format (printf , 3 , 4 )));
185
+ extern int pg_vsprintf (char * str , const char * fmt , va_list args );
182
186
extern int
183
187
pg_sprintf (char * str , const char * fmt ,...)
184
188
/* This extension allows gcc to check the format string */
@@ -201,13 +205,15 @@ __attribute__((format(printf, 1, 2)));
201
205
#ifdef __GNUC__
202
206
#define vsnprintf (...) pg_vsnprintf(__VA_ARGS__)
203
207
#define snprintf (...) pg_snprintf(__VA_ARGS__)
208
+ #define vsprintf (...) pg_vsprintf(__VA_ARGS__)
204
209
#define sprintf (...) pg_sprintf(__VA_ARGS__)
205
210
#define vfprintf (...) pg_vfprintf(__VA_ARGS__)
206
211
#define fprintf (...) pg_fprintf(__VA_ARGS__)
207
212
#define printf (...) pg_printf(__VA_ARGS__)
208
213
#else
209
214
#define vsnprintf pg_vsnprintf
210
215
#define snprintf pg_snprintf
216
+ #define vsprintf pg_vsprintf
211
217
#define sprintf pg_sprintf
212
218
#define vfprintf pg_vfprintf
213
219
#define fprintf pg_fprintf
0 commit comments