diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/backtrace.c | 4 | ||||
-rw-r--r-- | sal/osl/unx/backtrace.h | 4 | ||||
-rw-r--r-- | sal/osl/unx/file.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_volume.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/interlck.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/nlsupport.cxx | 14 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/security.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/signal.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/system.hxx | 6 | ||||
-rw-r--r-- | sal/osl/unx/thread.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/time.cxx | 2 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File_Const.h | 2 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 4 | ||||
-rw-r--r-- | sal/rtl/alloc_arena.cxx | 2 |
18 files changed, 43 insertions, 43 deletions
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index 5df6fcffd94d..1945f0315b99 100644 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -19,7 +19,7 @@ #include "sal/types.h" -#ifdef SOLARIS +#ifdef __sun #include <dlfcn.h> #include <pthread.h> @@ -128,7 +128,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) } } -#endif /* defined SOLARIS */ +#endif /* defined __sun */ #if defined FREEBSD || defined NETBSD || defined OPENBSD || defined(DRAGONFLY) #include <dlfcn.h> diff --git a/sal/osl/unx/backtrace.h b/sal/osl/unx/backtrace.h index 35d2543f95e5..7cc574bfb867 100644 --- a/sal/osl/unx/backtrace.h +++ b/sal/osl/unx/backtrace.h @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined (SOLARIS) || defined (FREEBSD) || defined (NETBSD) || \ +#if defined (__sun) || defined (FREEBSD) || defined (NETBSD) || \ defined (OPENBSD) || defined (DRAGONFLY) || defined (MACOSX) #ifdef __cplusplus @@ -43,7 +43,7 @@ struct frame { } /* extern "C" */ #endif -#endif /* defined SOLARIS || FREEBSD || NETBSD || OPENBSD */ +#endif /* defined __sun || FREEBSD || NETBSD || OPENBSD */ #if defined (LINUX) #include <execinfo.h> 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)); diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 28ce4a9762a4..0940eab3f9f3 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -44,7 +44,7 @@ #define FREEBSD 1 #endif -#if defined(SOLARIS) +#if defined(__sun) #include <sys/mnttab.h> #include <sys/statvfs.h> @@ -180,7 +180,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI # define OSL_detail_STATFS_IS_CASE_PRESERVING_FS(a) ((OSL_detail_MSDOS_SUPER_MAGIC != (a).f_type)) #endif /* LINUX */ -#if defined(SOLARIS) +#if defined(__sun) # define OSL_detail_STATFS_STRUCT struct statvfs # define OSL_detail_STATFS(dir, sfs) statvfs((dir), (sfs)) # define OSL_detail_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize)) @@ -192,7 +192,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI of the target platforms fix it!!!! */ # define OSL_detail_STATFS_IS_CASE_SENSITIVE_FS(a) (true) # define OSL_detail_STATFS_IS_CASE_PRESERVING_FS(a) (true) -#endif /* SOLARIS */ +#endif /* __sun */ # define OSL_detail_STATFS_INIT(a) (memset(&(a), 0, sizeof(OSL_detail_STATFS_STRUCT))) diff --git a/sal/osl/unx/interlck.cxx b/sal/osl/unx/interlck.cxx index 28ba48eee90a..e799805c98fc 100644 --- a/sal/osl/unx/interlck.cxx +++ b/sal/osl/unx/interlck.cxx @@ -22,9 +22,9 @@ #include <osl/interlck.h> #include <osl/diagnose.h> -#if ( defined ( SOLARIS ) || defined ( NETBSD ) ) && defined ( SPARC ) +#if ( defined (__sun) || defined ( NETBSD ) ) && defined ( SPARC ) #error please use asm/interlck_sparc.s -#elif defined ( SOLARIS) && defined ( X86 ) +#elif defined (__sun) && defined ( X86 ) #error please use asm/interlck_x86.s #elif defined ( __GNUC__ ) && ( defined ( X86 ) || defined ( X86_64 ) ) /* That's possible on x86-64 too since oslInterlockedCount is a sal_Int32 */ diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index 5d27f38b4066..b2afcfdc21e3 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -25,7 +25,7 @@ #include "nlsupport.hxx" -#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || \ +#if defined(LINUX) || defined(__sun) || defined(NETBSD) || \ defined(FREEBSD) || defined(MACOSX) || defined(IOS) || defined(OPENBSD) || \ defined(DRAGONFLY) #include <pthread.h> @@ -36,7 +36,7 @@ #include <osl/module.h> #include <osl/thread.h> #endif /* !MACOSX && !IOS */ -#endif /* LINUX || SOLARIS || NETBSD || MACOSX || IOS */ +#endif /* LINUX || __sun || NETBSD || MACOSX || IOS */ #if defined(MACOSX) || defined(IOS) #include "system.hxx" @@ -226,7 +226,7 @@ static rtl_Locale * parse_locale( const char * locale ) return nullptr; } -#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || \ +#if defined(LINUX) || defined(__sun) || defined(NETBSD) || \ defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) /* @@ -254,7 +254,7 @@ static rtl_Locale * parse_locale( const char * locale ) * to be completely upper- , or lowercase. */ -#if defined(SOLARIS) +#if defined(__sun) /* The values in the below list can be obtained with a script like * #!/bin/sh @@ -562,7 +562,7 @@ static const Pair nl_language_list[] = { { "UTF-8", RTL_TEXTENCODING_UTF8 } /* ISO-10646/UTF-8 */ }; -#endif /* ifdef SOLARIS LINUX FREEBSD NETBSD OPENBSD */ +#endif /* ifdef __sun LINUX FREEBSD NETBSD OPENBSD */ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER; @@ -684,7 +684,7 @@ int imp_setProcessLocale( rtl_Locale * pLocale ) return ret; } -#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD */ +#else /* ifdef LINUX || __sun || MACOSX || NETBSD */ /* * This implementation of osl_getTextEncodingFromLocale maps @@ -943,6 +943,6 @@ int imp_setProcessLocale( rtl_Locale * pLocale ) return 0; } -#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || AIX */ +#endif /* ifdef LINUX || __sun || MACOSX || NETBSD || AIX */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index e43a1c478fd4..52b676ab8827 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -29,7 +29,7 @@ * - cleanup of resource transfer */ -#if defined(SOLARIS) +#if defined(__sun) // The procfs may only be used without LFS in 32bits. # ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS @@ -41,7 +41,7 @@ #endif #include "system.hxx" -#if defined(SOLARIS) +#if defined(__sun) # include <sys/procfs.h> #endif #include <osl/diagnose.h> @@ -1016,7 +1016,7 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F if (Fields & (osl_Process_HEAPUSAGE | osl_Process_CPUTIMES)) { -#if defined(SOLARIS) +#if defined(__sun) int fd; sal_Char name[PATH_MAX + 1]; diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 9e6de6fed3cd..2e27154668a0 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -309,7 +309,7 @@ oslProcessError SAL_CALL osl_setEnvironment(rtl_uString* pustrEnvVar, rtl_uStrin if (pstr_env_var != nullptr && pstr_val != nullptr) { -#if defined (SOLARIS) +#if defined (__sun) rtl_String * pBuffer = NULL; sal_Int32 nCapacity = rtl_stringbuffer_newFromStringBuffer( &pBuffer, @@ -358,7 +358,7 @@ oslProcessError SAL_CALL osl_clearEnvironment(rtl_uString* pustrEnvVar) if (pstr_env_var) { -#if defined (SOLARIS) +#if defined (__sun) rtl_String * pBuffer = NULL; sal_Int32 nCapacity = rtl_stringbuffer_newFromStringBuffer( &pBuffer, diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 8ea26db0e175..55bb6410bd5c 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -38,7 +38,7 @@ #include "osl/thread.h" #include "osl/file.h" -#if defined LINUX || defined SOLARIS +#if defined LINUX || defined __sun #include <crypt.h> #endif @@ -352,7 +352,7 @@ static bool SAL_CALL osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirec if (getuid() == pSecImpl->m_pPasswd.pw_uid) { sal_Char *pStr = nullptr; -#ifdef SOLARIS +#ifdef __sun char buffer[8192]; struct passwd pwd; diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index 389281806e34..b12727225183 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -41,12 +41,12 @@ #define INCLUDE_BACKTRACE #endif -#ifdef SOLARIS +#ifdef __sun #include "backtrace.h" #define INCLUDE_BACKTRACE -#endif /* defined SOLARIS */ +#endif /* defined __sun */ #if defined INCLUDE_BACKTRACE #define MAX_STACK_FRAMES 256 diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 23c8a2a6ff5a..717643175fe8 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -42,10 +42,10 @@ #define HAVE_POLL_H #endif /* HAVE_POLL_H */ -#if defined(SOLARIS) +#if defined(__sun) #include <poll.h> #define HAVE_POLL_H -#endif /* SOLARIS */ +#endif /* __sun */ #ifndef HAVE_POLL_H #define POLLIN 0x0001 diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx index 320b1c763710..4b1462c44c12 100644 --- a/sal/osl/unx/system.hxx +++ b/sal/osl/unx/system.hxx @@ -43,7 +43,7 @@ #include <sys/types.h> /* Make sockets of type AF_UNIX use underlying FS rights */ -#if defined(SOLARIS) && !defined(_XOPEN_SOURCE) +#if defined(__sun) && !defined(_XOPEN_SOURCE) # define _XOPEN_SOURCE 500 # include <sys/socket.h> # undef _XOPEN_SOURCE @@ -182,7 +182,7 @@ # define LIBPATH "LIBPATH" #endif -#ifdef SOLARIS +#ifdef __sun # include <shadow.h> # include <sys/un.h> # include <stropts.h> @@ -240,7 +240,7 @@ int macxp_resolveAlias(char *path, int buflen); #if !defined(_WIN32) && \ !defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && \ !defined(AIX) && \ - !defined(SOLARIS) && !defined(MACOSX) && \ + !defined(__sun) && !defined(MACOSX) && \ !defined(OPENBSD) && !defined(DRAGONFLY) && \ !defined(IOS) && !defined(ANDROID) && \ !defined(EMSCRIPTEN) diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index deed11d8ca0a..80d8cbb51b45 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -711,7 +711,7 @@ static void osl_thread_priority_init_Impl() return; } -#if defined (SOLARIS) +#if defined (__sun) if ( policy >= _SCHED_NEXT) { /* mfe: pthread_getschedparam on Solaris has a possible Bug */ @@ -719,7 +719,7 @@ static void osl_thread_priority_init_Impl() /* so set the policy to a default one */ policy=SCHED_OTHER; } -#endif /* SOLARIS */ +#endif /* __sun */ if ((nRet = sched_get_priority_min(policy) ) != -1) { @@ -812,7 +812,7 @@ void SAL_CALL osl_setThreadPriority ( if (pthread_getschedparam(pImpl->m_hThread, &policy, &Param) != 0) return; /* ESRCH */ -#if defined (SOLARIS) +#if defined (__sun) if ( policy >= _SCHED_NEXT) { /* mfe: pthread_getschedparam on Solaris has a possible Bug */ @@ -820,7 +820,7 @@ void SAL_CALL osl_setThreadPriority ( /* so set the policy to a default one */ policy=SCHED_OTHER; } -#endif /* SOLARIS */ +#endif /* __sun */ pthread_once (&(g_thread.m_once), osl_thread_init_Impl); diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx index 624f820b573c..8fe65f55ea7b 100644 --- a/sal/osl/unx/time.cxx +++ b/sal/osl/unx/time.cxx @@ -37,7 +37,7 @@ defined(LINUX) || defined(OPENBSD) || defined(DRAGONFLY) #define STRUCT_TM_HAS_GMTOFF 1 -#elif defined(SOLARIS) +#elif defined(__sun) #define HAS_ALTZONE 1 #endif diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index ae4243b4b25d..1cffa3010ea7 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -1605,7 +1605,7 @@ namespace osl_FileStatus void getFileType_007() { -#if defined ( SOLARIS ) //Special file is differ in Windows +#if defined(__sun) //Special file is differ in Windows nError1 = ::osl::DirectoryItem::get( aTypeURL2, m_aSpecialItem ); CPPUNIT_ASSERT_EQUAL( nError1, ::osl::FileBase::E_None ); @@ -4783,7 +4783,7 @@ namespace osl_Directory deleteTestDirectory( aTmpName3 ); ::rtl::OString sError = "test for remove function: try to remove a directory that is not empty."; sError += errorToStr( nError1 ).getStr(); -#if defined ( SOLARIS ) +#if defined(__sun) //on UNX, the implementation uses rmdir(), which EEXIST is thrown on Solaris when the directory is not empty, refer to: 'man -s 2 rmdir', while on linux, ENOTEMPTY is thrown. //EEXIST The directory contains entries other than those for "." and "..". printf("#Solaris test\n"); diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h index cd39fb4e0202..b8c7e123107e 100644 --- a/sal/qa/osl/file/osl_File_Const.h +++ b/sal/qa/osl/file/osl_File_Const.h @@ -163,7 +163,7 @@ OUString aTypeURL3( FILE_PREFIX "" ); #if ( defined UNX ) // Unix OUString aVolURL1( FILE_PREFIX ""); //ufs Solaris/Linux -#ifdef SOLARIS +#ifdef __sun OUString aVolURL2( FILE_PREFIX "dev/fd" ); //fd Solaris #else OUString aVolURL2( FILE_PREFIX "dev/floppy/0u1440" ); //fd0 Linux diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 24f8daccd9f8..3353b2e93e90 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -1339,7 +1339,7 @@ namespace osl_Thread } CPPUNIT_TEST_SUITE(setPriority); -#ifndef SOLARIS +#ifndef __sun CPPUNIT_TEST(setPriority_002); CPPUNIT_TEST(setPriority_003); CPPUNIT_TEST(setPriority_004); @@ -1374,7 +1374,7 @@ namespace osl_Thread ThreadHelper::outputPriority(aPriority); // LLA: Priority settings may not work within some OS versions. -#if defined(_WIN32) || defined(SOLARIS) +#if defined(_WIN32) || defined(__sun) CPPUNIT_ASSERT_MESSAGE( "getPriority", aPriority == osl_Thread_PriorityHighest diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 234a3d5c6755..74254ee15451 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -1119,7 +1119,7 @@ SAL_CALL rtl_machdep_alloc ( assert(pArena == gp_machdep_arena); -#if defined(SOLARIS) && defined(SPARC) +#if defined(__sun) && defined(SPARC) /* see @ mmap(2) man pages */ size += (pArena->m_quantum + pArena->m_quantum); /* "red-zone" pages */ if (size > (4 << 20)) |