summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/config.h1
-rw-r--r--src/lib/cross.cc13
-rw-r--r--src/lib/cross.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index e25cb06da..29511b1fe 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -377,6 +377,7 @@ public:
NAG_INITIAL_SETUP,
NAG_IMPORT_DECRYPTION_CHAIN,
NAG_DELETE_DKDM,
+ NAG_32_ON_64,
NAG_COUNT
};
diff --git a/src/lib/cross.cc b/src/lib/cross.cc
index 171bf2c81..a7fb298cb 100644
--- a/src/lib/cross.cc
+++ b/src/lib/cross.cc
@@ -501,3 +501,16 @@ command_and_read (string cmd)
return "";
}
+
+/** @return true if this process is a 32-bit one running on a 64-bit-capable OS */
+bool
+running_32_on_64 ()
+{
+#ifdef DCPOMATIC_WINDOWS
+ BOOL p;
+ IsWow64Process (GetCurrentProcess(), &p);
+ return p;
+#endif
+ /* XXX: assuming nobody does this on Linux / OS X */
+ return false;
+}
diff --git a/src/lib/cross.h b/src/lib/cross.h
index 06e198e99..2e8b8e429 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -57,6 +57,7 @@ extern uint64_t thread_id ();
extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int flags);
extern boost::filesystem::path home_directory ();
extern std::string command_and_read (std::string cmd);
+extern bool running_32_on_64 ();
/** @class Waker
* @brief A class which tries to keep the computer awake on various operating systems.