Re: Removing dependency to wsock32.lib when compiling code on WIndows

From: Noah Misch <noah(at)leadboat(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, MauMau <maumau307(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing dependency to wsock32.lib when compiling code on WIndows
Date: 2014-08-12 05:48:32
Message-ID: 20140812054832.GD259708@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)leadboat(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2014-08-12 06:54:16 Re: delta relations in AFTER triggers
Previous Message Jeff Davis 2014-08-12 05:06:55 Re: 9.5: Memory-bounded HashAgg