aboutsummaryrefslogtreecommitdiff
path: root/e_os.h
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2008-09-21 14:56:30 +0000
commitbb1499d2aac1d25a95b8573ff425751f06f159e1 (patch)
treea136b5b2317abe8eb83b021afe5e088230fd67e2 /e_os.h
parentee266f1253f9cc49430572463d26f72910dfb49e (diff)
downloadsrc-bb1499d2aac1d25a95b8573ff425751f06f159e1.tar.gz
src-bb1499d2aac1d25a95b8573ff425751f06f159e1.zip
Vendor import of OpenSSL 0.9.8i.vendor/openssl/0.9.8i
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=183234 svn path=/vendor-crypto/openssl/0.9.8i/; revision=193572; tag=vendor/openssl/0.9.8i
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h42
1 files changed, 31 insertions, 11 deletions
diff --git a/e_os.h b/e_os.h
index 5068d1bd74fe..acc6a15eb7c7 100644
--- a/e_os.h
+++ b/e_os.h
@@ -186,9 +186,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)
@@ -277,6 +283,14 @@ static unsigned int _strlen31(const char *str)
}
# endif
# include <malloc.h>
+# if defined(_MSC_VER) && _MSC_VER<=1200 && defined(_MT) && defined(isspace)
+ /* compensate for bug is VC6 ctype.h */
+# undef isspace
+# undef isdigit
+# undef isalnum
+# undef isupper
+# undef isxdigit
+# endif
# endif
# include <io.h>
# include <fcntl.h>
@@ -371,6 +385,12 @@ 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);
+ extern void delay(unsigned milliseconds);
+# else
+# include <screen.h>
# endif
# define NO_SYSLOG
# define _setmode setmode
@@ -471,7 +491,11 @@ extern HINSTANCE _hInstance;
# 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>
@@ -613,16 +637,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__)