authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-03 09:32:38-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-10-03 09:32:38-04:00
log3af35fc1df7c06ada037cd7371c012ca145ab6e7
treef1ddac14b02b8dbdfc47cf50f0535d9e3848cb83
parentf86684f4100c1dcc886357b79108df1e8f9e3f2e

fix mingw build


1 files changed, 4 insertions(+), 1 deletions(-)

src/os.cpp+4-1
...@@ -643,11 +643,13 @@ int os_get_cwd(Buf *out_cwd) {...@@ -643,11 +643,13 @@ int os_get_cwd(Buf *out_cwd) {
643#define is_wprefix(s, prefix) \643#define is_wprefix(s, prefix) \
644 (wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)644 (wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0)
645static bool is_stderr_cyg_pty(void) {645static bool is_stderr_cyg_pty(void) {
646#if defined(__MINGW32__)
647 return false;
648#else
646 HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE);649 HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE);
647 if (stderr_handle == INVALID_HANDLE_VALUE)650 if (stderr_handle == INVALID_HANDLE_VALUE)
648 return false;651 return false;
649652
650 HANDLE h;
651 int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * MAX_PATH;653 int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * MAX_PATH;
652 FILE_NAME_INFO *nameinfo;654 FILE_NAME_INFO *nameinfo;
653 WCHAR *p = NULL;655 WCHAR *p = NULL;
...@@ -695,6 +697,7 @@ static bool is_stderr_cyg_pty(void) {...@@ -695,6 +697,7 @@ static bool is_stderr_cyg_pty(void) {
695 }697 }
696 free(nameinfo);698 free(nameinfo);
697 return (p != NULL);699 return (p != NULL);
700#endif
698}701}
699#endif702#endif
700703