diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-14 11:22:46 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-14 11:22:46 +0000 |
commit | 40bace2da6f0737503047e588a2a041e5f4e8f1e (patch) | |
tree | f42da6d43e6bdf234e4f5d27b981e3af00c606fc /e_os.h | |
parent | e89c82f549dcc457cbd4ba522f0b0922659cca5c (diff) |
Fix to build better with DJGPP.
PR: 338
Here's the description, submitted by Gisle Vanem <giva@bgnett.no>:
1. sock_init() renamed to ssl_sock_init() in ./apps/s_socket.c due
to name-clash with Watt-32.
2. rand() renamed to Rand() in ./crypto/bn/divtest.c due to name-clash
with <stdlib.h>
3. Added calls to dbug_init()/sock_init() in some demo programs.
4. Changed cflags/lflags in configure. Watt-32 install root now taken
from $WATT_ROOT.
Diffstat (limited to 'e_os.h')
-rw-r--r-- | e_os.h | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -154,6 +154,13 @@ extern "C" { #define readsocket(s,b,n) recv((s),(b),(n),0) #define writesocket(s,b,n) send((s),(b),(n),0) #define EADDRINUSE WSAEADDRINUSE +#elif defined(__DJGPP__) +#define WATT32 +#define get_last_socket_error() errno +#define clear_socket_error() errno=0 +#define closesocket(s) close_s(s) +#define readsocket(s,b,n) read_s(s,b,n) +#define writesocket(s,b,n) send(s,b,n,0) #elif defined(MAC_OS_pre_X) #define get_last_socket_error() errno #define clear_socket_error() errno=0 @@ -207,7 +214,7 @@ extern "C" { # define S_IFMT _S_IFMT # endif -# if !defined(WINNT) +# if !defined(WINNT) && !defined(__DJGPP__) # define NO_SYSLOG # endif # define NO_DIRENT @@ -344,7 +351,7 @@ extern "C" { /*************/ #ifdef USE_SOCKETS -# if (defined(WINDOWS) || defined(MSDOS)) && !defined(__DJGPP__) +# if defined(WINDOWS) || defined(MSDOS) /* windows world */ # ifdef OPENSSL_NO_SOCK @@ -352,13 +359,18 @@ extern "C" { # define SSLeay_Read(a,b,c) (-1) # define SHUTDOWN(fd) close(fd) # define SHUTDOWN2(fd) close(fd) -# else +# elif !defined(__DJGPP__) # include <winsock.h> extern HINSTANCE _hInstance; # define SSLeay_Write(a,b,c) send((a),(b),(c),0) # define SSLeay_Read(a,b,c) recv((a),(b),(c),0) # define SHUTDOWN(fd) { shutdown((fd),0); closesocket(fd); } # define SHUTDOWN2(fd) { shutdown((fd),2); closesocket(fd); } +# else +# define SSLeay_Write(a,b,c) write_s(a,b,c,0) +# define SSLeay_Read(a,b,c) read_s(a,b,c) +# define SHUTDOWN(fd) close_s(fd) +# define SHUTDOWN2(fd) close_s(fd) # endif # elif defined(MAC_OS_pre_X) |