From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small patch: fix warnings during compilation on FreeBSD |
Date: | 2016-03-11 15:40:38 |
Message-ID: | 20535.1457710838@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Mar 11, 2016 at 9:13 AM, Aleksander Alekseev
> <a(dot)alekseev(at)postgrespro(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gilles Darold | 2016-03-11 15:46:47 | Re: Patch to implement pg_current_logfile() function |
Previous Message | Robert Haas | 2016-03-11 15:30:07 | Re: Small patch: fix warnings during compilation on FreeBSD |