snprintf() argument reordering not working under Windows in 8.1

From: Nicolai Tufar <ntufar(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: devrim(at)kivi(dot)com(dot)tr
Subject: snprintf() argument reordering not working under Windows in 8.1
Date: 2005-12-03 13:18:09
Message-ID: d80929390512030518l19adc3dcp@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Greetings,

Last April we have made some changes to src/ports/snprintf.c so that it
would support argument reordering like %2$s, %1$d and such on
platforms where original snprintf() does not support it, like Windows,
HP-UX or NetBSD.

NLS messages of some languages, like Turkish, rely heavily on argument
reordering because of the language structure. In 8.1 Turkish messages
in Windows version are all broken because argument reordering is not there.

I examined commit logs and came to conclusion that src/port/snprintf.c
is not included in server when compiling under Windows because of change
to src/port/Makefile made in revision 1.28 by Bruce Momjian. See here:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/port/Makefile

Comment to the commit says:
`No server version of snprintf needed, so remove Makefile rule.'
In fact I think we need snprintf in server because NLS messages are
printed by the server.

Kindest regards,
Nicolai Tufar

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2005-12-03 13:47:36 Re: Reducing relation locking overhead
Previous Message Simon Riggs 2005-12-03 13:14:26 Striping CLOG and Subtrans

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2005-12-03 14:48:57 Re: [HACKERS] Should libedit be preferred to libreadline?
Previous Message Bruce Momjian 2005-12-03 13:01:19 Re: [HACKERS] Should libedit be preferred to libreadline?