Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Nicolai Tufar <ntufar(at)gmail(dot)com>
Cc: Magnus Hagander <mha(at)sollentuna(dot)net>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org,pgsql-hackers-win32(at)postgresql(dot)org,Ismail Teppeev <iteppeev(at)gmail(dot)com>
Subject: Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32
Date: 2005-01-22 14:31:39
Message-ID: 200501221531.40562.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Nicolai Tufar wrote:
> 1. I renamed snprintf() to pg_snprintf(), vsnprintf() to
> pg_vsnprintf() and introduced pg_printf() that calls pg_vsnprintf().

This is not necessary.  You will notice that we already have configure 
tests of snprintf format specifiers (%lld etc.), so using the original 
function names is OK even in that case.

> 4. I introduced a volatile static char[] variable in snprintf.c code
> so I can grep executables for this string and be sure that it is
> included.

Remove that when finalizing the code.

> 5. Before running regression test I always ran make install,
> apparently because libpq is read from /usr/local/.

That's because of the -rpath.

> 2. Why would we not just take FreeBSD's vfprintf() and use it
> instead?

Try it.  It's painful.

> 4. What %m format string is used for? And where is it handled. Do I
> need to implement it?

It's only used in the error reporting functions in the server and is 
handled there.  You don't need to worry about it.

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

In response to

Responses

pgsql-hackers by date

Next:From: Jim ButtafuocoDate: 2005-01-22 14:35:02
Subject: pg_clog problem (PG version 7.4.5)
Previous:From: Nicolai TufarDate: 2005-01-22 13:29:02
Subject: Re: %2$, %1$ gettext placeholder replacement is not working under Win32

pgsql-hackers-win32 by date

Next:From: Nicolai TufarDate: 2005-01-22 20:19:20
Subject: Re: [HACKERS] %2$, %1$ gettext placeholder replacement is not working under Win32
Previous:From: Nicolai TufarDate: 2005-01-22 13:29:02
Subject: Re: %2$, %1$ gettext placeholder replacement is not working under Win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group