diff options
Diffstat (limited to 'apps/openssl/compat/apps_win.c')
| -rw-r--r-- | apps/openssl/compat/apps_win.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/openssl/compat/apps_win.c b/apps/openssl/compat/apps_win.c index 496ac03..37bfcc9 100644 --- a/apps/openssl/compat/apps_win.c +++ b/apps/openssl/compat/apps_win.c | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | 7 | ||
| 8 | #include <windows.h> | 8 | #include <windows.h> |
| 9 | 9 | ||
| 10 | #include <io.h> | ||
| 11 | #include <fcntl.h> | ||
| 12 | |||
| 10 | #include "apps.h" | 13 | #include "apps.h" |
| 11 | 14 | ||
| 12 | double | 15 | double |
| @@ -27,3 +30,31 @@ app_tminterval(int stop, int usertime) | |||
| 27 | } | 30 | } |
| 28 | return 0; | 31 | return 0; |
| 29 | } | 32 | } |
| 33 | |||
| 34 | int | ||
| 35 | setup_ui(void) | ||
| 36 | { | ||
| 37 | ui_method = UI_create_method("OpenSSL application user interface"); | ||
| 38 | UI_method_set_opener(ui_method, ui_open); | ||
| 39 | UI_method_set_reader(ui_method, ui_read); | ||
| 40 | UI_method_set_writer(ui_method, ui_write); | ||
| 41 | UI_method_set_closer(ui_method, ui_close); | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Set STDIO to binary | ||
| 45 | */ | ||
| 46 | _setmode(_fileno(stdin), _O_BINARY); | ||
| 47 | _setmode(_fileno(stdout), _O_BINARY); | ||
| 48 | _setmode(_fileno(stderr), _O_BINARY); | ||
| 49 | |||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | void | ||
| 54 | destroy_ui(void) | ||
| 55 | { | ||
| 56 | if (ui_method) { | ||
| 57 | UI_destroy_method(ui_method); | ||
| 58 | ui_method = NULL; | ||
| 59 | } | ||
| 60 | } | ||
