diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-16 14:14:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-17 11:33:57 +0000 |
commit | 2087484c65a3d5e75a9e8ad116d11a4e13366219 (patch) | |
tree | 1f335918a854319df9269329d165a91d711d2108 /jvmfwk | |
parent | d6bf086012343b4a1e27cd4242dced9ee0d73a06 (diff) |
use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro
In this stage we focus on replacing usage of the WIN macro
Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx | 4 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 6 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx | 4 | ||||
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 10 | ||||
-rw-r--r-- | jvmfwk/source/elements.cxx | 2 | ||||
-rw-r--r-- | jvmfwk/source/elements.hxx | 2 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 2 | ||||
-rw-r--r-- | jvmfwk/source/fwkutil.cxx | 4 |
8 files changed, 17 insertions, 17 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx index 7cc13ce11adf..1de6afd210b6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx @@ -36,7 +36,7 @@ Reference<VendorBase> OtherInfo::createInstance() char const* const* OtherInfo::getJavaExePaths(int * size) { static char const * ar[] = { -#if defined(WNT) +#if defined(_WIN32) "bin/java.exe", "jre/bin/java.exe" #elif defined UNX @@ -51,7 +51,7 @@ char const* const* OtherInfo::getJavaExePaths(int * size) char const* const* OtherInfo::getRuntimePaths(int * size) { static char const* ar[]= { -#if defined(WNT) +#if defined(_WIN32) "/bin/client/jvm.dll", "/bin/hotspot/jvm.dll", "/bin/classic/jvm.dll", diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 667b2875cd85..89e1a49bd1ed 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -18,7 +18,7 @@ */ -#ifdef WNT +#ifdef _WIN32 # include <stdio.h> # include <sys/stat.h> # include <windows.h> @@ -497,7 +497,7 @@ javaPluginError jfw_plugin_getJavaInfosFromPath( } -#if defined(WNT) +#if defined(_WIN32) // Load msvcr71.dll using an explicit full path from where it is // present as bundled with the JRE. In case it is not found where we @@ -677,7 +677,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( #if defined(LINUX) if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_NOW)) #else -#if defined(WNT) +#if defined(_WIN32) do_msvcr_magic(sRuntimeLib.pData); #endif if (!moduleRt.load(sRuntimeLib)) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index 29953a693bde..7f7c4943c8be 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -36,7 +36,7 @@ rtl::Reference<VendorBase> SunInfo::createInstance() char const* const* SunInfo::getJavaExePaths(int * size) { static char const * ar[] = { -#if defined(WNT) +#if defined(_WIN32) "java.exe", "bin/java.exe", "jre/bin/java.exe" @@ -53,7 +53,7 @@ char const* const* SunInfo::getJavaExePaths(int * size) char const* const* SunInfo::getRuntimePaths(int * size) { static char const* ar[]= { -#if defined(WNT) +#if defined(_WIN32) "/bin/client/jvm.dll", "/bin/hotspot/jvm.dll", "/bin/classic/jvm.dll", diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index b60b14da629a..4cf18713728a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -40,7 +40,7 @@ #include <algorithm> #include <map> -#if defined WNT +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -63,7 +63,7 @@ using namespace std; using ::rtl::Reference; -#ifdef WNT +#ifdef _WIN32 #define HKEY_SUN_JRE L"Software\\JavaSoft\\Java Runtime Environment" #define HKEY_SUN_SDK L"Software\\JavaSoft\\Java Development Kit" #endif @@ -119,7 +119,7 @@ namespace jfw_plugin { extern VendorSupportMapEntry gVendorMap[]; -#if defined WNT +#if defined(_WIN32) bool getSDKInfoFromRegistry(vector<OUString> & vecHome); bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome); #endif @@ -573,7 +573,7 @@ bool decodeOutput(const OString& s, OUString* out) } -#if defined WNT +#if defined(_WIN32) void addJavaInfoFromWinReg( std::vector<rtl::Reference<VendorBase> > & allInfos, std::vector<rtl::Reference<VendorBase> > & addedInfos) @@ -800,7 +800,7 @@ vector<Reference<VendorBase> > addAllJREInfos( { vector<Reference<VendorBase> > addedInfos; -#if defined WNT +#if defined(_WIN32) // Get Javas from the registry addJavaInfoFromWinReg(allInfos, addedInfos); #endif // WNT diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index d84b52a61d8e..3e9f478c58ea 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -1060,7 +1060,7 @@ JavaInfo * MergedSettings::createJavaInfo() const { return m_javaInfo.makeJavaInfo(); } -#ifdef WNT +#ifdef _WIN32 bool MergedSettings::getJavaInfoAttrAutoSelect() const { return m_javaInfo.bAutoSelect; diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx index 7d457914ca29..21f48baac395 100644 --- a/jvmfwk/source/elements.hxx +++ b/jvmfwk/source/elements.hxx @@ -300,7 +300,7 @@ public: */ OString const & getJavaInfoAttrVendorUpdate() const { return m_javaInfo.sAttrVendorUpdate;} -#ifdef WNT +#ifdef _WIN32 /** returns the javaInfo@autoSelect attribute. Before calling this function loadFromSettings must be called. It uses the javaInfo@autoSelect attribute to determine diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index eb16743f33dc..41269431dd31 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -233,7 +233,7 @@ javaFrameworkError SAL_CALL jfw_startVM( if (aInfo == nullptr) return JFW_E_NO_SELECT; -#ifdef WNT +#ifdef _WIN32 //Because on Windows there is no system setting that we can use to determine //if Assistive Technology Tool support is needed, we ship a .reg file that the //user can use to create a registry setting. When the user forgets to set diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 53e74b2f363c..591a12a2c7ea 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -18,7 +18,7 @@ */ -#if defined WNT +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -61,7 +61,7 @@ bool isAccessibilitySupportDesired() sValue == "1" ) return false; -#ifdef WNT +#ifdef _WIN32 bool retVal = false; HKEY hKey = 0; if (RegOpenKeyEx(HKEY_CURRENT_USER, |