diff options
Diffstat (limited to 'lib9p')
-rw-r--r-- | lib9p/core.c | 6 | ||||
-rw-r--r-- | lib9p/core_include/lib9p/core.h | 5 | ||||
-rw-r--r-- | lib9p/idl/1992-9P0.9p.wip | 2 | ||||
-rw-r--r-- | lib9p/idl/2010-9P2000.L.9p | 2 | ||||
-rw-r--r-- | lib9p/srv.c | 6 | ||||
-rw-r--r-- | lib9p/tests/test_server/main.c | 10 |
6 files changed, 10 insertions, 21 deletions
diff --git a/lib9p/core.c b/lib9p/core.c index 58fe538..3843429 100644 --- a/lib9p/core.c +++ b/lib9p/core.c @@ -48,17 +48,11 @@ bool lib9p_str_eq(struct lib9p_s a, struct lib9p_s b) { /* bounds checks **************************************************************/ static inline void assert_ver(enum lib9p_version ver) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" assert(0 <= ver && ver < LIB9P_VER_NUM); -#pragma GCC diagnostic pop } static inline void assert_typ(enum lib9p_msg_type typ) { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wtype-limits" assert(0 <= typ && typ < 0xFF); -#pragma GCC diagnostic pop } /* simple lookups *************************************************************/ diff --git a/lib9p/core_include/lib9p/core.h b/lib9p/core_include/lib9p/core.h index 9d92312..fc4eedf 100644 --- a/lib9p/core_include/lib9p/core.h +++ b/lib9p/core_include/lib9p/core.h @@ -7,9 +7,8 @@ #ifndef _LIB9P_CORE_H_ #define _LIB9P_CORE_H_ -#include <stdint.h> /* for uint{n}_t */ -#include <string.h> /* for memset() */ -#include <sys/types.h> /* for ssize_t */ +#include <stdint.h> /* for uint{n}_t */ +#include <string.h> /* for memset() */ #include <libhw/generic/io.h> /* for struct iovec */ #include <libmisc/assert.h> diff --git a/lib9p/idl/1992-9P0.9p.wip b/lib9p/idl/1992-9P0.9p.wip index c9432c9..de902dd 100644 --- a/lib9p/idl/1992-9P0.9p.wip +++ b/lib9p/idl/1992-9P0.9p.wip @@ -137,5 +137,5 @@ msg Twstat = "typ[1,val=78] tag[tag] fid[fid] stat[stat]" msg Rwstat = "typ[1,val=79] tag[tag] fid[fid]" msg Tclwalk = "typ[1,val=80] tag[tag] fid[fid] newfid[fid] name[name]" msg Rclwalk = "typ[1,val=81] tag[tag] fid[fid] qid[qid]" -msg Tauth = "typ[1,val=82] tag[tag] fid[fid] uid[name] chal[encrypted_auth_challenge]" # chal is an encrypted +msg Tauth = "typ[1,val=82] tag[tag] fid[fid] uid[name] chal[encrypted_auth_challenge]" msg Rauth = "typ[1,val=83] tag[tag] fid[fid] chal[encrypted_auth_response]" diff --git a/lib9p/idl/2010-9P2000.L.9p b/lib9p/idl/2010-9P2000.L.9p index 5eb7d5c..d442252 100644 --- a/lib9p/idl/2010-9P2000.L.9p +++ b/lib9p/idl/2010-9P2000.L.9p @@ -198,7 +198,7 @@ bitfield lo = 4 "bit 16=DIRECTORY" "bit 17=NOFOLLOW" "bit 18=NOATIME" - "bit 19=CLOEXEC" + "bit 19=CLOEXEC" # What does this even mean in a remote protocol? "bit 20=SYNC" "num(MODE) RDONLY = 0" diff --git a/lib9p/srv.c b/lib9p/srv.c index 085cc8b..d1f5814 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -4,13 +4,9 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -#include <limits.h> /* for SSIZE_MAX, not set by newlib */ #include <stddef.h> /* for size_t */ #include <stdlib.h> /* for malloc() */ #include <string.h> /* for memcpy() */ -#ifndef SSIZE_MAX -#define SSIZE_MAX (SIZE_MAX >> 1) -#endif #include <libcr/coroutine.h> #include <libcr_ipc/chan.h> @@ -40,7 +36,7 @@ #error config.h must define CONFIG_9P_SRV_MAX_HOSTMSG_SIZE #endif static_assert(CONFIG_9P_SRV_MAX_MSG_SIZE <= CONFIG_9P_SRV_MAX_HOSTMSG_SIZE); -static_assert(CONFIG_9P_SRV_MAX_HOSTMSG_SIZE <= SSIZE_MAX); +static_assert(CONFIG_9P_SRV_MAX_HOSTMSG_SIZE <= SIZE_MAX); /* context ********************************************************************/ diff --git a/lib9p/tests/test_server/main.c b/lib9p/tests/test_server/main.c index 0431c40..e28d19e 100644 --- a/lib9p/tests/test_server/main.c +++ b/lib9p/tests/test_server/main.c @@ -63,11 +63,11 @@ static struct { #define STATIC_DIR(N, STRNAME, ...) \ UTIL9P_STATIC_DIR(N, STRNAME, __VA_ARGS__) -#define API_FILE(N, STRNAME, SYMNAME, ...) \ - LO_BOX(lib9p_srv_file, &((struct SYMNAME##_file){ \ - .name = STRNAME, \ - .pathnum = N \ - __VA_OPT__(,) __VA_ARGS__ \ +#define API_FILE(N, STRNAME, SYMNAME, ...) \ + lo_box_##SYMNAME##_file_as_lib9p_srv_file(&((struct SYMNAME##_file){ \ + .name = STRNAME, \ + .pathnum = N \ + __VA_OPT__(,) __VA_ARGS__ \ })) static struct lib9p_srv_file root = |