summary refs log tree commit diff stats
path: root/lib/wrappers/openssl.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-09-05 12:03:53 +0200
committerAraq <rumpf_a@web.de>2015-09-05 12:03:53 +0200
commit0320c0c73b1065492c036eff09fb1a7b424223cc (patch)
treee8ad8a042cfbc419e119a2e4d5a10b28c72ef236 /lib/wrappers/openssl.nim
parent49d810f3410c19803f2d6fbfb3feb03e1fc13fee (diff)
downloadNim-0320c0c73b1065492c036eff09fb1a7b424223cc.tar.gz
fixes DLL hell on Windows
Diffstat (limited to 'lib/wrappers/openssl.nim')
-rw-r--r--lib/wrappers/openssl.nim12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
index 013f26943..90610eb74 100644
--- a/lib/wrappers/openssl.nim
+++ b/lib/wrappers/openssl.nim
@@ -14,9 +14,15 @@
 const useWinVersion = defined(Windows) or defined(nimdoc)
 
 when useWinVersion:
-  const
-    DLLSSLName = "(ssleay32|libssl32).dll"
-    DLLUtilName = "libeay32.dll"
+  when not defined(nimOldDlls) and defined(cpu64):
+    const
+      DLLSSLName = "(ssleay64|libssl64).dll"
+      DLLUtilName = "libeay64.dll"
+  else:
+    const
+      DLLSSLName = "(ssleay32|libssl32).dll"
+      DLLUtilName = "libeay32.dll"
+
   from winlean import SocketHandle
 else:
   const