@@ -169,6 +169,9 @@ extern unsigned char pg_ascii_tolower(unsigned char ch);
169169#ifdef snprintf
170170#undef snprintf
171171#endif
172+ #ifdef vsprintf
173+ #undef vsprintf
174+ #endif
172175#ifdef sprintf
173176#undef sprintf
174177#endif
@@ -187,6 +190,7 @@ extern int
187190pg_snprintf (char * str , size_t count , const char * fmt ,...)
188191/* This extension allows gcc to check the format string */
189192__attribute__((format (PG_PRINTF_ATTRIBUTE , 3 , 4 )));
193+ extern int pg_vsprintf (char * str , const char * fmt , va_list args );
190194extern int
191195pg_sprintf (char * str , const char * fmt ,...)
192196/* This extension allows gcc to check the format string */
@@ -209,13 +213,15 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
209213#ifdef __GNUC__
210214#define vsnprintf (...) pg_vsnprintf(__VA_ARGS__)
211215#define snprintf (...) pg_snprintf(__VA_ARGS__)
216+ #define vsprintf (...) pg_vsprintf(__VA_ARGS__)
212217#define sprintf (...) pg_sprintf(__VA_ARGS__)
213218#define vfprintf (...) pg_vfprintf(__VA_ARGS__)
214219#define fprintf (...) pg_fprintf(__VA_ARGS__)
215220#define printf (...) pg_printf(__VA_ARGS__)
216221#else
217222#define vsnprintf pg_vsnprintf
218223#define snprintf pg_snprintf
224+ #define vsprintf pg_vsprintf
219225#define sprintf pg_sprintf
220226#define vfprintf pg_vfprintf
221227#define fprintf pg_fprintf
0 commit comments