build: define __EXTENSIONS__ when building on Solaris & illumos

Like _GNU_SOURCE on glibc, this tells the header to define functions
not included in the requested standards versions.  This is needed to
build glib/tests/utils-c-89 with -std=c89 and utils-c-89 with -std=c99
and still be able to call functions like isnan() and realpath().

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2024-10-13 16:45:34 -07:00
parent 5ff0429147
commit ef7b2c9a34

View File

@ -237,6 +237,8 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
if host_system == 'qnx'
add_project_arguments('-D_QNX_SOURCE', language: 'c')
elif host_system == 'sunos'
add_project_arguments('-D__EXTENSIONS__', language: 'c')
endif
# dummy/empty dependency() object to declare fallbacks and simpler dependencies