Re: [pgsql-hackers-win32] snprintf causes regression - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [pgsql-hackers-win32] snprintf causes regression
Date
Msg-id 3649.1110561816@sss.pgh.pa.us
Whole thread Raw
In response to Re: [pgsql-hackers-win32] snprintf causes regression  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [pgsql-hackers-win32] snprintf causes regression
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> 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

pgsql-hackers by date:

Previous
From: Chris Mair
Date:
Subject: Re: TODO item: support triggers on columns
Next
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] snprintf causes regression