diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-01-17 16:13:54 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-01-17 16:38:33 +0100 |
commit | 0cee740c95496210d62206a21e8bc9adebf4fa4d (patch) | |
tree | 4a1ff295046962418b30ac244314dfee5fb92fb5 /sal/osl/unx/file.cxx | |
parent | b170265a6bba70faf1cb4172834586f4f45dd2bf (diff) |
replace #ifdef SOLARIS with #ifdef __sun
Check for a macro that is defined by the compiler, we don't really need
one defined by the build system.
Change-Id: Iccb8e3198396881395c97a6b81690ebe64b7e9d2
Diffstat (limited to 'sal/osl/unx/file.cxx')
-rw-r--r-- | sal/osl/unx/file.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 4751dc2da581..1d673cdb2f8c 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -1202,13 +1202,13 @@ SAL_CALL osl_mapFile ( // OS simultaneously pages in the rest); on other platforms, it remains // to be evaluated whether madvise or equivalent is available and // actually useful: -#if defined MACOSX || ( defined(SOLARIS) && ( !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) ) ) +#if defined MACOSX || (defined(__sun) && (!defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__))) int e = posix_madvise(p, nLength, POSIX_MADV_WILLNEED); if (e != 0) { SAL_INFO("sal.file", "posix_madvise(..., POSIX_MADV_WILLNEED) failed with " << e); } -#elif defined SOLARIS +#elif defined __sun if (madvise(static_cast< caddr_t >(p), nLength, MADV_WILLNEED) != 0) { SAL_INFO("sal.file", "madvise(..., MADV_WILLNEED) failed with " << strerror(errno)); |