diff options
| author | jsing <> | 2014-04-17 14:09:44 +0000 |
|---|---|---|
| committer | jsing <> | 2014-04-17 14:09:44 +0000 |
| commit | 0914a3ee8317cea5bf708dacfe811e5856ba7971 (patch) | |
| tree | c61e451cf26539a1efcea25cf56e9c598ce4afaf /src/lib/libssl/src | |
| parent | 0f00f7cfd0532abcf10c5558e3e88bb40abc0a2a (diff) | |
| download | openbsd-0914a3ee8317cea5bf708dacfe811e5856ba7971.tar.gz openbsd-0914a3ee8317cea5bf708dacfe811e5856ba7971.tar.bz2 openbsd-0914a3ee8317cea5bf708dacfe811e5856ba7971.zip | |
Remove defines for unwanted OS support...
ok miod@
Diffstat (limited to 'src/lib/libssl/src')
| -rw-r--r-- | src/lib/libssl/src/apps/s_socket.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c index 07f9934b32..cc02b51b6d 100644 --- a/src/lib/libssl/src/apps/s_socket.c +++ b/src/lib/libssl/src/apps/s_socket.c | |||
| @@ -84,14 +84,8 @@ | |||
| 84 | 84 | ||
| 85 | #ifndef OPENSSL_NO_SOCK | 85 | #ifndef OPENSSL_NO_SOCK |
| 86 | 86 | ||
| 87 | #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK) | ||
| 88 | #include "netdb.h" | ||
| 89 | #endif | ||
| 90 | 87 | ||
| 91 | static struct hostent *GetHostByName(char *name); | 88 | static struct hostent *GetHostByName(char *name); |
| 92 | #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) | ||
| 93 | static void ssl_sock_cleanup(void); | ||
| 94 | #endif | ||
| 95 | static int ssl_sock_init(void); | 89 | static int ssl_sock_init(void); |
| 96 | static int init_server(int *sock, int port, int type); | 90 | static int init_server(int *sock, int port, int type); |
| 97 | static int init_server_long(int *sock, int port,char *ip, int type); | 91 | static int init_server_long(int *sock, int port,char *ip, int type); |
| @@ -99,51 +93,11 @@ static int do_accept(int acc_sock, int *sock, char **host); | |||
| 99 | 93 | ||
| 100 | #define SOCKET_PROTOCOL IPPROTO_TCP | 94 | #define SOCKET_PROTOCOL IPPROTO_TCP |
| 101 | 95 | ||
| 102 | #if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) | ||
| 103 | static int wsa_init_done=0; | ||
| 104 | #endif | ||
| 105 | 96 | ||
| 106 | 97 | ||
| 107 | #if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) | ||
| 108 | static void sock_cleanup(void) | ||
| 109 | { | ||
| 110 | if (wsa_init_done) | ||
| 111 | { | ||
| 112 | wsa_init_done=0; | ||
| 113 | WSACleanup(); | ||
| 114 | } | ||
| 115 | } | ||
| 116 | #endif | ||
| 117 | 98 | ||
| 118 | static int ssl_sock_init(void) | 99 | static int ssl_sock_init(void) |
| 119 | { | 100 | { |
| 120 | #ifdef WATT32 | ||
| 121 | extern int _watt_do_exit; | ||
| 122 | _watt_do_exit = 0; | ||
| 123 | if (sock_init()) | ||
| 124 | return (0); | ||
| 125 | #elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) | ||
| 126 | WORD wVerReq; | ||
| 127 | WSADATA wsaData; | ||
| 128 | int err; | ||
| 129 | |||
| 130 | if (!wsa_init_done) | ||
| 131 | { | ||
| 132 | |||
| 133 | # ifdef SIGINT | ||
| 134 | signal(SIGINT,(void (*)(int))sock_cleanup); | ||
| 135 | # endif | ||
| 136 | |||
| 137 | wsa_init_done=1; | ||
| 138 | wVerReq = MAKEWORD( 2, 0 ); | ||
| 139 | err = WSAStartup(wVerReq,&wsaData); | ||
| 140 | if (err != 0) | ||
| 141 | { | ||
| 142 | BIO_printf(bio_err,"unable to start WINSOCK2, error code=%d\n",err); | ||
| 143 | return(0); | ||
| 144 | } | ||
| 145 | } | ||
| 146 | #endif /* OPENSSL_SYS_WINDOWS */ | ||
| 147 | return(1); | 101 | return(1); |
| 148 | } | 102 | } |
| 149 | 103 | ||
| @@ -174,14 +128,12 @@ int init_client(int *sock, char *host, char *port, int type, int af) | |||
| 174 | { | 128 | { |
| 175 | s=socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); | 129 | s=socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); |
| 176 | if (s == -1) { continue; } | 130 | if (s == -1) { continue; } |
| 177 | #ifndef OPENSSL_SYS_MPE | ||
| 178 | if (type == SOCK_STREAM) | 131 | if (type == SOCK_STREAM) |
| 179 | { | 132 | { |
| 180 | i=0; | 133 | i=0; |
| 181 | i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); | 134 | i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i)); |
| 182 | if (i < 0) { perror("keepalive"); return(0); } | 135 | if (i < 0) { perror("keepalive"); return(0); } |
| 183 | } | 136 | } |
| 184 | #endif | ||
| 185 | if ((i = connect(s, ai->ai_addr, ai->ai_addrlen)) == 0) | 137 | if ((i = connect(s, ai->ai_addr, ai->ai_addrlen)) == 0) |
| 186 | { *sock=s; freeaddrinfo(ai_top); return (1); } | 138 | { *sock=s; freeaddrinfo(ai_top); return (1); } |
| 187 | 139 | ||
| @@ -315,11 +267,6 @@ redoit: | |||
| 315 | ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len); | 267 | ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len); |
| 316 | if (ret == -1) | 268 | if (ret == -1) |
| 317 | { | 269 | { |
| 318 | #if defined(OPENSSL_SYS_WINDOWS) || (defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK)) | ||
| 319 | int i; | ||
| 320 | i=WSAGetLastError(); | ||
| 321 | BIO_printf(bio_err,"accept error %d\n",i); | ||
| 322 | #else | ||
| 323 | if (errno == EINTR) | 270 | if (errno == EINTR) |
| 324 | { | 271 | { |
| 325 | /*check_timeout(); */ | 272 | /*check_timeout(); */ |
| @@ -327,7 +274,6 @@ redoit: | |||
| 327 | } | 274 | } |
| 328 | fprintf(stderr,"errno=%d ",errno); | 275 | fprintf(stderr,"errno=%d ",errno); |
| 329 | perror("accept"); | 276 | perror("accept"); |
| 330 | #endif | ||
| 331 | return(0); | 277 | return(0); |
| 332 | } | 278 | } |
| 333 | 279 | ||
