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

From Peter Eisentraut
Subject Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests
Date
Msg-id 200503021717.14766.peter_e@gmx.net
Whole thread Raw
In response to Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Am Mittwoch, 2. März 2005 16:50 schrieb Bruce Momjian:
> Right.  It is Unix that has the problem.  It seems we are supplying a
> special snprintf() only so gettext() in libintl will use ours instead of
> the operating system's.  Isn't there a way to target just that library
> for our replacement snprintf()?  Our code itself doesn't need the
> positional parameters.

No, it's exactly our code that needs the snprintf().  libintl does not need
it.

> Could we read the snprintf translation string and process positional
> parameters _before_ we sent it to gettext()?

That would defeat the entire point of this exercise.  Then translators would
have to translate each possible substitution separately and we wouldn't need
positional parameters at all.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] [HACKERS] snprintf causes regression tests
Next
From: Mark Wong
Date:
Subject: Re: WIP: buffer manager rewrite (take 2)