Re: Removing dependency to wsock32.lib when compiling code on WIndows - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Removing dependency to wsock32.lib when compiling code on WIndows
Date
Msg-id 20140812054832.GD259708@tornado.leadboat.com
Whole thread Raw
In response to Re: Removing dependency to wsock32.lib when compiling code on WIndows  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Removing dependency to wsock32.lib when compiling code on WIndows
List pgsql-hackers
On Tue, Aug 12, 2014 at 01:58:17PM +0900, Michael Paquier wrote:
> On Tue, Aug 12, 2014 at 9:43 AM, Noah Misch <noah@leadboat.com> wrote:
> >
> > Somehow or other, we must bring these parts into agreement.
> 
> 
> It is interesting to see that with MinGW-32b getaddrinfo is still set
> to no at configure phase. What if we simply wrap "undef gai_strerror"
> like in the patch attached? I just set up an environment with MinGW-64
> and I was able to build the code (tested as well with MinGW-32 btw).

It's easy to devise something that fixes the build.  What is the right fix,
and why?

Note that MinGW-w64 is available in both 32-bit and 64-bit.  It is a fork of
MinGW, which is always 32-bit.  I experienced the problem with 64-bit
MinGW-w64; I don't know how 32-bit MinGW-w64 compares.

> Another idea would be to enforce getaddrinfo to no at configure for
> MinGW environments.

Consistency with the MSVC build is desirable, either HAVE_GETADDRINFO for both
or !HAVE_GETADDRINFO for both.

nm

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: 9.5: Memory-bounded HashAgg
Next
From: Amit Khandekar
Date:
Subject: Re: delta relations in AFTER triggers