Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update to uvwasi 0.0.10 #34623

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions deps/uvwasi/include/uvwasi.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern "C" {

#define UVWASI_VERSION_MAJOR 0
#define UVWASI_VERSION_MINOR 0
#define UVWASI_VERSION_PATCH 9
#define UVWASI_VERSION_PATCH 10
#define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \
(UVWASI_VERSION_MINOR << 8) | \
(UVWASI_VERSION_PATCH))
Expand Down Expand Up @@ -50,8 +50,8 @@ typedef struct uvwasi_s {
} uvwasi_t;

typedef struct uvwasi_preopen_s {
char* mapped_path;
char* real_path;
const char* mapped_path;
const char* real_path;
} uvwasi_preopen_t;

typedef struct uvwasi_options_s {
Expand All @@ -70,6 +70,7 @@ typedef struct uvwasi_options_s {
/* Embedder API. */
uvwasi_errno_t uvwasi_init(uvwasi_t* uvwasi, uvwasi_options_t* options);
void uvwasi_destroy(uvwasi_t* uvwasi);
void uvwasi_options_init(uvwasi_options_t* options);
/* Use int instead of uv_file to avoid needing uv.h */
uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi,
const uvwasi_fd_t fd,
Expand Down
14 changes: 6 additions & 8 deletions deps/uvwasi/include/wasi_serdes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@

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

#define BASIC_TYPE_(name, type) \
#define BASIC_TYPE(name, type) \
void uvwasi_serdes_write_##name(void* ptr, size_t offset, type value); \
type uvwasi_serdes_read_##name(const void* ptr, size_t offset); \

#define BASIC_TYPE(type) BASIC_TYPE_(type, type)
#define BASIC_TYPE_UVWASI(type) BASIC_TYPE_(type, uvwasi_##type)
#define BASIC_TYPE_UVWASI(type) BASIC_TYPE(type, uvwasi_##type)

#define UVWASI_SERDES_SIZE_uint8_t sizeof(uint8_t)
BASIC_TYPE(uint8_t)
BASIC_TYPE(uint8_t, uint8_t)
#define UVWASI_SERDES_SIZE_uint16_t sizeof(uint16_t)
BASIC_TYPE(uint16_t)
BASIC_TYPE(uint16_t, uint16_t)
#define UVWASI_SERDES_SIZE_uint32_t sizeof(uint32_t)
BASIC_TYPE(uint32_t)
BASIC_TYPE(uint32_t, uint32_t)
#define UVWASI_SERDES_SIZE_uint64_t sizeof(uint64_t)
BASIC_TYPE(uint64_t)
BASIC_TYPE(uint64_t, uint64_t)

#define UVWASI_SERDES_SIZE_advice_t sizeof(uvwasi_advice_t)
BASIC_TYPE_UVWASI(advice_t)
Expand Down Expand Up @@ -80,7 +79,6 @@ BASIC_TYPE_UVWASI(whence_t)

#undef BASIC_TYPE_UVWASI
#undef BASIC_TYPE
#undef BASIC_TYPE_

/* WASI structure read/write functions. */

Expand Down
6 changes: 4 additions & 2 deletions deps/uvwasi/src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
#define __UVWASI_DEBUG_H__

#ifdef UVWASI_DEBUG_LOG
#ifndef __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS
#endif
# include <inttypes.h>
# define DEBUG(fmt, ...) \
# define UVWASI_DEBUG(fmt, ...) \
do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
#else
# define DEBUG(fmt, ...)
# define UVWASI_DEBUG(fmt, ...)
#endif

#endif /* __UVWASI_DEBUG_H__ */
Loading