diff options
author | Brent Cook <bcook@openbsd.org> | 2015-09-13 09:19:26 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2015-09-13 09:31:41 -0500 |
commit | a896d400a0bd65512e7c779306aae7480ee079b4 (patch) | |
tree | db52c01b2569ea9e6d8209694c232c86a37af63c /patches/openssl.c.patch | |
parent | 653bbfaabf6f089c15118df821e51bea75ab7792 (diff) | |
download | portable-a896d400a0bd65512e7c779306aae7480ee079b4.tar.gz portable-a896d400a0bd65512e7c779306aae7480ee079b4.tar.bz2 portable-a896d400a0bd65512e7c779306aae7480ee079b4.zip |
move windows file IO mode setup to apps_win.c
Diffstat (limited to 'patches/openssl.c.patch')
-rw-r--r-- | patches/openssl.c.patch | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/patches/openssl.c.patch b/patches/openssl.c.patch index ba3ac36..57282aa 100644 --- a/patches/openssl.c.patch +++ b/patches/openssl.c.patch | |||
@@ -1,40 +1,12 @@ | |||
1 | --- apps/openssl/openssl.c.orig 2015-07-20 02:01:42.000000000 -0600 | 1 | --- apps/openssl/openssl.c.orig Sun Sep 13 09:11:31 2015 |
2 | +++ apps/openssl/openssl.c 2015-07-20 02:02:00.000000000 -0600 | 2 | +++ apps/openssl/openssl.c Sun Sep 13 09:10:02 2015 |
3 | @@ -130,6 +130,19 @@ | 3 | @@ -399,7 +399,9 @@ |
4 | #include <openssl/engine.h> | ||
5 | #endif | ||
6 | |||
7 | +#ifdef _WIN32 | ||
8 | +#include <io.h> | ||
9 | +#include <fcntl.h> | ||
10 | +static void set_stdio_binary(void) | ||
11 | +{ | ||
12 | + _setmode(_fileno(stdin), _O_BINARY); | ||
13 | + _setmode(_fileno(stdout), _O_BINARY); | ||
14 | + _setmode(_fileno(stderr), _O_BINARY); | ||
15 | +} | ||
16 | +#else | ||
17 | +static void set_stdio_binary(void) {}; | ||
18 | +#endif | ||
19 | + | ||
20 | #include "progs.h" | ||
21 | #include "s_apps.h" | ||
22 | |||
23 | @@ -204,7 +216,9 @@ | ||
24 | static void | 4 | static void |
25 | openssl_startup(void) | 5 | openssl_startup(void) |
26 | { | 6 | { |
27 | +#ifndef _WIN32 | 7 | +#ifndef _WIN32 |
28 | signal(SIGPIPE, SIG_IGN); | 8 | signal(SIGPIPE, SIG_IGN); |
29 | +#endif | 9 | +#endif |
30 | 10 | ||
31 | CRYPTO_malloc_init(); | ||
32 | OpenSSL_add_all_algorithms(); | 11 | OpenSSL_add_all_algorithms(); |
33 | @@ -216,6 +230,7 @@ | 12 | SSL_library_init(); |
34 | #endif | ||
35 | |||
36 | setup_ui_method(); | ||
37 | + set_stdio_binary(); | ||
38 | } | ||
39 | |||
40 | static void | ||