Re: [PATCHES] snprintf() argument reordering not working

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(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 19:02:07
Message-ID: 43948EAF.3080801@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>The bad news: if we aren't compiling with NLS enabled, having those
>>entries in exports.txt makes the libpq build blow up. So either we need
>>to use pg_*printf unconditionally on Windows, or we need a little
>>Makefile + sed magic to strip those entries out of exports.txt when it
>>is used, if we're not doing NLS, or something of that kind.
>>
>>
>
>I think it's a bad idea for exports.txt not to be the same in all
>builds. So yeah, if we export these names at all then it has to be
>unconditional.
>
>What about Plan B? Per Bruce's comment, it should really only be ecpg
>that needs an extra copy of snprintf.o, and it's not like ecpg doesn't
>already pull in various port/ files for itself.
>
>
>
>

The problem is that the alias will be picked up by every libpq client. I
got around the problem with ecpg's libpgtypes by unaliasing sprintf and
snprintf. But we can't do that everywhere.

I'm not sure I see the objection to stripping these out of the *.def files.

I can't spend any more time on this now - I have spent far too much on
it already. My working patch is attached. Maybe I can look at it again
in a few days.

cheers

andrew

Attachment Content-Type Size
nls.diff text/x-patch 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Maxwell 2005-12-05 19:07:27 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Previous Message Tom Lane 2005-12-05 18:31:20 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Maxwell 2005-12-05 19:07:27 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Previous Message Peter Eisentraut 2005-12-05 18:41:48 Re: mvcc.sgml make up