From 6d23cf97443bfedf755341b4f2d0d7fce254e020 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Mon, 12 Jan 2015 17:29:26 -0500 Subject: RT3548: Remove unsupported platforms This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte --- crypto/bio/b_sock.c | 3 +-- crypto/bio/bio_cb.c | 4 ++-- crypto/bio/bss_acpt.c | 6 ------ crypto/bio/bss_conn.c | 8 +------- crypto/bio/bss_file.c | 28 ++++++++++++++-------------- crypto/bio/bss_log.c | 20 ++++++++++---------- 6 files changed, 28 insertions(+), 41 deletions(-) (limited to 'crypto/bio') diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index f13d2ac4b9..f7e95ee5c5 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -150,8 +150,7 @@ int BIO_get_host_ip(const char *str, unsigned char *ip) goto err; } - /* cast to short because of win16 winsock definition */ - if ((short)he->h_addrtype != AF_INET) + if (he->h_addrtype != AF_INET) { BIOerr(BIO_F_BIO_GET_HOST_IP,BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET); goto err; diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c index 9bcbc321d9..dd21d02468 100644 --- a/crypto/bio/bio_cb.c +++ b/crypto/bio/bio_cb.c @@ -63,7 +63,7 @@ #include #include -long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp, +long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret) { BIO *b; @@ -135,7 +135,7 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp, b=(BIO *)bio->cb_arg; if (b != NULL) BIO_write(b,buf,strlen(buf)); -#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16) +#if !defined(OPENSSL_NO_STDIO) else fputs(buf,stderr); #endif diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 0237c0fbc6..1dd6776695 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -64,12 +64,6 @@ #ifndef OPENSSL_NO_SOCK -#ifdef OPENSSL_SYS_WIN16 -#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ -#else -#define SOCKET_PROTOCOL IPPROTO_TCP -#endif - #if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index d2c9695b70..511660427f 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -64,12 +64,6 @@ #ifndef OPENSSL_NO_SOCK -#ifdef OPENSSL_SYS_WIN16 -#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */ -#else -#define SOCKET_PROTOCOL IPPROTO_TCP -#endif - #if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000) /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */ #undef FIONBIO @@ -209,7 +203,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) c->them.sin_addr.s_addr=htonl(l); c->state=BIO_CONN_S_CREATE_SOCKET; - ret=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL); + ret=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); if (ret == INVALID_SOCKET) { SYSerr(SYS_F_SOCKET,get_last_socket_error()); diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index b954fe7ebc..4a4e747bc7 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -95,13 +95,13 @@ #if !defined(OPENSSL_NO_STDIO) -static int MS_CALLBACK file_write(BIO *h, const char *buf, int num); -static int MS_CALLBACK file_read(BIO *h, char *buf, int size); -static int MS_CALLBACK file_puts(BIO *h, const char *str); -static int MS_CALLBACK file_gets(BIO *h, char *str, int size); -static long MS_CALLBACK file_ctrl(BIO *h, int cmd, long arg1, void *arg2); -static int MS_CALLBACK file_new(BIO *h); -static int MS_CALLBACK file_free(BIO *data); +static int file_write(BIO *h, const char *buf, int num); +static int file_read(BIO *h, char *buf, int size); +static int file_puts(BIO *h, const char *str); +static int file_gets(BIO *h, char *str, int size); +static long file_ctrl(BIO *h, int cmd, long arg1, void *arg2); +static int file_new(BIO *h); +static int file_free(BIO *data); static BIO_METHOD methods_filep= { BIO_TYPE_FILE, @@ -202,7 +202,7 @@ BIO_METHOD *BIO_s_file(void) return(&methods_filep); } -static int MS_CALLBACK file_new(BIO *bi) +static int file_new(BIO *bi) { bi->init=0; bi->num=0; @@ -211,7 +211,7 @@ static int MS_CALLBACK file_new(BIO *bi) return(1); } -static int MS_CALLBACK file_free(BIO *a) +static int file_free(BIO *a) { if (a == NULL) return(0); if (a->shutdown) @@ -230,7 +230,7 @@ static int MS_CALLBACK file_free(BIO *a) return(1); } -static int MS_CALLBACK file_read(BIO *b, char *out, int outl) +static int file_read(BIO *b, char *out, int outl) { int ret=0; @@ -250,7 +250,7 @@ static int MS_CALLBACK file_read(BIO *b, char *out, int outl) return(ret); } -static int MS_CALLBACK file_write(BIO *b, const char *in, int inl) +static int file_write(BIO *b, const char *in, int inl) { int ret=0; @@ -270,7 +270,7 @@ static int MS_CALLBACK file_write(BIO *b, const char *in, int inl) return(ret); } -static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) +static long file_ctrl(BIO *b, int cmd, long num, void *ptr) { long ret=1; FILE *fp=(FILE *)b->ptr; @@ -440,7 +440,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr) return(ret); } -static int MS_CALLBACK file_gets(BIO *bp, char *buf, int size) +static int file_gets(BIO *bp, char *buf, int size) { int ret=0; @@ -461,7 +461,7 @@ static int MS_CALLBACK file_gets(BIO *bp, char *buf, int size) return(ret); } -static int MS_CALLBACK file_puts(BIO *bp, const char *str) +static int file_puts(BIO *bp, const char *str) { int n,ret; diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index 2227b2b52d..1cc413a916 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -122,11 +122,11 @@ #define LOG_DAEMON OPC$M_NM_NTWORK #endif -static int MS_CALLBACK slg_write(BIO *h, const char *buf, int num); -static int MS_CALLBACK slg_puts(BIO *h, const char *str); -static long MS_CALLBACK slg_ctrl(BIO *h, int cmd, long arg1, void *arg2); -static int MS_CALLBACK slg_new(BIO *h); -static int MS_CALLBACK slg_free(BIO *data); +static int slg_write(BIO *h, const char *buf, int num); +static int slg_puts(BIO *h, const char *str); +static long slg_ctrl(BIO *h, int cmd, long arg1, void *arg2); +static int slg_new(BIO *h); +static int slg_free(BIO *data); static void xopenlog(BIO* bp, char* name, int level); static void xsyslog(BIO* bp, int priority, const char* string); static void xcloselog(BIO* bp); @@ -149,7 +149,7 @@ BIO_METHOD *BIO_s_log(void) return(&methods_slg); } -static int MS_CALLBACK slg_new(BIO *bi) +static int slg_new(BIO *bi) { bi->init=1; bi->num=0; @@ -158,14 +158,14 @@ static int MS_CALLBACK slg_new(BIO *bi) return(1); } -static int MS_CALLBACK slg_free(BIO *a) +static int slg_free(BIO *a) { if (a == NULL) return(0); xcloselog(a); return(1); } -static int MS_CALLBACK slg_write(BIO *b, const char *in, int inl) +static int slg_write(BIO *b, const char *in, int inl) { int ret= inl; char* buf; @@ -218,7 +218,7 @@ static int MS_CALLBACK slg_write(BIO *b, const char *in, int inl) return(ret); } -static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, void *ptr) +static long slg_ctrl(BIO *b, int cmd, long num, void *ptr) { switch (cmd) { @@ -232,7 +232,7 @@ static long MS_CALLBACK slg_ctrl(BIO *b, int cmd, long num, void *ptr) return(0); } -static int MS_CALLBACK slg_puts(BIO *bp, const char *str) +static int slg_puts(BIO *bp, const char *str) { int n,ret; -- cgit v1.2.3