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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql(at)mohawksoft(dot)com, Nicolai Tufar <ntufar(at)gmail(dot)com>, Magnus Hagander <mha(at)sollentuna(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] snprintf causes regression
Date: 2005-03-11 17:23:36
Message-ID: 3649.1110561816@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-03-11 17:37:24 Re: [pgsql-hackers-win32] snprintf causes regression
Previous Message Chris Mair 2005-03-11 17:19:18 Re: TODO item: support triggers on columns

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2005-03-11 17:37:24 Re: [pgsql-hackers-win32] snprintf causes regression
Previous Message Bruce Momjian 2005-03-11 17:14:26 Re: [pgsql-hackers-win32] snprintf causes regression

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-03-11 17:37:24 Re: [pgsql-hackers-win32] snprintf causes regression
Previous Message Bruce Momjian 2005-03-11 17:14:26 Re: [pgsql-hackers-win32] snprintf causes regression