From 5c1e108d29833102db97479c9e096add95b78b04 Mon Sep 17 00:00:00 2001 From: tedu Date: Thu, 17 Apr 2014 22:22:28 +0000 Subject: [PATCH] more windows/netware leftovers --- lib/libcrypto/bio/b_sock.c | 21 +++------------------ lib/libcrypto/bio/bss_dgram.c | 4 ---- lib/libssl/src/crypto/bio/b_sock.c | 21 +++------------------ lib/libssl/src/crypto/bio/bss_dgram.c | 4 ---- 4 files changed, 6 insertions(+), 44 deletions(-) diff --git a/lib/libcrypto/bio/b_sock.c b/lib/libcrypto/bio/b_sock.c index 43b27e04060..b43cb713a7e 100644 --- a/lib/libcrypto/bio/b_sock.c +++ b/lib/libcrypto/bio/b_sock.c @@ -81,21 +81,6 @@ #define MAX_LISTEN 32 #endif -#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) -static int wsa_init_done = 0; -#endif - -/* - * WSAAPI specifier is required to make indirect calls to run-time - * linked WinSock 2 functions used in this module, to be specific - * [get|free]addrinfo and getnameinfo. This is because WinSock uses - * uses non-C calling convention, __stdcall vs. __cdecl, on x86 - * Windows. On non-WinSock platforms WSAAPI needs to be void. - */ -#ifndef WSAAPI -#define WSAAPI -#endif - static int get_ip(const char *str, unsigned char *ip); int @@ -324,13 +309,13 @@ BIO_get_accept_socket(char *host, int bind_mode) do { static union { void *p; - int (WSAAPI *f)(const char *, const char *, + int (*f)(const char *, const char *, const struct addrinfo *, struct addrinfo **); } p_getaddrinfo = {NULL}; static union { void *p; - void (WSAAPI *f)(struct addrinfo *); + void (*f)(struct addrinfo *); } p_freeaddrinfo = {NULL}; struct addrinfo *res, hint; @@ -536,7 +521,7 @@ BIO_accept(int sock, char **addr) size_t nl; static union { void *p; - int (WSAAPI *f)(const struct sockaddr *, + int (*f)(const struct sockaddr *, size_t/*socklen_t*/, char *, size_t, char *, size_t, int); } p_getnameinfo = {NULL}; diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c index c1e85a21c65..69cf436f44b 100644 --- a/lib/libcrypto/bio/bss_dgram.c +++ b/lib/libcrypto/bio/bss_dgram.c @@ -398,11 +398,7 @@ dgram_write(BIO *b, const char *in, int inl) else if (data->peer.sa.sa_family == AF_INET6) peerlen = sizeof(data->peer.sa_in6); #endif -#if defined(NETWARE_CLIB) && defined(NETWARE_BSDSOCK) - ret = sendto(b->num, (char *)in, inl, 0, &data->peer.sa, peerlen); -#else ret = sendto(b->num, in, inl, 0, &data->peer.sa, peerlen); -#endif } BIO_clear_retry_flags(b); diff --git a/lib/libssl/src/crypto/bio/b_sock.c b/lib/libssl/src/crypto/bio/b_sock.c index 43b27e04060..b43cb713a7e 100644 --- a/lib/libssl/src/crypto/bio/b_sock.c +++ b/lib/libssl/src/crypto/bio/b_sock.c @@ -81,21 +81,6 @@ #define MAX_LISTEN 32 #endif -#if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) -static int wsa_init_done = 0; -#endif - -/* - * WSAAPI specifier is required to make indirect calls to run-time - * linked WinSock 2 functions used in this module, to be specific - * [get|free]addrinfo and getnameinfo. This is because WinSock uses - * uses non-C calling convention, __stdcall vs. __cdecl, on x86 - * Windows. On non-WinSock platforms WSAAPI needs to be void. - */ -#ifndef WSAAPI -#define WSAAPI -#endif - static int get_ip(const char *str, unsigned char *ip); int @@ -324,13 +309,13 @@ BIO_get_accept_socket(char *host, int bind_mode) do { static union { void *p; - int (WSAAPI *f)(const char *, const char *, + int (*f)(const char *, const char *, const struct addrinfo *, struct addrinfo **); } p_getaddrinfo = {NULL}; static union { void *p; - void (WSAAPI *f)(struct addrinfo *); + void (*f)(struct addrinfo *); } p_freeaddrinfo = {NULL}; struct addrinfo *res, hint; @@ -536,7 +521,7 @@ BIO_accept(int sock, char **addr) size_t nl; static union { void *p; - int (WSAAPI *f)(const struct sockaddr *, + int (*f)(const struct sockaddr *, size_t/*socklen_t*/, char *, size_t, char *, size_t, int); } p_getnameinfo = {NULL}; diff --git a/lib/libssl/src/crypto/bio/bss_dgram.c b/lib/libssl/src/crypto/bio/bss_dgram.c index c1e85a21c65..69cf436f44b 100644 --- a/lib/libssl/src/crypto/bio/bss_dgram.c +++ b/lib/libssl/src/crypto/bio/bss_dgram.c @@ -398,11 +398,7 @@ dgram_write(BIO *b, const char *in, int inl) else if (data->peer.sa.sa_family == AF_INET6) peerlen = sizeof(data->peer.sa_in6); #endif -#if defined(NETWARE_CLIB) && defined(NETWARE_BSDSOCK) - ret = sendto(b->num, (char *)in, inl, 0, &data->peer.sa, peerlen); -#else ret = sendto(b->num, in, inl, 0, &data->peer.sa, peerlen); -#endif } BIO_clear_retry_flags(b); -- 2.20.1