Re: missing isinf declaration on solaris

Поиск
Список
Период
Сортировка
От Oskari Saarenmaa
Тема Re: missing isinf declaration on solaris
Дата
Msg-id 5422CD97.6030406@ohmu.fi
обсуждение исходный текст
Ответ на Re: missing isinf declaration on solaris  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
24.09.2014, 16:21, Tom Lane kirjoitti:
> Oskari Saarenmaa <os@ohmu.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: make pg_controldata accept "-D dirname"
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: make pg_controldata accept "-D dirname"