summaryrefslogtreecommitdiffstats
path: root/apps/s_socket.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-01-12 23:29:26 +0100
committerRich Salz <rsalz@openssl.org>2015-01-12 23:30:54 +0100
commit6d23cf97443bfedf755341b4f2d0d7fce254e020 (patch)
treeef52ffc0029a579d35439f2dc0ba2deee966ed93 /apps/s_socket.c
parentAllow multiple IDN xn-- indicators (diff)
downloadopenssl-6d23cf97443bfedf755341b4f2d0d7fce254e020.tar.xz
openssl-6d23cf97443bfedf755341b4f2d0d7fce254e020.zip
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 <levitte@openssl.org>
Diffstat (limited to 'apps/s_socket.c')
-rw-r--r--apps/s_socket.c51
1 files changed, 3 insertions, 48 deletions
diff --git a/apps/s_socket.c b/apps/s_socket.c
index f44050db40..397cb1effc 100644
--- a/apps/s_socket.c
+++ b/apps/s_socket.c
@@ -107,12 +107,6 @@ static int init_server_unix(int *sock, const char *path);
static int do_accept_unix(int acc_sock, int *sock);
#endif
-#ifdef OPENSSL_SYS_WIN16
-#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
-#else
-#define SOCKET_PROTOCOL IPPROTO_TCP
-#endif
-
#if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
static int wsa_init_done=0;
#endif
@@ -121,36 +115,6 @@ static int wsa_init_done=0;
static struct WSAData wsa_state;
static int wsa_init_done=0;
-#ifdef OPENSSL_SYS_WIN16
-static HWND topWnd=0;
-static FARPROC lpTopWndProc=NULL;
-static FARPROC lpTopHookProc=NULL;
-extern HINSTANCE _hInstance; /* nice global CRT provides */
-
-static LONG FAR PASCAL topHookProc(HWND hwnd, UINT message, WPARAM wParam,
- LPARAM lParam)
- {
- if (hwnd == topWnd)
- {
- switch(message)
- {
- case WM_DESTROY:
- case WM_CLOSE:
- SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopWndProc);
- ssl_sock_cleanup();
- break;
- }
- }
- return CallWindowProc(lpTopWndProc,hwnd,message,wParam,lParam);
- }
-
-static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
- {
- topWnd=hwnd;
- return(FALSE);
- }
-
-#endif /* OPENSSL_SYS_WIN32 */
#endif /* OPENSSL_SYS_WINDOWS */
#ifdef OPENSSL_SYS_WINDOWS
@@ -199,14 +163,6 @@ static int ssl_sock_init(void)
BIO_printf(bio_err,"unable to start WINSOCK, error code=%d\n",err);
return(0);
}
-
-#ifdef OPENSSL_SYS_WIN16
- EnumTaskWindows(GetCurrentTask(),enumproc,0L);
- lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC);
- lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance);
-
- SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
-#endif /* OPENSSL_SYS_WIN16 */
}
#elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)
WORD wVerReq;
@@ -263,7 +219,7 @@ static int init_client_ip(int *sock, const unsigned char ip[4], int port,
them.sin_addr.s_addr=htonl(addr);
if (type == SOCK_STREAM)
- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+ s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
else /* ( type == SOCK_DGRAM) */
s=socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
@@ -412,7 +368,7 @@ static int init_server_long(int *sock, int port, char *ip, int type)
#endif
if (type == SOCK_STREAM)
- s=socket(AF_INET,SOCK_STREAM,SOCKET_PROTOCOL);
+ s=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
else /* type == SOCK_DGRAM */
s=socket(AF_INET, SOCK_DGRAM,IPPROTO_UDP);
@@ -667,8 +623,7 @@ static int host_ip(const char *str, unsigned char ip[4])
BIO_printf(bio_err,"gethostbyname failure\n");
goto err;
}
- /* cast to short because of win16 winsock definition */
- if ((short)he->h_addrtype != AF_INET)
+ if (he->h_addrtype != AF_INET)
{
BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
return(0);