diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-12-26 22:51:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 03:51:58 +0000 |
commit | 610b2e45e701f631e941f2133131438a782c7f43 (patch) | |
tree | da281bfecad3ac333a828ca56fb566f24b51c127 /deps/uvwasi | |
parent | fe5710effcb0b336853657e424da04407b0e49ad (diff) | |
download | node-new-610b2e45e701f631e941f2133131438a782c7f43.tar.gz |
deps: update to uvwasi 0.0.14
Notable changes:
- Windows applications not in ConsoleMode now properly guess
handle types for FILE_TYPE_CHAR file types which cannot be
stat'ed.
- The UVWASI_DEBUG macro can now be used without a format string.
- The libuv dependency has been updated to v1.44.2.
PR-URL: https://github.com/nodejs/node/pull/45970
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Diffstat (limited to 'deps/uvwasi')
-rw-r--r-- | deps/uvwasi/include/uvwasi.h | 2 | ||||
-rw-r--r-- | deps/uvwasi/src/debug.h | 4 | ||||
-rw-r--r-- | deps/uvwasi/src/uv_mapping.c | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/deps/uvwasi/include/uvwasi.h b/deps/uvwasi/include/uvwasi.h index b45f80b190..7fceca3aff 100644 --- a/deps/uvwasi/include/uvwasi.h +++ b/deps/uvwasi/include/uvwasi.h @@ -10,7 +10,7 @@ extern "C" { #define UVWASI_VERSION_MAJOR 0 #define UVWASI_VERSION_MINOR 0 -#define UVWASI_VERSION_PATCH 13 +#define UVWASI_VERSION_PATCH 14 #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ (UVWASI_VERSION_MINOR << 8) | \ (UVWASI_VERSION_PATCH)) diff --git a/deps/uvwasi/src/debug.h b/deps/uvwasi/src/debug.h index 8ef5a99a23..a76ab666e8 100644 --- a/deps/uvwasi/src/debug.h +++ b/deps/uvwasi/src/debug.h @@ -6,8 +6,8 @@ # define __STDC_FORMAT_MACROS #endif # include <inttypes.h> -# define UVWASI_DEBUG(fmt, ...) \ - do { fprintf(stderr, fmt, __VA_ARGS__); } while (0) +# define UVWASI_DEBUG(...) \ + do { fprintf(stderr, __VA_ARGS__); } while (0) #else # define UVWASI_DEBUG(fmt, ...) #endif diff --git a/deps/uvwasi/src/uv_mapping.c b/deps/uvwasi/src/uv_mapping.c index da922de8da..75405c163b 100644 --- a/deps/uvwasi/src/uv_mapping.c +++ b/deps/uvwasi/src/uv_mapping.c @@ -251,8 +251,13 @@ uvwasi_errno_t uvwasi__get_filetype_by_fd(uv_file fd, uvwasi_filetype_t* type) { if (r != 0) { uv_fs_req_cleanup(&req); - /* Windows can't stat a TTY. */ - if (uv_guess_handle(fd) == UV_TTY) { + uv_handle_type guess; + /* + Windows can't stat a FILE_TYPE_CHAR, which is guessed + as UV_TTY in "ConsoleMode" or UV_FILE otherwise. + */ + guess = uv_guess_handle(fd); + if (guess == UV_TTY || guess == UV_FILE) { *type = UVWASI_FILETYPE_CHARACTER_DEVICE; return UVWASI_ESUCCESS; } |