| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d31c478 commit 422a981
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ extern "C" { | |||
| 10 | 10 | ||
| 11 | 11 | #define UVWASI_VERSION_MAJOR 0 | |
| 12 | 12 | #define UVWASI_VERSION_MINOR 0 | |
| 13 | - #define UVWASI_VERSION_PATCH 13 | ||
| 13 | + #define UVWASI_VERSION_PATCH 14 | ||
| 14 | 14 | #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ | |
| 15 | 15 | (UVWASI_VERSION_MINOR << 8) | \ | |
| 16 | 16 | (UVWASI_VERSION_PATCH)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,8 +6,8 @@ | |||
| 6 | 6 | # define __STDC_FORMAT_MACROS | |
| 7 | 7 | #endif | |
| 8 | 8 | # include <inttypes.h> | |
| 9 | - # define UVWASI_DEBUG(fmt, ...) \ | ||
| 10 | - do { fprintf(stderr, fmt, __VA_ARGS__); } while (0) | ||
| 9 | + # define UVWASI_DEBUG(...) \ | ||
| 10 | + do { fprintf(stderr, __VA_ARGS__); } while (0) | ||
| 11 | 11 | #else | |
| 12 | 12 | # define UVWASI_DEBUG(fmt, ...) | |
| 13 | 13 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -251,8 +251,13 @@ uvwasi_errno_t uvwasi__get_filetype_by_fd(uv_file fd, uvwasi_filetype_t* type) { | |||
| 251 | 251 | if (r != 0) { | |
| 252 | 252 | uv_fs_req_cleanup(&req); | |
| 253 | 253 | ||
| 254 | - /* Windows can't stat a TTY. */ | ||
| 255 | - if (uv_guess_handle(fd) == UV_TTY) { | ||
| 254 | + uv_handle_type guess; | ||
| 255 | + /* | ||
| 256 | + Windows can't stat a FILE_TYPE_CHAR, which is guessed | ||
| 257 | + as UV_TTY in "ConsoleMode" or UV_FILE otherwise. | ||
| 258 | + */ | ||
| 259 | + guess = uv_guess_handle(fd); | ||
| 260 | + if (guess == UV_TTY || guess == UV_FILE) { | ||
| 256 | 261 | *type = UVWASI_FILETYPE_CHARACTER_DEVICE; | |
| 257 | 262 | return UVWASI_ESUCCESS; | |
| 258 | 263 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments