Revert previous MTU patch from PR#1929
[openssl.git] / crypto / bio / bss_sock.c
index fdabd16d7eaab7e97435ee4063b6fd72401a2a96..30c3ceab468cf1ca50a9bb65e8f51dbda014d727 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifndef OPENSSL_NO_SOCK
-
 #include <stdio.h>
 #include <errno.h>
 #define USE_SOCKETS
 #include "cryptlib.h"
+
+#ifndef OPENSSL_NO_SOCK
+
 #include <openssl/bio.h>
 
+#ifdef WATT32
+#define sock_write SockWrite  /* Watt-32 uses same names */
+#define sock_read  SockRead
+#define sock_puts  SockPuts
+#endif
+
 static int sock_write(BIO *h, const char *buf, int num);
 static int sock_read(BIO *h, char *buf, int size);
 static int sock_puts(BIO *h, const char *str);
@@ -242,7 +249,7 @@ int BIO_sock_non_fatal_error(int err)
        {
        switch (err)
                {
-#if defined(OPENSSL_SYS_WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE)
 # if defined(WSAEWOULDBLOCK)
        case WSAEWOULDBLOCK:
 # endif
@@ -273,7 +280,7 @@ int BIO_sock_non_fatal_error(int err)
 #endif
 
 #ifdef EAGAIN
-#if EWOULDBLOCK != EAGAIN
+# if EWOULDBLOCK != EAGAIN
        case EAGAIN:
 # endif
 #endif
@@ -296,4 +303,5 @@ int BIO_sock_non_fatal_error(int err)
                }
        return(0);
        }
-#endif
+
+#endif  /* #ifndef OPENSSL_NO_SOCK */