Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
Date: 2018-04-30 18:36:45
Message-ID: 59e5787f-314e-6e5d-db5e-bcb6b9dbc25c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 4/30/18 13:56, Tom Lane wrote:
> So this isn't working on Windows:
>
> contrib/jsonb_plperl/jsonb_plperl.c(226): warning C4013: 'isnan' undefined; assuming extern returning int [c:\pgbuildfarm\pgbuildroot\HEAD\pgsql.build\jsonb_plperl.vcxproj]
> ...
> .\Release\jsonb_plperl\jsonb_plperl.dll : fatal error LNK1120: 1 unresolved externals [c:\pgbuildfarm\pgbuildroot\HEAD\pgsql.build\jsonb_plperl.vcxproj]
>
> The reason seems to be this kluge in plperl.h:
>
> /* stop perl headers from hijacking stdio and other stuff on Windows */
> #ifdef WIN32
> #define WIN32IO_IS_STDIO
> /*
> * isnan is defined in both the perl and mingw headers. We don't use it,
> * so this just clears up the compile warning.
> */
> #ifdef isnan
> #undef isnan
> #endif
> #endif /* WIN32 */
>
> Looks like the half-life of that hack just expired. What shall
> we do about it?

I have removed this for now. If it's really just about a compiler
warning, then we can find a different workaround later.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-04-30 18:41:58 Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
Previous Message Peter Eisentraut 2018-04-30 18:35:41 pgsql: Remove plperl isnan hack