summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/net.nim4
-rw-r--r--lib/wrappers/openssl.nim8
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/pure/net.nim b/lib/pure/net.nim
index 60298ec88..f63f5fff8 100644
--- a/lib/pure/net.nim
+++ b/lib/pure/net.nim
@@ -232,10 +232,10 @@ when defined(ssl):
 
 proc socketError*(socket: Socket, err: int = -1, async = false,
                   lastError = (-1).OSErrorCode) =
-  ## Raises an EOS error based on the error code returned by ``SSLGetError``
+  ## Raises an OSError based on the error code returned by ``SSLGetError``
   ## (for SSL sockets) and ``osLastError`` otherwise.
   ##
-  ## If ``async`` is ``True`` no error will be thrown in the case when the
+  ## If ``async`` is ``true`` no error will be thrown in the case when the
   ## error was caused by no data being available to be read.
   ##
   ## If ``err`` is not lower than 0 no exception will be raised.
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{.