aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Novatsis <anthony.novatsis@dallatech.com.au>2015-12-11 16:29:50 +1100
committerAnthony Novatsis <anthony.novatsis@dallatech.com.au>2015-12-11 16:32:00 +1100
commit5727d3274ee6eff74d2a2937156f787d99f7ce92 (patch)
tree852b83a5b4111ce4374a7113c22296da75037893
parent4db1ad6797de0e64183833f04670bd99df25b2c5 (diff)
downloadportable-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.c6
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)
314static int 314static int
315noecho_console(UI *ui) 315noecho_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)
327static int 327static int
328echo_console(UI *ui) 328echo_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);