From 8450156e98ee49484f3fadad791d5684f9576f8b Mon Sep 17 00:00:00 2001 From: eunhhu Date: Thu, 1 Oct 2026 18:19:14 +0100 Subject: Build with clang, and the core and store on macOS, again Apple clang 21 (an M3) and clang 19 refused what gcc let pass (research 029): - PURE_FIELD_REST was an enum of UINT32_MAX, past an int (C17): a macro. - a store's publish copied an entry rebuild left unset when the record was not found (the copy was never used): copied when it was made. - the log's image writer kept a count only Linux's sync_file_range uses. - ",{" + (row == from) read as adding an int to a string: said plainly. - the tests: mkdtemp, hidden by _POSIX_C_SOURCE on macOS, needs _DARWIN_C_SOURCE; a string split so that \x80 and a stay apart is bracketed; a count left over and a malloc measure only glibc has. The core's and the store's tests pass on the Mac. --- core/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/module.h') diff --git a/core/module.h b/core/module.h index 2cc3109..162a8b1 100644 --- a/core/module.h +++ b/core/module.h @@ -113,7 +113,7 @@ enum { PURE_TIMER_LONGEST = 86400000, PURE_SOURCE = 64 }; * they are not whole. */ typedef enum { PURE_FIELD_U32 = 1, PURE_FIELD_BYTES = 2, PURE_FIELD_NUMBER = 3, PURE_FIELD_TEXT = 4, PURE_FIELD_ROWS = 5, PURE_FIELD_BOOL = 6, PURE_FIELD_I64 = 7 } PureFieldType; -enum { PURE_FIELD_REST = UINT32_MAX }; +#define PURE_FIELD_REST UINT32_MAX /* a macro: an enum's values are ints (C17) */ /* A field held in its payload's prefix (a u32, a number, a bool, an i64), and the bytes it takes there. */ static inline bool pure_field_fixed(uint8_t type) { return type == PURE_FIELD_U32 || type == PURE_FIELD_NUMBER || type == PURE_FIELD_BOOL || type == PURE_FIELD_I64; -- cgit v1.2.3