Re: MinGW compiled client library

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: MinGW compiled client library
Дата
Msg-id 520ADC1A.8080506@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: MinGW compiled client library  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On 08/14/2013 08:57 AM, John R Pierce wrote:
>
> no. GCC uses a totally different libc in its generated code.  that alone
> ensures its binaries are not directly comparable.    linking code with
> incompatible libc's is gonna result in some gnarly messes, imagine what
> kind of ugly stuff could happen if you used one malloc and another free ?

Windows code is required to defend against this and PostgreSQL is no
exception.

It's very common on Windows for different libraries to use different
libcs. Horrible, but common. They deal with this by doing things like:

* Always free()ing memory in the same module it was malloc()'d in;
* Never passing file handles around, instead using wrapper functions;

etc.

libpq compiled with gcc should work in an MSVC-compiled executable so
long as the port/ code for mingw is correct and there are no
undiscovered portability bugs.

In this case I'm wondering if we've got an issue with selection of
socket flags. Michael, can you try some older versions and see if you
can find when this problem first appeared? Does it only affect mingw-64,
or is the 32-bit version affected too?

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: MinGW compiled client library
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: What type of index do I need for this JOIN?