fix mingw build
parent
f86684f410
commit
3af35fc1df
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue