Search Postgresql Archives

Re: MinGW compiled client library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux