missing isinf declaration on solaris

From: Oskari Saarenmaa <os(at)ohmu(dot)fi>
To: pgsql-hackers(at)postgresql(dot)org
Subject: missing isinf declaration on solaris
Date: 2014-09-24 06:51:16
Message-ID: 542269E4.40406@ohmu.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

GCC 4.9 build on Solaris 10 shows these warnings about isinf:

float.c: In function 'is_infinite':
float.c:178:2: warning: implicit declaration of function 'isinf'
[-Wimplicit-function-declaration]

See
http://pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=dingo&dt=2014-09-23%2002%3A52%3A00&stg=make

isinf declaration is in <iso/math_c99.h> which is included by <math.h>,
but it's surrounded by #if defined(_STDC_C99) || _XOPEN_SOURCE - 0 >=
600 || defined(__C99FEATURES__). A couple of quick Google searches
suggests that some other projects have worked around this by always
defining __C99FEATURES__ even if compiling in C89 mode. __C99FEATURES__
is only used by math.h and fenv.h in /usr/include.

Should we just add -D__C99FEATURES__ to CPPFLAGS in
src/template/solaris, add our own declaration of isinf() or do something
else about the warning?

/ Oskari

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-09-24 06:58:46 Re: BRIN indexes - TRAP: BadArgument
Previous Message Andrea Riciputi 2014-09-24 06:23:34 Re: Extending COPY TO