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 | |
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
55 files changed, 99 insertions, 99 deletions
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 5c23f182ad02..79a875b08a85 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -103,7 +103,7 @@ inline OUString getBuildId() } -#if defined LINUX || defined SOLARIS +#if (defined LINUX || defined __sun) inline OUString getBaseInstallation() { OUString aPathVal("$BRAND_BASE_DIR"); @@ -889,7 +889,7 @@ UpdateCheck::install() OUString aParameter; sal_Int32 nFlags = c3s::SystemShellExecuteFlags::DEFAULTS; -#if ( defined LINUX || defined SOLARIS ) +#if (defined LINUX || defined __sun) nFlags = 42; aParameter = getBaseInstallation(); if( !aParameter.isEmpty() ) diff --git a/extensions/workben/testcomponent.cxx b/extensions/workben/testcomponent.cxx index 47eedfa23669..e9bed4c909b4 100644 --- a/extensions/workben/testcomponent.cxx +++ b/extensions/workben/testcomponent.cxx @@ -43,7 +43,7 @@ using ::rtl::OWStringToOString; // Needed to switch on solaris threads -#ifdef SOLARIS +#ifdef __sun extern "C" void ChangeGlobalInit(); #endif @@ -54,7 +54,7 @@ int SAL_CALL main (int argc, char **argv) printf( "usage : testcomponent service dll [additional dlls]\n" ); exit( 0 ); } -#ifdef SOLARIS +#ifdef __sun // switch on threads in solaris ChangeGlobalInit(); #endif diff --git a/external/jpeg/configs/jconfig.h b/external/jpeg/configs/jconfig.h index 1ac8ea9e5daf..bb8aa9edbc7b 100644 --- a/external/jpeg/configs/jconfig.h +++ b/external/jpeg/configs/jconfig.h @@ -37,7 +37,7 @@ typedef unsigned char boolean; /* #undef RIGHT_SHIFT_IS_UNSIGNED */ #ifdef _WIN32 #define INLINE __inline -#elif defined SOLARIS +#elif defined __sun #define INLINE #else #define INLINE inline diff --git a/external/mysqlcppconn/config.h b/external/mysqlcppconn/config.h index 7736c611f7be..cad5b6786ed8 100644 --- a/external/mysqlcppconn/config.h +++ b/external/mysqlcppconn/config.h @@ -6,7 +6,7 @@ #define HAVE_FUNCTION_STRTOL 1 #define HAVE_FUNCTION_STRTOULL 1 -#if defined(MACOSX) || defined(SOLARIS) || defined(LINUX) || (defined _MSC_VER && _MSC_VER >= 1600) +#if defined(MACOSX) || defined(__sun) || defined(LINUX) || (defined _MSC_VER && _MSC_VER >= 1600) #define HAVE_STDINT_H #ifndef _MSC_VER #define HAVE_INTTYPES_H diff --git a/external/neon/configs/config.h b/external/neon/configs/config.h index 996f74412af2..a2e0c8d9e4bc 100644 --- a/external/neon/configs/config.h +++ b/external/neon/configs/config.h @@ -488,7 +488,7 @@ /* #undef SIZEOF_XML_SIZE */ /* Define to 1 if you have the ANSI C header files. */ -#ifdef SOLARIS +#ifdef __sun #define STDC_HEADERS 1 #endif @@ -530,7 +530,7 @@ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined (SOLARIS) && defined (SPARC) +#if defined (__sun) && defined (SPARC) #define WORDS_BIGENDIAN 1 #endif @@ -556,7 +556,7 @@ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#if defined (SOLARIS) && defined (__SUNPRO_C) +#if defined (__sun) && defined (__SUNPRO_C) #define inline #endif #endif diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 7a9d624088ed..b35f5b7fc71c 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -905,7 +905,7 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen) if (nPolySize==0) return; tools::Polygon aPolygon(nPolySize); for (i=0; i<nPolySize; i++) { -#if defined SOLARIS && defined PPC +#if defined __sun && defined PPC sal_uInt8 nunsignedbyte; *pOS2MET >> nunsignedbyte; aP0.X()+=(sal_Int8)nunsignedbyte; *pOS2MET >> nunsignedbyte; aP0.Y()+=(sal_Int8)nunsignedbyte; diff --git a/hwpfilter/source/fontmap.cxx b/hwpfilter/source/fontmap.cxx index c25ec84eefab..a59d131f8c78 100644 --- a/hwpfilter/source/fontmap.cxx +++ b/hwpfilter/source/fontmap.cxx @@ -18,7 +18,7 @@ */ #include <stdio.h> -#ifdef SOLARIS +#ifdef __sun #include <strings.h> #else #include <string.h> diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index c175ccd1d458..60970fe402d9 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -63,7 +63,7 @@ #include "levdis.hxx" -#ifdef SOLARIS +#ifdef __sun #undef min #endif diff --git a/include/osl/endian.h b/include/osl/endian.h index ebc48541230b..ca3640b8d4a5 100644 --- a/include/osl/endian.h +++ b/include/osl/endian.h @@ -65,7 +65,7 @@ extern "C" { # elif BYTE_ORDER == BIG_ENDIAN # define OSL_BIGENDIAN # endif -#elif defined SOLARIS +#elif defined __sun # include <sys/isa_defs.h> # if defined _LITTLE_ENDIAN # define OSL_LITENDIAN diff --git a/include/sal/alloca.h b/include/sal/alloca.h index ad4f512f7ff0..4a817c7ec87a 100644 --- a/include/sal/alloca.h +++ b/include/sal/alloca.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_SAL_ALLOCA_H #define INCLUDED_SAL_ALLOCA_H -#if defined (SOLARIS) || defined (LINUX) || defined(AIX) || defined(ANDROID) || defined(EMSCRIPTEN) +#if defined (__sun) || defined (LINUX) || defined(AIX) || defined(ANDROID) || defined(EMSCRIPTEN) #ifndef INCLUDED_ALLOCA_H #include <alloca.h> diff --git a/include/sal/config.h b/include/sal/config.h index 9388de9155a5..a363b1922533 100644 --- a/include/sal/config.h +++ b/include/sal/config.h @@ -53,7 +53,7 @@ #endif /* defined WIN32 */ -#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \ +#if defined(__sun) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || \ defined(AIX) || defined(OPENBSD) || defined(DRAGONFLY) || defined(ANDROID) #define SAL_UNX #define SAL_DLLEXTENSION ".so" diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h index 5ef63221f67d..4b977f5bb4f4 100644 --- a/include/sal/mathconf.h +++ b/include/sal/mathconf.h @@ -24,9 +24,9 @@ #include <float.h> -#if defined SOLARIS +#if defined __sun #include <ieeefp.h> -#endif /* SOLARIS */ +#endif /* __sun */ #if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L ) #include <cmath> @@ -62,7 +62,7 @@ extern "C" { /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ -#if !defined SOLARIS && !defined ANDROID \ +#if !defined __sun && !defined ANDROID \ && defined(__cplusplus) \ && ( defined(__GXX_EXPERIMENTAL_CXX0X__) \ || __cplusplus >= 201103L \ diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 65fe6424aa52..01169a741d14 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -1174,7 +1174,7 @@ bool makeDriveLetterSame(OUString * fileURL) } #ifdef UNX -#ifdef SOLARIS +#ifdef __sun void addJavaInfosDirScan( std::vector<rtl::Reference<VendorBase>> & allInfos, @@ -1327,7 +1327,7 @@ void addJavaInfosDirScan( } #endif // MACOSX } -#endif // ifdef SOLARIS +#endif // ifdef __sun #endif // ifdef UNX } diff --git a/onlineupdate/source/update/common/updatedefines.h b/onlineupdate/source/update/common/updatedefines.h index 52a8b8437cc2..73473109e2ae 100644 --- a/onlineupdate/source/update/common/updatedefines.h +++ b/onlineupdate/source/update/common/updatedefines.h @@ -109,7 +109,7 @@ static inline int mywcsprintf(WCHAR* dest, size_t count, const WCHAR* fmt, ...) # include <sys/wait.h> # include <unistd.h> -#ifdef SOLARIS +#ifdef __sun # include <sys/stat.h> #else # include <fts.h> diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index bb2dc35557b3..c8d3bb9bafa0 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -3406,7 +3406,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) return rv; } -#elif defined(SOLARIS) +#elif defined(__sun) int add_dir_entries(const NS_tchar *dirpath, ActionList *list) { int rv = OK; diff --git a/rsc/inc/rsclex.hxx b/rsc/inc/rsclex.hxx index 690b67a8871b..0e1fcf3dd792 100644 --- a/rsc/inc/rsclex.hxx +++ b/rsc/inc/rsclex.hxx @@ -92,7 +92,7 @@ class ObjectStack }; /****************** F o r w a r d s **************************************/ -#if defined ( SOLARIS ) +#if defined(__sun) extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion extern "C" void yyerror( const char * ); extern "C" int yylex(); diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index 0725d8d97ccf..b7446db38a26 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -326,7 +326,7 @@ int yylex() return aKeyVal[ 0 ].nKeyWord; } -#if defined SOLARIS +#if defined __sun extern "C" void yyerror( const char* pMessage ) #else void yyerror( char* pMessage ) 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)) diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx index 419ce7ea799b..baab11f86780 100644 --- a/sax/test/saxdemo.cxx +++ b/sax/test/saxdemo.cxx @@ -470,7 +470,7 @@ void OFileWriter::closeOutput() // Needed to switch on solaris threads -#ifdef SOLARIS +#ifdef __sun extern "C" void ChangeGlobalInit(); #endif int main (int argc, char **argv) @@ -480,7 +480,7 @@ int main (int argc, char **argv) printf( "usage : saxdemo inputfile outputfile\n" ); exit( 0 ); } -#ifdef SOLARIS +#ifdef __sun // switch on threads in solaris ChangeGlobalInit(); #endif diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx index 339ee621f290..8380b3b43de2 100644 --- a/sax/test/testcomponent.cxx +++ b/sax/test/testcomponent.cxx @@ -42,7 +42,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::registry; // Needed to switch on solaris threads -#ifdef SOLARIS +#ifdef __sun extern "C" void ChangeGlobalInit(); #endif @@ -53,7 +53,7 @@ int main (int argc, char **argv) printf( "usage : testcomponent service dll [additional dlls]\n" ); exit( 0 ); } -#ifdef SOLARIS +#ifdef __sun // switch on threads in solaris ChangeGlobalInit(); #endif diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 9a3ae1b14f04..6f1cc0646ecd 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -246,8 +246,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, Graphic aGraphic; SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; -// (wg. Selection Manager bei Trustet Solaris) -#ifndef SOLARIS +// (for Selection Manager in Trusted Solaris) +#ifndef __sun if( aDataHelper.GetGraphic( SotClipboardFormatId::SVXB, aGraphic ) ) nGrFormat = SotClipboardFormatId::SVXB; else if( aDataHelper.GetGraphic( SotClipboardFormatId::GDIMETAFILE, aGraphic ) ) diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index b39c47547a99..50146ced52b0 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1093,8 +1093,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, Graphic aGraphic; SotClipboardFormatId nGrFormat = SotClipboardFormatId::NONE; -// (wg. Selection Manager bei Trustet Solaris) -#ifndef SOLARIS +// (for Selection Manager in Trusted Solaris) +#ifndef __sun if( aDataHelper.GetGraphic( SotClipboardFormatId::SVXB, aGraphic ) ) nGrFormat = SotClipboardFormatId::SVXB; else if( aDataHelper.GetGraphic( SotClipboardFormatId::GDIMETAFILE, aGraphic ) ) diff --git a/setup_native/scripts/source/getuid.c b/setup_native/scripts/source/getuid.c index 2f1aaa45abe7..8d0d9ebc1627 100644 --- a/setup_native/scripts/source/getuid.c +++ b/setup_native/scripts/source/getuid.c @@ -28,7 +28,7 @@ extern "C" { #endif -#ifdef SOLARIS +#ifdef __sun #include <sys/systeminfo.h> #include <strings.h> diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 4721b05c1b4d..c39c7eff154a 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -18,7 +18,7 @@ */ -#ifdef SOLARIS +#ifdef __sun #include <ctime> #endif diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 79f05ab6d9a6..bd592dcb9f87 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef SOLARIS +#ifdef __sun #include <ctime> #endif diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index 061cf8f3d289..f77a2766dcaf 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef SOLARIS +#ifdef __sun #include <ctime> #endif diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 1378d0fd962f..599a206d8706 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -18,7 +18,7 @@ */ -#ifdef SOLARIS +#ifdef __sun #include <ctime> #endif diff --git a/slideshow/source/inc/tools.hxx b/slideshow/source/inc/tools.hxx index bb50d8a7ae3e..039db8339d58 100644 --- a/slideshow/source/inc/tools.hxx +++ b/slideshow/source/inc/tools.hxx @@ -294,7 +294,7 @@ namespace slideshow /// To work around ternary operator in initializer lists /// (Solaris compiler problems) -#ifdef SOLARIS +#ifdef __sun template <typename T> inline T const & ternary_op( const bool cond, T const & arg1, T const & arg2 ) diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 6e4ad01aa508..45e80049ee05 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -1280,7 +1280,7 @@ bool SvtURLBox_Impl::TildeParsing( OUString aUserName = aText.copy( 1, ( nNameEnd != -1 ) ? nNameEnd : ( aText.getLength() - 1 ) ); struct passwd* pPasswd = nullptr; -#ifdef SOLARIS +#ifdef __sun Sequence< sal_Int8 > sBuf( 1024 ); struct passwd aTmp; sal_Int32 nRes = getpwnam_r( OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US ).getStr(), diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index 91c8ea09223a..2c0ebe4a1b53 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -40,7 +40,7 @@ #include <tools/time.hxx> #include <osl/diagnose.h> -#if defined(SOLARIS) && defined(__GNUC__) +#if defined(__sun) && defined(__GNUC__) extern long altzone; #endif @@ -386,7 +386,7 @@ Time tools::Time::GetUTCOffset() nTime = time( nullptr ); localtime_r( &nTime, &aTM ); nLocalTime = mktime( &aTM ); -#if defined( SOLARIS ) +#if defined(__sun) // Solaris gmtime_r() seems not to handle daylight saving time // flags correctly nUTC = nLocalTime + ( aTM.tm_isdst == 0 ? timezone : altzone ); diff --git a/vcl/inc/unx/screensaverinhibitor.hxx b/vcl/inc/unx/screensaverinhibitor.hxx index 80289f4f9e2c..76c57722c338 100644 --- a/vcl/inc/unx/screensaverinhibitor.hxx +++ b/vcl/inc/unx/screensaverinhibitor.hxx @@ -12,7 +12,7 @@ #include <X11/Xlib.h> #include <X11/Xutil.h> -#if !defined(SOLARIS) && !defined(AIX) +#if !defined(__sun) && !defined(AIX) #include <X11/extensions/dpms.h> #endif @@ -38,7 +38,7 @@ private: boost::optional<int> mnXScreenSaverTimeout; -#if !defined(SOLARIS) && !defined(AIX) +#if !defined(__sun) && !defined(AIX) BOOL mbDPMSWasEnabled; CARD16 mnDPMSStandbyTimeout; CARD16 mnDPMSSuspendTimeout; diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx index 21691b56657a..1837364118e4 100644 --- a/vcl/unx/generic/app/i18n_ic.cxx +++ b/vcl/unx/generic/app/i18n_ic.cxx @@ -141,7 +141,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : mpStatusAttributes( nullptr ), mpPreeditAttributes( nullptr ) { -#ifdef SOLARIS +#ifdef __sun static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" ); if( pIIIMPEnable && *pIIIMPEnable ) mnSupportedStatusStyle &= ~XIMStatusCallbacks; diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx index 0f6672d6f6dd..2f09e10b4891 100644 --- a/vcl/unx/generic/app/i18n_im.cxx +++ b/vcl/unx/generic/app/i18n_im.cxx @@ -143,7 +143,7 @@ SetSystemLocale( const char* p_inlocale ) return p_outlocale; } -#ifdef SOLARIS +#ifdef __sun static void SetSystemEnvironment( const OUString& rLocale ) { @@ -206,15 +206,15 @@ SalI18N_InputMethod::SetLocale() { osl_setThreadTextEncoding (RTL_TEXTENCODING_ISO_8859_1); locale = SetSystemLocale( "en_US" ); - #ifdef SOLARIS +#ifdef __sun SetSystemEnvironment( "en_US" ); - #endif +#endif if (! IsXWindowCompatibleLocale(locale)) { locale = SetSystemLocale( "C" ); - #ifdef SOLARIS +#ifdef __sun SetSystemEnvironment( "C" ); - #endif +#endif if (! IsXWindowCompatibleLocale(locale)) mbUseable = False; } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index ab4c73dcb077..4939927bf6a0 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -26,7 +26,7 @@ #include <unistd.h> #include <ctype.h> -#if defined(SOLARIS) || defined(AIX) +#if defined(__sun) || defined(AIX) #include <osl/module.h> #endif @@ -37,7 +37,7 @@ #include <X11/cursorfont.h> #include "unx/x11_cursors/salcursors.h" #include "unx/x11_cursors/invert50.h" -#ifdef SOLARIS +#ifdef __sun #define XK_KOREAN #endif #include <X11/keysym.h> diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 969dfe40410c..2f578f2dd611 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -577,7 +577,7 @@ OString SelectionManager::convertToCompound( const OUString& rText ) { aRet = reinterpret_cast<char*>(aProp.value); XFree( aProp.value ); -#ifdef SOLARIS +#ifdef __sun /* * for currently unknown reasons XmbTextListToTextProperty on Solaris returns * no data in ISO8859-n encodings (at least for n = 1, 15) diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx index 23a28e8d056f..e69323eea817 100644 --- a/vcl/unx/generic/printer/printerinfomanager.cxx +++ b/vcl/unx/generic/printer/printerinfomanager.cxx @@ -372,7 +372,7 @@ void PrinterInfoManager::initialize() * porters: please append your platform to the Solaris * case if your platform has SystemV printing per default. */ - #if defined SOLARIS + #if defined __sun aValue = "lp"; #else aValue = "lpr"; diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx index c63916bb6ca0..bcba9c1f8c0c 100644 --- a/vcl/unx/generic/window/screensaverinhibitor.cxx +++ b/vcl/unx/generic/window/screensaverinhibitor.cxx @@ -322,7 +322,7 @@ void ScreenSaverInhibitor::inhibitXAutoLock( bool bInhibit, Display* pDisplay ) void ScreenSaverInhibitor::inhibitDPMS( bool bInhibit, Display* pDisplay ) { -#if !defined(SOLARIS) && !defined(AIX) +#if !defined(__sun) && !defined(AIX) int dummy; // This won't change while X11 is running, hence // we can evaluate only once and store as static @@ -357,7 +357,7 @@ void ScreenSaverInhibitor::inhibitDPMS( bool bInhibit, Display* pDisplay ) mnDPMSSuspendTimeout, mnDPMSOffTimeout ); } -#endif // !defined(SOLARIS) && !defined(AIX) +#endif // !defined(__sun) && !defined(AIX) } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 2777c36d1864..7ec919744272 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3629,7 +3629,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* pContext, gchar* pTex pThis->updateIMSpotLocation(); } } -#ifdef SOLARIS +#ifdef __sun // #i51356# workaround a solaris IIIMP bug // in case of partial commits the preedit changed signal // and commit signal come in wrong order |