diff options
| author | eunhhu <[email protected]> | 2026-10-01 18:19:14 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-01 18:19:14 +0100 |
| commit | 8450156e98ee49484f3fadad791d5684f9576f8b (patch) | |
| tree | f49de4bdf2dd7d45e2c3da097243ff9391ef59bb /serve/serve.c | |
| parent | 1c378188e66ed9a14a3f1053ea7385ddcbe8db27 (diff) | |
| download | pure-8450156e98ee49484f3fadad791d5684f9576f8b.tar.gz pure-8450156e98ee49484f3fadad791d5684f9576f8b.zip | |
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.
Diffstat (limited to 'serve/serve.c')
| -rw-r--r-- | serve/serve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/serve/serve.c b/serve/serve.c index 81a338d..65a5c0b 100644 --- a/serve/serve.c +++ b/serve/serve.c @@ -1429,7 +1429,7 @@ static PureResult show_given(PureApp *app, const Route *route, size_t available, char head[80]; put_bytes(&o, head, (size_t)snprintf(head, sizeof(head), "{\"rows\":%zu,\"from\":%zu,\"items\":[", rows, from)); for (size_t row = from; row < end && !o.failed; ++row) { - put_bytes(&o, ",{" + (row == from), 2 - (row == from)); + put_bytes(&o, row == from ? "{" : ",{", row == from ? 1 : 2); for (unsigned k = 0; k < count; ++k) { put_bytes(&o, columns[k].key + !k, columns[k].length - !k); uint8_t kind = m->view_type[columns[k].view]; |
