| From: | Oskari Saarenmaa <os(at)ohmu(dot)fi> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: missing isinf declaration on solaris |
| Date: | 2014-09-24 13:56:39 |
| Message-ID: | 5422CD97.6030406@ohmu.fi |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
24.09.2014, 16:21, Tom Lane kirjoitti:
> Oskari Saarenmaa <os(at)ohmu(dot)fi> writes:
>> ... so to enable XPG6 we'd need to use C99 mode anyway.
>
> OK.
>
>> Could we just use
>> -std=gnu99 (with -fgnu89-inline if required) with GCC on Solaris? ISTM
>> it would be cleaner to just properly enable c99 mode rather than define
>> an undocumented macro to use a couple of c99 declarations.
>
> Agreed, but what about non-GCC compilers?
Solaris Studio defaults to "-xc99=all,no_lib" which, according to the
man page, enables c99 language features but doesn't use c99 standard
library semantics. isinf is defined to be a macro by c99 and doesn't
require changing the c99 mode so I'd just keep using the defaults with
Solaris Studio for now.
For GCC
--- a/src/template/solaris
+++ b/src/template/solaris
@@ -0,0 +1,4 @@
+if test "$GCC" = yes ; then
+ CPPFLAGS="$CPPFLAGS -std=gnu99"
+fi
+
gets rid of the warnings and passes tests.
/ Oskari
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2014-09-24 13:58:49 | Re: make pg_controldata accept "-D dirname" |
| Previous Message | Heikki Linnakangas | 2014-09-24 13:54:27 | Re: make pg_controldata accept "-D dirname" |