Make sure we get the definition of OPENSSL_NO_SOCK.
[openssl.git] / crypto / bio / b_sock.c
index a7da2581014275ce32421a11dd3ce0ddb2ee3732..c5010080281a408e3eb3ccf4ee84e5bf767c09c5 100644 (file)
@@ -56,8 +56,6 @@
  * [including the GNU Public Licence.]
  */
 
-#ifndef OPENSSL_NO_SOCK
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -65,6 +63,8 @@
 #include "cryptlib.h"
 #include <openssl/bio.h>
 
+#ifndef OPENSSL_NO_SOCK
+
 #ifdef OPENSSL_SYS_WIN16
 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
 #else
@@ -482,7 +482,9 @@ void BIO_sock_cleanup(void)
        if (wsa_init_done)
                {
                wsa_init_done=0;
+#ifndef OPENSSL_SYS_WINCE
                WSACancelBlockingCall();
+#endif
                WSACleanup();
                }
 #endif
@@ -490,7 +492,7 @@ void BIO_sock_cleanup(void)
 
 #if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000
 
-int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
+int BIO_socket_ioctl(int fd, long type, void *arg)
        {
        int i;
 
@@ -740,7 +742,7 @@ int BIO_set_tcp_ndelay(int s, int on)
 int BIO_socket_nbio(int s, int mode)
        {
        int ret= -1;
-       unsigned long l;
+       int l;
 
        l=mode;
 #ifdef FIONBIO