summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-01-03 22:43:04 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-01-03 22:43:04 +0000
commiteef0c1f34c7b7d6a38e02f3294eb509aef081749 (patch)
treefb49441433ca3bf20230eeeca5a6e423a9888174 /e_os.h
parent82a243132723ac27a81d689722e94e05e18992a0 (diff)
Netware support.
Submitted by: Guenter Knauf <eflash@gmx.net>
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/e_os.h b/e_os.h
index 04bff2af14..01d7963ecc 100644
--- a/e_os.h
+++ b/e_os.h
@@ -190,9 +190,15 @@ extern "C" {
#define get_last_socket_error() errno
#define clear_socket_error() errno=0
#define closesocket(s) close(s)
+#define ioctlsocket(a,b,c) ioctl(a,b,c)
+#if defined(NETWARE_LIBC)
#define readsocket(s,b,n) recv((s),(b),(n),0)
#define writesocket(s,b,n) send((s),(b),(n),0)
#else
+#define readsocket(s,b,n) recv((s),(char*)(b),(n),0)
+#define writesocket(s,b,n) send((s),(char*)(b),(n),0)
+#endif
+#else
#define get_last_socket_error() WSAGetLastError()
#define clear_socket_error() WSASetLastError(0)
#define readsocket(s,b,n) recv((s),(b),(n),0)
@@ -390,6 +396,11 @@ static unsigned int _strlen31(const char *str)
# undef DEVRANDOM
# ifdef NETWARE_CLIB
# define getpid GetThreadID
+ extern int GetThreadID(void);
+/* # include <conio.h> */
+ extern int kbhit(void);
+# else
+# include <screen.h>
# endif
# define NO_SYSLOG
# define _setmode setmode
@@ -505,7 +516,11 @@ static unsigned int _strlen31(const char *str)
# include <sys/socket.h>
# include <netinet/in.h>
# include <sys/time.h>
-# include <sys/select.h>
+# if defined(NETWARE_CLIB)
+# include <sys/bsdskt.h>
+# else
+# include <sys/select.h>
+# endif
# define INVALID_SOCKET (int)(~0)
# else
# include <novsock2.h>
@@ -637,16 +652,12 @@ extern char *sys_errlist[]; extern int sys_nerr;
#elif defined(OPENSSL_SYS_OS2) && defined(__EMX__)
# define strcasecmp stricmp
# define strncasecmp strnicmp
-#elif defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_CLIB)
-# define strcasecmp stricmp
-# define strncasecmp strnicmp
-#else
-# ifdef NO_STRINGS_H
- int strcasecmp();
- int strncasecmp();
-# else
-# include <strings.h>
-# endif /* NO_STRINGS_H */
+#elif defined(OPENSSL_SYS_NETWARE)
+# include <string.h>
+# if defined(NETWARE_CLIB)
+# define strcasecmp stricmp
+# define strncasecmp strnicmp
+# endif /* NETWARE_CLIB */
#endif
#if defined(OPENSSL_SYS_OS2) && defined(__EMX__)