From ba4996f47d905977303422be4ea04af1c15c8c6e Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 17 Sep 2023 01:54:04 +0000 Subject: [PATCH] turns out MSVC dislikes offsetof(struct s, label[0]) but offsetof(struct s, label) is fine; it considers the latter a run-time thing, apparently (we test they are identical in mkt-int.sh now) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit drop MKSH_BROKEN_OFFSETOF in the same go, because it applied to SCO and Xenix only, which were probably using MSVC’s antecessor also allow the mbnil == NULL test on CFrustFrust again as the last changes seemingly fixed it --- .linked/mbsdcc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.linked/mbsdcc.h b/.linked/mbsdcc.h index 796543d..69c546b 100644 --- a/.linked/mbsdcc.h +++ b/.linked/mbsdcc.h @@ -5,7 +5,7 @@ */ #ifndef SYSKERN_MBSDCC_H -#define SYSKERN_MBSDCC_H "$MirOS: src/bin/pax/.linked/mbsdcc.h,v 1.2 2023/09/17 00:47:51 tg Exp $" +#define SYSKERN_MBSDCC_H "$MirOS: src/bin/pax/.linked/mbsdcc.h,v 1.3 2023/09/17 01:54:04 tg Exp $" #if !defined(_KERNEL) && !defined(_STANDALONE) #include @@ -54,7 +54,7 @@ * int size; * mbccFAM(char, label); // like char label[…]; * }; - * struct s *sp = malloc(offsetof(struct s, label[0]) + labellen); + * struct s *sp = malloc(offsetof(struct s, label) + labellen); */ /* field sizeof */