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

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: [PATCHES] snprintf() argument reordering not working
Дата
Msg-id 00ab01c5f9d0$415db741$6a01a8c0@valehousing.co.uk
обсуждение исходный текст
Список pgsql-hackers
-----Original Message-----
From: "Andrew Dunstan"<andrew@dunslane.net>
Sent: 05/12/05 19:03:17
To: "Tom Lane"<tgl@sss.pgh.pa.us>
Cc: "Bruce Momjian"<pgman@candle.pha.pa.us>, "ntufar@gmail.com"<ntufar@gmail.com>,
"devrim@kivi.com.tr"<devrim@kivi.com.tr>,"mha@sollentuna.net"<mha@sollentuna.net>,
"pgsql-hackers@postgresql.org"<pgsql-hackers@postgresql.org>
Subject: Re: [PATCHES] [HACKERS] snprintf() argument reordering not working

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

It will be a recipe for disaster if different builds of the same dll have different exports - apps that pick up the
wrongone from a shared dir for example are likely to crash at startup. We went to some effort to prevent this for 8.0,
forexample, by not having separate (and different) .def files for each compiler, but by building them all from
exports.txt.

Regards, Dave

-----Unmodified Original Message-----


Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gregory Maxwell
Дата:
Сообщение: Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508 digits
Следующее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: SERIAL type feature request