AM_FLAG_M3264_X86_SOLARIS = @FLAG_M32@
AM_CFLAGS_X86_SOLARIS = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY_2@ \
- $(AM_CFLAGS_BASE) -fomit-frame-pointer
+ $(AM_CFLAGS_BASE) -fomit-frame-pointer \
+ @SOLARIS_UNDEF_LARGESOURCE@
AM_CFLAGS_PSO_X86_SOLARIS = @FLAG_M32@ $(AM_CFLAGS_BASE) $(AM_CFLAGS_PSO_BASE)
AM_CCASFLAGS_X86_SOLARIS = @FLAG_M32@ -g -D_ASM
if VGCONF_OS_IS_SOLARIS
# Make sure that all test programs have threaded errno.
-AM_CFLAGS += -D_REENTRANT
+# Disable largefile support as there are test cases explictly enabling it.
+AM_CFLAGS += -D_REENTRANT @SOLARIS_UNDEF_LARGESOURCE@
endif
if VGCONF_OS_IS_DARWIN
- syscall number for unlinkat() is 76 on Solaris 11, but 65 on illumos [2]
- illumos (in April 2013) changed interface of the accept() and pipe()
syscalls [3]
+- posix_spawn() functionality is backed up by true spawn() syscall on Solaris 12
+ whereas illumos and Solaris 11 leverage vfork()
[1] http://docs.oracle.com/cd/E26502_01/html/E28556/gkzlf.html#gkzip
[2] https://www.illumos.org/issues/521
CFLAGS="$save_CFLAGS"
+# Solaris-specific check determining if gcc enables largefile support by
+# default for 32-bit executables. If it does, then set SOLARIS_UNDEF_LARGESOURCE
+# variable with gcc flags which disable it.
+#
+AC_MSG_CHECKING([if gcc enables largefile support for 32-bit apps (Solaris-specific)])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -m32"
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+ return _LARGEFILE_SOURCE;
+]])], [
+SOLARIS_UNDEF_LARGESOURCE="-U_LARGEFILE_SOURCE -U_LARGEFILE64_SOURCE -U_FILE_OFFSET_BITS"
+AC_MSG_RESULT([yes])
+], [
+SOLARIS_UNDEF_LARGESOURCE=""
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+AC_SUBST(SOLARIS_UNDEF_LARGESOURCE)
+
+
# Solaris-specific check determining if /proc/self/cmdline
# or /proc/<pid>/cmdline is supported.
#