@@ -139,6 +139,9 @@ extern unsigned char pg_ascii_tolower(unsigned char ch);
139
139
#ifdef snprintf
140
140
#undef snprintf
141
141
#endif
142
+ #ifdef vsprintf
143
+ #undef vsprintf
144
+ #endif
142
145
#ifdef sprintf
143
146
#undef sprintf
144
147
#endif
@@ -157,6 +160,7 @@ extern int
157
160
pg_snprintf (char * str , size_t count , const char * fmt ,...)
158
161
/* This extension allows gcc to check the format string */
159
162
__attribute__((format (PG_PRINTF_ATTRIBUTE , 3 , 4 )));
163
+ extern int pg_vsprintf (char * str , const char * fmt , va_list args );
160
164
extern int
161
165
pg_sprintf (char * str , const char * fmt ,...)
162
166
/* This extension allows gcc to check the format string */
@@ -179,13 +183,15 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 1, 2)));
179
183
#ifdef __GNUC__
180
184
#define vsnprintf (...) pg_vsnprintf(__VA_ARGS__)
181
185
#define snprintf (...) pg_snprintf(__VA_ARGS__)
186
+ #define vsprintf (...) pg_vsprintf(__VA_ARGS__)
182
187
#define sprintf (...) pg_sprintf(__VA_ARGS__)
183
188
#define vfprintf (...) pg_vfprintf(__VA_ARGS__)
184
189
#define fprintf (...) pg_fprintf(__VA_ARGS__)
185
190
#define printf (...) pg_printf(__VA_ARGS__)
186
191
#else
187
192
#define vsnprintf pg_vsnprintf
188
193
#define snprintf pg_snprintf
194
+ #define vsprintf pg_vsprintf
189
195
#define sprintf pg_sprintf
190
196
#define vfprintf pg_vfprintf
191
197
#define fprintf pg_fprintf
0 commit comments