From 983b56e9f7ef1fdfcf82ad82cc70f939318e599f Mon Sep 17 00:00:00 2001 From: Flavio Cruz <flaviocruz@gmail.com> Date: Wed, 19 Jan 2022 22:59:13 -0800 Subject: Add _Static_assert when compiling server and user stubs. This is only done when data is inlined with a concrete size. It ensures the C and Mig types have the same size in the target arch. Tested by building the hurd package. No assertions were triggered. Message-Id: <YekIQaxvs+4FrHyw@viriathus> --- utils.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 0524f0c..a5673b0 100644 --- a/utils.h +++ b/utils.h @@ -46,8 +46,10 @@ extern void WriteReverseList(FILE *file, const argument_t *args, extern write_list_fn_t WriteNameDecl; extern write_list_fn_t WriteUserVarDecl; extern write_list_fn_t WriteServerVarDecl; -extern write_list_fn_t WriteTypeDeclIn; -extern write_list_fn_t WriteTypeDeclOut; +extern write_list_fn_t WriteTypeDeclInServer; +extern write_list_fn_t WriteTypeDeclOutServer; +extern write_list_fn_t WriteTypeDeclInUser; +extern write_list_fn_t WriteTypeDeclOutUser; extern write_list_fn_t WriteCheckDecl; extern const char *ReturnTypeStr(const routine_t *rt); @@ -65,7 +67,8 @@ extern void WriteStructDecl(FILE *file, const argument_t *args, extern void WriteStaticDecl(FILE *file, const ipc_type_t *it, dealloc_t dealloc, boolean_t longform, - boolean_t inname, identifier_t name); + boolean_t is_server, boolean_t inname, + identifier_t name); extern void WriteCopyType(FILE *file, const ipc_type_t *it, const char *left, const char *right, ...); -- cgit v1.2.3