mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-19 05:59:05 +03:00
Add Solaris to known platforms
For Solaris, XPG4v2 must be enabled for ancillary data while the compiler flag -std=c99 restricts the code to C99 and nothing else. To make this work anyway, we have to use the following compiler flags: -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=600 -D__EXTENSIONS__=1
This commit is contained in:
1 parent
489df85c88
commit
0af74b7cd6
1 file changed
+12
@@ -260,6 +260,15 @@ case $host in
|
||||
CFLAGS="$CFLAGS -D_GNU_SOURCE -DWITH_POSIX"
|
||||
;;
|
||||
|
||||
*-solaris*)
|
||||
AC_MSG_RESULT([Solaris])
|
||||
backend="sunos"
|
||||
# set _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED to enable XPG4v2 (POSIX 2004)
|
||||
# set __EXTENSION__ to shut up feature test macros that restrict -std=c99
|
||||
# to only C99 (and nothing newer)
|
||||
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=600 -D__EXTENSIONS__=1 -DWITH_POSIX"
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_WARN([==> Currently unsupported operating system!])
|
||||
AC_MSG_ERROR([==> If you can provide patches to support your operating system please write to 'libcoap-developers@lists.sourceforge.net'.])
|
||||
@@ -270,6 +279,9 @@ case $backend in
|
||||
AC_DEFINE(OS_LINUX, 1, [Linux backend])
|
||||
AC_SUBST(OS_LINUX)
|
||||
;;
|
||||
|
||||
sunos)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Override the various template files, currently just makefiles and the
|
||||
|
||||
Reference in new issue
Block a user