@@ -139,6 +139,7 @@ platform_ios=no
139139host_darwin=no
140140host_linux=no
141141build_darwin=no
142+ host_sunos=no
142143
143144case "$host" in
144145 wasm32*)
@@ -397,13 +398,14 @@ case "$host" in
397398 use_sigposix=yes
398399 ;;
399400 *-*-solaris*)
400- CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS"
401+ CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS -D__EXTENSIONS__ -D_XPG4_2 "
401402 need_link_unlink=yes
402403 libmono_cflags="-D_REENTRANT"
403404 libgc_threads=pthreads
404405 has_dtrace=yes
405406 use_sigposix=yes
406407 enable_solaris_tar_check=yes
408+ host_sunos=yes
407409 ;;
408410 *-*-darwin*)
409411 parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
@@ -2274,14 +2276,13 @@ if test x$host_win32 = xno; then
22742276 AC_CHECK_FUNCS ( getresuid )
22752277 AC_CHECK_FUNCS ( setresuid )
22762278 AC_CHECK_FUNCS ( kqueue )
2277- # IBM provides a compatibility library for i offering this function.
2279+ # IBM provides a compatibility library for offering this function.
22782280 # BSDs and others, have execinfo in base or packages.
22792281 AC_SEARCH_LIBS ( backtrace_symbols , execinfo util )
22802282 # Two-step so it sets it in config.h
22812283 AC_CHECK_FUNCS ( backtrace_symbols )
22822284 AC_CHECK_FUNCS ( mkstemp )
22832285 AC_CHECK_FUNCS ( mmap )
2284- AC_CHECK_FUNCS ( madvise )
22852286 AC_CHECK_FUNCS ( getrusage )
22862287 AC_CHECK_FUNCS ( getpriority )
22872288 AC_CHECK_FUNCS ( setpriority )
@@ -2747,7 +2748,7 @@ if test x$host_win32 = xno; then
27472748 dnl *** Checks for libxnet ***
27482749 dnl *****************************
27492750 case "${host}" in
2750- *solaris* )
2751+ *solaris*)
27512752 AC_MSG_CHECKING ( for Solaris XPG4 support )
27522753 if test -f /usr/lib/libxnet.so; then
27532754 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
@@ -3215,7 +3216,6 @@ if test x$host_win32 = xno; then
32153216 AC_CHECK_FUNCS ( remap_file_pages )
32163217 AC_CHECK_FUNCS ( posix_fadvise )
32173218 AC_CHECK_FUNCS ( posix_fallocate )
3218- AC_CHECK_FUNCS ( posix_madvise )
32193219 AC_CHECK_FUNCS ( vsnprintf )
32203220 AC_CHECK_FUNCS ( sendfile )
32213221 AC_CHECK_FUNCS ( gethostid sethostid )
@@ -3921,6 +3921,19 @@ if test x$host_win32 = xno; then
39213921
39223922 AC_CHECK_DECL ( IN_EXCL_UNLINK , [ AC_DEFINE ( HAVE_IN_EXCL_UNLINK , 1 , [ IN_EXCL_UNLINK] ) ] , [ ] , [ [ #include <sys/inotify.h>] ] )
39233923
3924+ if test x$host_sunos = xyes; then
3925+ # set -Werror=strict-prototypes, to match the flags used during the compilation.
3926+ ORIG_CFLAGS="$CFLAGS"
3927+ CFLAGS="$CFLAGS -Werror=strict-prototypes"
3928+ fi
3929+
3930+ AC_CHECK_FUNCS ( madvise )
3931+ AC_CHECK_FUNCS ( posix_madvise )
3932+
3933+ if test x$host_sunos = xyes; then
3934+ CFLAGS="$ORIG_CFLAGS"
3935+ fi
3936+
39243937 # *** End of Mono.Native checks ***
39253938else
39263939 AM_CONDITIONAL(ENABLE_GSS, false)
@@ -6836,9 +6849,9 @@ if test x$with_core = xonly; then
68366849 ICU_CFLAGS="$CPPFLAGS -DPALEXPORT="" -DOSX_ICU_LIBRARY_PATH=AS_ESCAPE ( \"/usr/lib/libicucore.dylib\" , '\"' ) -DTARGET_UNIX -DU_DISABLE_RENAMING -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option -Wno-deprecated-declarations"
68376850 fi
68386851 CPPFLAGS=$ORIG_CPPFLAGS
6839- elif test x$platform_android = xyes; then
6852+ elif test x$platform_android = xyes; then
68406853 ICU_CFLAGS="-DPALEXPORT="" -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE -DTARGET_UNIX -DTARGET_ANDROID -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
6841- have_sys_icu=yes
6854+ have_sys_icu=yes
68426855 elif test x$host_linux = xyes; then
68436856 AC_CHECK_LIB ( icuuc , main , LIBS=$LIBS ,
68446857 [ AC_MSG_ERROR ( [ Cannot find libicuuc, try installing libicu-dev (or the appropriate package for your platform).] ) ] )
@@ -6848,14 +6861,17 @@ if test x$with_core = xonly; then
68486861 if test x$have_sys_icu = xyes; then
68496862 ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
68506863 fi
6864+ elif test x$host_sunos = xyes; then
6865+ ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
6866+ have_sys_icu=yes
68516867 else
68526868 GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
68536869 fi
68546870 AC_SUBST ( ICU_CFLAGS )
6855- else
6871+ else
68566872 GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
68576873 fi
6858- else
6874+ else
68596875 GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
68606876fi
68616877
0 commit comments