aboutsummaryrefslogtreecommitdiffstats
path: root/common/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/init.c')
-rw-r--r--common/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/init.c b/common/init.c
index 8ea51c8b0..ebe73ee6a 100644
--- a/common/init.c
+++ b/common/init.c
@@ -73,6 +73,9 @@ gpg_err_source_t default_errsource = 0;
#if HAVE_W32_SYSTEM
static void prepare_w32_commandline (int *argcp, char ***argvp);
+
+/* Whether or not if this program is running under Wine. */
+int windows_semihosted_by_wine;
#endif /*HAVE_W32_SYSTEM*/
@@ -167,6 +170,12 @@ _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp)
WSAStartup (0x202, &wsadat);
}
+ {
+ HMODULE hntdll = GetModuleHandle ("ntdll.dll");
+ if (hntdll
+ && GetProcAddress (hntdll, "wine_get_version"))
+ windows_semihosted_by_wine = 1;
+ }
#endif
if (!gcry_check_version (NEED_LIBGCRYPT_VERSION))