From f642ebc1e2dca34bc2b3c46796c131e1f5077bee Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Sat, 9 Aug 2014 08:02:20 -0400 Subject: Undo a90081576c94f9f54de1755188a00ccc1760549a Undo unapproved commit that removed DJGPP and WATT32 --- crypto/bio/b_sock.c | 12 +++++++++++- crypto/bio/bss_dgram.c | 6 ++++++ crypto/bio/bss_log.c | 8 ++++++-- crypto/bio/bss_sock.c | 6 ++++++ 4 files changed, 29 insertions(+), 3 deletions(-) (limited to 'crypto/bio') diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 4544ab209c..a026b3e0b0 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -494,6 +494,12 @@ int BIO_sock_init(void) } } #endif /* OPENSSL_SYS_WINDOWS */ +#ifdef WATT32 + extern int _watt_do_exit; + _watt_do_exit = 0; /* don't make sock_init() call exit() */ + if (sock_init()) + return (-1); +#endif #if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) WORD wVerReq; @@ -543,6 +549,9 @@ int BIO_socket_ioctl(int fd, long type, void *arg) { int i; +#ifdef __DJGPP__ + i=ioctlsocket(fd,type,(char *)arg); +#else # if defined(OPENSSL_SYS_VMS) /* 2011-02-18 SMS. * VMS ioctl() can't tolerate a 64-bit "void *arg", but we @@ -565,8 +574,9 @@ int BIO_socket_ioctl(int fd, long type, void *arg) # else /* defined(OPENSSL_SYS_VMS) */ # define ARG arg # endif /* defined(OPENSSL_SYS_VMS) [else] */ - i=ioctlsocket(fd,type,ARG); + i=ioctlsocket(fd,type,ARG); +#endif /* __DJGPP__ */ if (i < 0) SYSerr(SYS_F_IOCTLSOCKET,get_last_socket_error()); return(i); diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 25d5195bc2..9c0950191b 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -95,6 +95,12 @@ ((a)->s6_addr32[2] == htonl(0x0000ffff))) #endif +#ifdef WATT32 +#define sock_write SockWrite /* Watt-32 uses same names */ +#define sock_read SockRead +#define sock_puts SockPuts +#endif + static int dgram_write(BIO *h, const char *buf, int num); static int dgram_read(BIO *h, char *buf, int size); static int dgram_puts(BIO *h, const char *str); diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index 7b6eb73152..2227b2b52d 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -88,7 +88,7 @@ # include #elif defined(OPENSSL_SYS_NETWARE) # define NO_SYSLOG -#elif !defined(MSDOS) && !defined(OPENSSL_SYS_VXWORKS) && !defined(NO_SYSLOG) +#elif (!defined(MSDOS) || defined(WATT32)) && !defined(OPENSSL_SYS_VXWORKS) && !defined(NO_SYSLOG) # include #endif @@ -373,11 +373,15 @@ static void xcloselog(BIO* bp) { } -#else /* Unix */ +#else /* Unix/Watt32 */ static void xopenlog(BIO* bp, char* name, int level) { +#ifdef WATT32 /* djgpp/DOS */ + openlog(name, LOG_PID|LOG_CONS|LOG_NDELAY, level); +#else openlog(name, LOG_PID|LOG_CONS, level); +#endif } static void xsyslog(BIO *bp, int priority, const char *string) diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index 4e1b3d5fa1..3df31938c1 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -65,6 +65,12 @@ #include +#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); -- cgit v1.2.3