diff options
| author | jsing <> | 2014-04-15 17:25:41 +0000 |
|---|---|---|
| committer | jsing <> | 2014-04-15 17:25:41 +0000 |
| commit | 132a4cce42485cfd13bf12c1213cf1a63b5b1da2 (patch) | |
| tree | c99aff5cf18e944ed170f9de7bd1679f2e67cab7 /src/lib/libcrypto/bio/b_sock.c | |
| parent | 38d2a9c7ea9a14075bd1776e52b92232fae3d6d8 (diff) | |
| download | openbsd-132a4cce42485cfd13bf12c1213cf1a63b5b1da2.tar.gz openbsd-132a4cce42485cfd13bf12c1213cf1a63b5b1da2.tar.bz2 openbsd-132a4cce42485cfd13bf12c1213cf1a63b5b1da2.zip | |
Toss a `unifdef -U OPENSSL_SYS_WINDOWS' bomb into crypto/bio.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/bio/b_sock.c')
| -rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index d739452580..2a9159ec55 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
| @@ -457,27 +457,6 @@ end: | |||
| 457 | int | 457 | int |
| 458 | BIO_sock_init(void) | 458 | BIO_sock_init(void) |
| 459 | { | 459 | { |
| 460 | #ifdef OPENSSL_SYS_WINDOWS | ||
| 461 | static struct WSAData wsa_state; | ||
| 462 | |||
| 463 | if (!wsa_init_done) { | ||
| 464 | int err; | ||
| 465 | |||
| 466 | wsa_init_done = 1; | ||
| 467 | memset(&wsa_state, 0, sizeof(wsa_state)); | ||
| 468 | /* Not making wsa_state available to the rest of the | ||
| 469 | * code is formally wrong. But the structures we use | ||
| 470 | * are [beleived to be] invariable among Winsock DLLs, | ||
| 471 | * while API availability is [expected to be] probed | ||
| 472 | * at run-time with DSO_global_lookup. */ | ||
| 473 | if (WSAStartup(0x0202, &wsa_state) != 0) { | ||
| 474 | err = WSAGetLastError(); | ||
| 475 | SYSerr(SYS_F_WSASTARTUP, err); | ||
| 476 | BIOerr(BIO_F_BIO_SOCK_INIT, BIO_R_WSASTARTUP); | ||
| 477 | return (-1); | ||
| 478 | } | ||
| 479 | } | ||
| 480 | #endif /* OPENSSL_SYS_WINDOWS */ | ||
| 481 | #ifdef WATT32 | 460 | #ifdef WATT32 |
| 482 | extern int _watt_do_exit; | 461 | extern int _watt_do_exit; |
| 483 | _watt_do_exit = 0; | 462 | _watt_do_exit = 0; |
| @@ -509,15 +488,7 @@ BIO_sock_init(void) | |||
| 509 | void | 488 | void |
| 510 | BIO_sock_cleanup(void) | 489 | BIO_sock_cleanup(void) |
| 511 | { | 490 | { |
| 512 | #ifdef OPENSSL_SYS_WINDOWS | 491 | #if defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) |
| 513 | if (wsa_init_done) { | ||
| 514 | wsa_init_done = 0; | ||
| 515 | #if 0 /* this call is claimed to be non-present in Winsock2 */ | ||
| 516 | WSACancelBlockingCall(); | ||
| 517 | #endif | ||
| 518 | WSACleanup(); | ||
| 519 | } | ||
| 520 | #elif defined(OPENSSL_SYS_NETWARE) && !defined(NETWARE_BSDSOCK) | ||
| 521 | if (wsa_init_done) { | 492 | if (wsa_init_done) { |
| 522 | wsa_init_done = 0; | 493 | wsa_init_done = 0; |
| 523 | WSACleanup(); | 494 | WSACleanup(); |
| @@ -738,14 +709,7 @@ again: | |||
| 738 | #ifdef SO_REUSEADDR | 709 | #ifdef SO_REUSEADDR |
| 739 | err_num = errno; | 710 | err_num = errno; |
| 740 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && | 711 | if ((bind_mode == BIO_BIND_REUSEADDR_IF_UNUSED) && |
| 741 | #ifdef OPENSSL_SYS_WINDOWS | ||
| 742 | /* Some versions of Windows define EADDRINUSE to | ||
| 743 | * a dummy value. | ||
| 744 | */ | ||
| 745 | (err_num == WSAEADDRINUSE)) | ||
| 746 | #else | ||
| 747 | (err_num == EADDRINUSE)) | 712 | (err_num == EADDRINUSE)) |
| 748 | #endif | ||
| 749 | { | 713 | { |
| 750 | client = server; | 714 | client = server; |
| 751 | if (h == NULL || strcmp(h, "*") == 0) { | 715 | if (h == NULL || strcmp(h, "*") == 0) { |
