Re: narwhal and PGDLLIMPORT

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Marco Atzeri <marco(dot)atzeri(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: narwhal and PGDLLIMPORT
Date: 2014-02-15 15:59:17
Message-ID: 22387.1392479957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-02-15 10:16:50 -0500, Tom Lane wrote:
>> The best thing probably is not to have the duplicate declarations on
>> platforms that don't need 'em. Unfortunately, I seem to recall that
>> the current coding was arrived at to forestall link problems on weird
>> platforms that *had* these symbols declared and yet we needed externs
>> anyway. We might have to do something as ugly as "#ifndef CYGWIN".

> Hm, according to a quick blame, they are there unconditionally since at
> least 2000 (c.f. a70e74b06 moving them around). So it very well might be
> that that reasoning isn't current anymore.

I don't have time right now to research it (have to go shovel snow),
but I think that at least some of the issue was that we needed the
externs when we force use of our src/port implementation.

> One ugly thing to do is to fall back to the port implementation of
> getopt on cygwin as well... That'd still have the warning parade tho.

Yeah, that doesn't sound terribly satisfactory. Another idea would
be to wrap the externs in "#ifndef HAVE_GETOPT_H".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-02-15 16:02:15 Re: narwhal and PGDLLIMPORT
Previous Message Peter Eisentraut 2014-02-15 15:46:32 Re: Create function prototype as part of PG_FUNCTION_INFO_V1