Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f710dbf

Browse filesBrowse files
cjihrigaddaleax
authored andcommitted
deps: update to uvwasi 0.0.10
Notable changes: - The uvwasi_preopen_t now uses const char* for the mapped_path and real_path fields. Previously, these were not `const`. - uvwasi_path_filestat_get() now properly handles the UVWASI_LOOKUP_SYMLINK_FOLLOW flag. - uvwasi_options_init() has been added to reduce the boilerplate code associated with initializing uvwasi_options_t's. - The DEBUG() macro has been renamed to UVWASI_DEBUG() to reduce naming conflicts with other projects. - A compilation error on NetBSD 8.2 has been fixed. - The uvwasi_fd_filestat_set_times() and uvwasi_path_filestat_set_times() functions now have proper implementations. Fixes: #34510 PR-URL: #34623 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent fc612d5 commit f710dbf
Copy full SHA for f710dbf

File tree

Expand file treeCollapse file tree

5 files changed

+387
-256
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+387
-256
lines changed
Open diff view settings
Collapse file

‎deps/uvwasi/include/uvwasi.h‎

Copy file name to clipboardExpand all lines: deps/uvwasi/include/uvwasi.h
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern "C" {
1010

1111
#define UVWASI_VERSION_MAJOR 0
1212
#define UVWASI_VERSION_MINOR 0
13-
#define UVWASI_VERSION_PATCH 9
13+
#define UVWASI_VERSION_PATCH 10
1414
#define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \
1515
(UVWASI_VERSION_MINOR << 8) | \
1616
(UVWASI_VERSION_PATCH))
@@ -50,8 +50,8 @@ typedef struct uvwasi_s {
5050
} uvwasi_t;
5151

5252
typedef struct uvwasi_preopen_s {
53-
char* mapped_path;
54-
char* real_path;
53+
const char* mapped_path;
54+
const char* real_path;
5555
} uvwasi_preopen_t;
5656

5757
typedef struct uvwasi_options_s {
@@ -70,6 +70,7 @@ typedef struct uvwasi_options_s {
7070
/* Embedder API. */
7171
uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, uvwasi_options_t* options);
7272
void uvwasi_destroy(uvwasi_t* uvwasi);
73+
void uvwasi_options_init(uvwasi_options_t* options);
7374
/* Use int instead of uv_file to avoid needing uv.h */
7475
uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi,
7576
const uvwasi_fd_t fd,
Collapse file

‎deps/uvwasi/include/wasi_serdes.h‎

Copy file name to clipboardExpand all lines: deps/uvwasi/include/wasi_serdes.h
+6-8Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,20 @@
55

66
/* Basic uint{8,16,32,64}_t read/write functions. */
77

8-
#define BASIC_TYPE_(name, type) \
8+
#define BASIC_TYPE(name, type) \
99
void uvwasi_serdes_write_##name(void* ptr, size_t offset, type value); \
1010
type uvwasi_serdes_read_##name(const void* ptr, size_t offset); \
1111

12-
#define BASIC_TYPE(type) BASIC_TYPE_(type, type)
13-
#define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type)
12+
#define BASIC_TYPE_UVWASI(type) BASIC_TYPE(type, uvwasi_##type)
1413

1514
#define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t)
16-
BASIC_TYPE(uint8_t)
15+
BASIC_TYPE(uint8_t, uint8_t)
1716
#define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
18-
BASIC_TYPE(uint16_t)
17+
BASIC_TYPE(uint16_t, uint16_t)
1918
#define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
20-
BASIC_TYPE(uint32_t)
19+
BASIC_TYPE(uint32_t, uint32_t)
2120
#define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
22-
BASIC_TYPE(uint64_t)
21+
BASIC_TYPE(uint64_t, uint64_t)
2322

2423
#define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)
2524
BASIC_TYPE_UVWASI(advice_t)
@@ -80,7 +79,6 @@ BASIC_TYPE_UVWASI(whence_t)
8079

8180
#undef BASIC_TYPE_UVWASI
8281
#undef BASIC_TYPE
83-
#undef BASIC_TYPE_
8482

8583
/* WASI structure read/write functions. */
8684

Collapse file

‎deps/uvwasi/src/debug.h‎

Copy file name to clipboardExpand all lines: deps/uvwasi/src/debug.h
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
#define __UVWASI_DEBUG_H__
33

44
#ifdef UVWASI_DEBUG_LOG
5+
#ifndef __STDC_FORMAT_MACROS
56
# define __STDC_FORMAT_MACROS
7+
#endif
68
# include <inttypes.h>
7-
# define DEBUG(fmt, ...) \
9+
# define UVWASI_DEBUG(fmt, ...) \
810
do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
911
#else
10-
# define DEBUG(fmt, ...)
12+
# define UVWASI_DEBUG(fmt, ...)
1113
#endif
1214

1315
#endif /* __UVWASI_DEBUG_H__ */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.