Thread: Re: [pgsql-hackers-win32] snprintf causes regression tests to fail

Re: [pgsql-hackers-win32] snprintf causes regression tests to fail

From
"Magnus Hagander"
Date:
>> I spent all day debugging it. Still have absolutely
>> no idea what could possibly go wrong. Does
>> anyone have a slightest clue what can it be and
>> why it manifests itself only on win32?
>
>It may be that the CLIB  has badly broken support for 64bit
>integers on 32
>bit platforms. Does anyone know of any Cygwin/Ming issues?
>
>Is this only with the new snprintf code in Win32?

Yes.


>Is this a problem with snprintf as implemented in src/port?

Yes. Only. It works with the snprintf() in the runtime (this particular
part).


>Is there a reason why we don't use the snprintf that comes with the
>various C compilers?

It does not support "positional parameters" (I think it's called) which
is required for proper translations.
We do use that one when it works...

//Magnus

Re: [pgsql-hackers-win32] snprintf causes regression tests to fail

From
Nicolai Tufar
Date:
On Wed, 2 Mar 2005 09:24:32 +0100, Joerg Hessdoerfer
<Joerg.Hessdoerfer@sea-gmbh.com> wrote:
> don't know if PG borrowed the code from here, but according to the manpage
> FreeBSD 5.3 seems to have a quite complete implementation, see
>
http://www.freebsd.org/cgi/man.cgi?query=snprintf&apropos=0&sektion=3&manpath=FreeBSD+5.3-RELEASE+and+Ports&format=html
>
> Would this help?

Yes, it would. With Tom Lane's blessing I am starting on incorporating it into
PG now.