diff options
| author | Anthony Novatsis <anthony.novatsis@dallatech.com.au> | 2015-12-11 16:29:50 +1100 |
|---|---|---|
| committer | Anthony Novatsis <anthony.novatsis@dallatech.com.au> | 2015-12-11 16:32:00 +1100 |
| commit | 5727d3274ee6eff74d2a2937156f787d99f7ce92 (patch) | |
| tree | 852b83a5b4111ce4374a7113c22296da75037893 | |
| parent | 4db1ad6797de0e64183833f04670bd99df25b2c5 (diff) | |
| download | portable-5727d3274ee6eff74d2a2937156f787d99f7ce92.tar.gz portable-5727d3274ee6eff74d2a2937156f787d99f7ce92.tar.bz2 portable-5727d3274ee6eff74d2a2937156f787d99f7ce92.zip | |
Replace STDIN_FILENO with _fileno
Replace STDIN_FILENO with _fileno as STDIN_FILENO results in compile
errors with Visual Studio 2015 (using CMake).
| -rw-r--r-- | crypto/compat/ui_openssl_win.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/compat/ui_openssl_win.c b/crypto/compat/ui_openssl_win.c index aaab60b..959352b 100644 --- a/crypto/compat/ui_openssl_win.c +++ b/crypto/compat/ui_openssl_win.c | |||
| @@ -301,7 +301,7 @@ open_console(UI *ui) | |||
| 301 | tty_in = stdin; | 301 | tty_in = stdin; |
| 302 | tty_out = stderr; | 302 | tty_out = stderr; |
| 303 | 303 | ||
| 304 | HANDLE handle = (HANDLE)_get_osfhandle(STDIN_FILENO); | 304 | HANDLE handle = (HANDLE)_get_osfhandle(_fileno(stdin)); |
| 305 | if (handle != INVALID_HANDLE_VALUE) { | 305 | if (handle != INVALID_HANDLE_VALUE) { |
| 306 | if (GetFileType(handle) == FILE_TYPE_CHAR) | 306 | if (GetFileType(handle) == FILE_TYPE_CHAR) |
| 307 | return GetConsoleMode(handle, &console_mode); | 307 | return GetConsoleMode(handle, &console_mode); |
| @@ -314,7 +314,7 @@ open_console(UI *ui) | |||
| 314 | static int | 314 | static int |
| 315 | noecho_console(UI *ui) | 315 | noecho_console(UI *ui) |
| 316 | { | 316 | { |
| 317 | HANDLE handle = (HANDLE)_get_osfhandle(STDIN_FILENO); | 317 | HANDLE handle = (HANDLE)_get_osfhandle(_fileno(stdin)); |
| 318 | if (handle != INVALID_HANDLE_VALUE) { | 318 | if (handle != INVALID_HANDLE_VALUE) { |
| 319 | if (GetFileType(handle) == FILE_TYPE_CHAR) | 319 | if (GetFileType(handle) == FILE_TYPE_CHAR) |
| 320 | return SetConsoleMode(handle, console_mode & ~ENABLE_ECHO_INPUT); | 320 | return SetConsoleMode(handle, console_mode & ~ENABLE_ECHO_INPUT); |
| @@ -327,7 +327,7 @@ noecho_console(UI *ui) | |||
| 327 | static int | 327 | static int |
| 328 | echo_console(UI *ui) | 328 | echo_console(UI *ui) |
| 329 | { | 329 | { |
| 330 | HANDLE handle = (HANDLE)_get_osfhandle(STDIN_FILENO); | 330 | HANDLE handle = (HANDLE)_get_osfhandle(_fileno(stdin)); |
| 331 | if (handle != INVALID_HANDLE_VALUE) { | 331 | if (handle != INVALID_HANDLE_VALUE) { |
| 332 | if (GetFileType(handle) == FILE_TYPE_CHAR) | 332 | if (GetFileType(handle) == FILE_TYPE_CHAR) |
| 333 | return SetConsoleMode(handle, console_mode); | 333 | return SetConsoleMode(handle, console_mode); |
