Re: [pgsql-hackers-win32] snprintf causes regression
Tom Lane <[email protected]> Fri, 11 Mar 2005 12:23:36 -0500
| Newsgroups | gmane.comp.db.postgresql.devel.general,gmane.comp.db.postgresql.devel.win32 |
|---|---|
| Message-ID | <[email protected]> |
Bruce Momjian <[email protected]> writes: >> I'm not sure that macros can have variable number of arguments on all >> supported platforms. I've been burnt by this before. > The actual patch is: > + #ifdef __GNUC__ > + #define vsnprintf(...) pg_vsnprintf(__VA_ARGS__) > + #define snprintf(...) pg_snprintf(__VA_ARGS__) > + #define printf(...) pg_printf(__VA_ARGS__) > + #else > + #define vsnprintf pg_vsnprintf > + #define snprintf pg_snprintf > + #define printf pg_printf > + #endif Uh, why bother with the different approach for gcc? Also, what happened to fprintf? We're going to need that too for localization of the client programs. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq