Re: Small patch: fix warnings during compilation on FreeBSD - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Small patch: fix warnings during compilation on FreeBSD
Date
Msg-id 20535.1457710838@sss.pgh.pa.us
Whole thread Raw
In response to Re: Small patch: fix warnings during compilation on FreeBSD  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Small patch: fix warnings during compilation on FreeBSD
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev
> <a.alekseev@postgrespro.ru> wrote:
>> Sounds like quite a dirty hack to me. Besides so far we have only two
>> procedures from xlocale.h and this requires two checks. If we go this
>> way someday there will be 15 checks for every procedure from xlocale.h

> Eh, probably not.  Most likely, if you check whether one of the
> functions you care about is in that file, that's good enough.

Yeah.  In practice, there are exactly two cases we care about: either
both of these functions will be declared in <stdlib.h> like POSIX
says, or both of them will be in <xlocale.h>.  There's no need to
work harder than we have to do to figure that out.

I'm totally unimpressed with the proposal of depending on the __FreeBSD__
macro instead of having a proper configure check.  For one thing, we
have no idea whether NetBSD or OpenBSD have this same issue.  For
another, it might be version-specific, or might become so if FreeBSD
decides to start following POSIX on this point someday.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Small patch: fix warnings during compilation on FreeBSD
Next
From: Gilles Darold
Date:
Subject: Re: Patch to implement pg_current_logfile() function