From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgman(at)candle(dot)pha(dot)pa(dot)us, tgl(at)sss(dot)pgh(dot)pa(dot)us, ntufar(at)gmail(dot)com, devrim(at)kivi(dot)com(dot)tr, mha(at)sollentuna(dot)net, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] snprintf() argument reordering not working |
Date: | 2005-12-05 14:19:31 |
Message-ID: | 43944C73.9000903@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
I wrote:
>Bruce Momjian said:
>
>
>>OK, a few things. First, Tom has fixed snprintf.c so it should
>>properly process positional parameters now. Would you first test the
>>libintl version of *printf to see if it can process %$ parameters
>>(probably by hacking up any language file and testing the printing),
>>and then try your patch below to see if it is properly reorders the
>>arguments. If libintl does not reorder properly, but our snprintf.c
>>does, would you please generate an appliable patch we can put into
>>8.1.X? Thanks.
>>
>>I know I am asking a lot, but you are "the man" on this one. :-)
>>
>>
>>
>
>Since the effect of the configure change I am proposing to reverse was to
>force use of the *printf in libintl, don't we already know the answer to
>your first question from Nicolai's report?
>
>
>
>
However, a very simple test shows that the libintl printf does indeed do
%m$ processing:
$ cat testpf.c
#include <libintl.h>
main()
{
printf("%2$s %1$s\n","arg1","arg2");
}
$ gcc -o testpf testpf.c -lintl
$ ./testpf.exe
arg2 arg1
$
So the next question is why isn't it working in the build.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-05 14:35:57 | Re: [PATCHES] snprintf() argument reordering not working |
Previous Message | Hannu Krosing | 2005-12-05 14:03:30 | Concurrent CREATE INDEX, try 2 (was Re: Reducing relation locking overhead) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-12-05 14:35:57 | Re: [PATCHES] snprintf() argument reordering not working |
Previous Message | John D. Burger | 2005-12-05 13:24:16 | Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits |