zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3af35fc1df7c06ada037cd7371c012ca145ab6e7 (tree)
parent f86684f4100c1dcc886357b79108df1e8f9e3f2e
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Tue,  3 Oct 2017 09:32:38 -0400

fix mingw build

Diffstat:
Msrc/os.cpp | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/os.cpp b/src/os.cpp @@ -643,11 +643,13 @@ int os_get_cwd(Buf *out_cwd) { #define is_wprefix(s, prefix) \ (wcsncmp((s), (prefix), sizeof(prefix) / sizeof(WCHAR) - 1) == 0) static bool is_stderr_cyg_pty(void) { +#if defined(__MINGW32__) + return false; +#else HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE); if (stderr_handle == INVALID_HANDLE_VALUE) return false; - HANDLE h; int size = sizeof(FILE_NAME_INFO) + sizeof(WCHAR) * MAX_PATH; FILE_NAME_INFO *nameinfo; WCHAR *p = NULL; @@ -695,6 +697,7 @@ static bool is_stderr_cyg_pty(void) { } free(nameinfo); return (p != NULL); +#endif } #endif