summary refs log tree commit diff stats
path: root/lib/wrappers
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-10-27 00:12:36 +0100
committerAraq <rumpf_a@web.de>2014-10-27 00:12:36 +0100
commit73ff0432dc374057d817c95be074737b82c3024c (patch)
treee5961aaf34765404608f853143312bc1fde809b1 /lib/wrappers
parent0e439ce36738170bbc1097fcedfed5def7514a31 (diff)
downloadNim-73ff0432dc374057d817c95be074737b82c3024c.tar.gz
docgen works on linux
Diffstat (limited to 'lib/wrappers')
-rw-r--r--lib/wrappers/openssl.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim
index abdfcdb52..6e85fb9dd 100644
--- a/lib/wrappers/openssl.nim
+++ b/lib/wrappers/openssl.nim
@@ -41,7 +41,9 @@
 
 {.deadCodeElim: on.}
 
-when defined(WINDOWS): 
+const useWinVersion = defined(Windows) or defined(nimdoc)
+
+when useWinVersion: 
   const 
     DLLSSLName = "(ssleay32|libssl32).dll"
     DLLUtilName = "libeay32.dll"
@@ -270,12 +272,12 @@ proc OpenSSL_add_all_algorithms*(){.cdecl, dynlib: DLLUtilName, importc: "OPENSS
 
 proc OPENSSL_config*(configName: cstring){.cdecl, dynlib: DLLSSLName, importc.}
 
-when not defined(windows):
+when not useWinVersion:
   proc CRYPTO_set_mem_functions(a,b,c: pointer){.cdecl, 
     dynlib: DLLUtilName, importc.}
 
 proc CRYPTO_malloc_init*() =
-  when not defined(windows):
+  when not useWinVersion:
     CRYPTO_set_mem_functions(alloc, realloc, dealloc)
 
 proc SSL_CTX_ctrl*(ctx: SslCtx, cmd: cInt, larg: int, parg: pointer): int{.