pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
Date: Mon, 30 Apr 2018 15:13:05 -0400
Message-ID: <213242a0-0ed8-ade6-822c-0270f7064799@2ndQuadrant.com> (raw)
In-Reply-To: <23691.1525113718@sss.pgh.pa.us>
References: <E1fDCX9-0005yu-7q@gemulon.postgresql.org>
	<21194.1525110966@sss.pgh.pa.us>
	<59e5787f-314e-6e5d-db5e-bcb6b9dbc25c@2ndquadrant.com>
	<23691.1525113718@sss.pgh.pa.us>



On 04/30/2018 02:41 PM, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> On 4/30/18 13:56, Tom Lane wrote:
>>> So this isn't working on Windows: ...
>>> 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.
> I was just about to propose exactly that fix.  This undef'ing of isnan
> traces back to Andrew's 2006 commit ea73a78b0.  I think perhaps that's not
> necessary with any still-supported version of Perl; I see no evidence on
> my machines that any Perl header #defines isnan.  There is this bit:
>
> #ifdef UNDER_CE
> int isnan(double d);
> #endif
>
> which would cause trouble if isnan is a macro, but we can hope that
> that doesn't apply to us.
>
> 			


Fingers crossed we'll be OK. Looking at the perl headers on a Windows
machine I'm doing some other stuff on, the #define is protected by an
#ifndef. I'm always happy when my hacks can be removed :-)

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (6+ messages)  latest in thread

Message-ID: <213242a0-0ed8-ade6-822c-0270f7064799@2ndQuadrant.com>
Permalink:  ../213242a0-0ed8-ade6-822c-0270f7064799@2ndQuadrant.com/
Also on:    postgresql.org/message-id/213242a0-0ed8-ade6-822c-0270f7064799@2ndQuadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com, tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, andrew@dunslane.net, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Prevent infinity and NaN in jsonb/plperl transform
  In-Reply-To: <213242a0-0ed8-ade6-822c-0270f7064799@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox