diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-18 16:39:59 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-19 08:19:38 +0100 |
commit | 697f01e052ae73e88d7e1a37386f2648d57e12e2 (patch) | |
tree | 6dc879a6307ad905b909e0eb88bb143899806279 /sal | |
parent | 161af2120f41f34fe562f677907ccfba41f7012a (diff) |
SAL_W32 is just an alias for _WIN32
...so consistently use the latter instead of the former
Change-Id: I144d5e7c472632f93b2258461510346bc85892d9
Reviewed-on: https://gerrit.libreoffice.org/48135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/alloc_arena.cxx | 16 | ||||
-rw-r--r-- | sal/rtl/alloc_cache.cxx | 14 | ||||
-rw-r--r-- | sal/rtl/alloc_impl.hxx | 4 |
3 files changed, 17 insertions, 17 deletions
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index ef8738fc170f..2d1d17c1378b 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -1020,9 +1020,9 @@ void rtl_arena_foreach (rtl_arena_type *arena, ArenaForeachFn foreachFn, void *u #if defined(SAL_UNX) #include <sys/mman.h> -#elif defined(SAL_W32) +#elif defined(_WIN32) #define MAP_FAILED nullptr -#endif /* SAL_UNX || SAL_W32 */ +#endif /* SAL_UNX || _WIN32 */ namespace { @@ -1061,9 +1061,9 @@ void * rtl_machdep_alloc( #if defined(SAL_UNX) addr = mmap (nullptr, static_cast<size_t>(size), PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); -#elif defined(SAL_W32) +#elif defined(_WIN32) addr = VirtualAlloc (nullptr, (SIZE_T)size, MEM_COMMIT, PAGE_READWRITE); -#endif /* (SAL_UNX || SAL_W32) */ +#endif /* (SAL_UNX || _WIN32) */ if (addr != MAP_FAILED) { @@ -1091,9 +1091,9 @@ void rtl_machdep_free( #if defined(SAL_UNX) (void) munmap(pAddr, nSize); -#elif defined(SAL_W32) +#elif defined(_WIN32) (void) VirtualFree (pAddr, (SIZE_T)0, MEM_RELEASE); -#endif /* (SAL_UNX || SAL_W32) */ +#endif /* (SAL_UNX || _WIN32) */ } sal_Size rtl_machdep_pagesize() @@ -1104,11 +1104,11 @@ sal_Size rtl_machdep_pagesize() #else /* POSIX */ return static_cast<sal_Size>(sysconf(_SC_PAGESIZE)); #endif /* xBSD || POSIX */ -#elif defined(SAL_W32) +#elif defined(_WIN32) SYSTEM_INFO info; GetSystemInfo (&info); return (sal_Size)info.dwPageSize; -#endif /* (SAL_UNX || SAL_W32) */ +#endif /* (SAL_UNX || _WIN32) */ } } //namespace diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx index d9aeb7edcc77..a753b2060d20 100644 --- a/sal/rtl/alloc_cache.cxx +++ b/sal/rtl/alloc_cache.cxx @@ -44,10 +44,10 @@ struct rtl_cache_list_st #if defined(SAL_UNX) pthread_t m_update_thread; pthread_cond_t m_update_cond; -#elif defined(SAL_W32) +#elif defined(_WIN32) HANDLE m_update_thread; HANDLE m_update_cond; -#endif /* SAL_UNX || SAL_W32 */ +#endif /* SAL_UNX || _WIN32 */ int m_update_done; }; @@ -1225,7 +1225,7 @@ static void rtl_cache_wsupdate_fini() pthread_join (g_cache_list.m_update_thread, nullptr); } -#elif defined(SAL_W32) +#elif defined(_WIN32) void SAL_CALL rtl_secureZeroMemory(void *Ptr, sal_Size Bytes) SAL_THROW_EXTERN_C() { @@ -1267,7 +1267,7 @@ static void rtl_cache_wsupdate_fini() WaitForSingleObject (g_cache_list.m_update_thread, INFINITE); } -#endif /* SAL_UNX || SAL_W32 */ +#endif /* SAL_UNX || _WIN32 */ /** update depot stats and purge excess magazines. @@ -1317,9 +1317,9 @@ static void rtl_cache_wsupdate(rtl_cache_type * cache) #if defined(SAL_UNX) static void * -#elif defined(SAL_W32) +#elif defined(_WIN32) static DWORD WINAPI -#endif /* SAL_UNX || SAL_W32 */ +#endif /* SAL_UNX || _WIN32 */ rtl_cache_wsupdate_all(void * arg) { osl::Thread::setName("rtl_cache_wsupdate_all"); @@ -1347,7 +1347,7 @@ rtl_cache_wsupdate_all(void * arg) #if defined(SAL_UNX) return nullptr; -#elif defined(SAL_W32) +#elif defined(_WIN32) return 0; #endif } diff --git a/sal/rtl/alloc_impl.hxx b/sal/rtl/alloc_impl.hxx index bdf4e7b6eb81..bb46a544f7b0 100644 --- a/sal/rtl/alloc_impl.hxx +++ b/sal/rtl/alloc_impl.hxx @@ -190,7 +190,7 @@ typedef pthread_mutex_t rtl_memory_lock_type; #define RTL_MEMORY_LOCK_ACQUIRE(lock) pthread_mutex_lock((lock)) #define RTL_MEMORY_LOCK_RELEASE(lock) pthread_mutex_unlock((lock)) -#elif defined(SAL_W32) +#elif defined(_WIN32) #define WIN32_LEAN_AND_MEAN #ifdef _MSC_VER @@ -211,7 +211,7 @@ typedef CRITICAL_SECTION rtl_memory_lock_type; #else #error Unknown platform -#endif /* SAL_UNX | SAL_W32 */ +#endif /* SAL_UNX | _WIN32 */ /** Cache creation flags. @internal |