This patch provides an update so that nhc98 can be built and works with a modern C compiler (GCC 11) and libc (glibc 2.33). diff --git a/Makefile.inc b/Makefile.inc index 4fbd47a..5bce5c9 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,6 +1,10 @@ ### Configurable variables: -OPT = -O3 +# We want C89 semantics plus C++-style comments and things like the +# 'setjmp_buf' and 'u_short' types. More importantly, build with '-O1' +# only to avoid modern optimizations that break the code. +OPT = -O1 -std=gnu89 -D_GNU_SOURCE=1 + #ARCH = -m32 ARCH = diff --git a/script/nhc98heap.c b/script/nhc98heap.c index 534010e..a30d5cd 100644 --- a/script/nhc98heap.c +++ b/script/nhc98heap.c @@ -1,5 +1,6 @@ #include #include +#include main(int argc, char **argv) { int prefix = 1; diff --git a/src/runtime/Kernel/collector.c b/src/runtime/Kernel/collector.c index b95a273..1f879c5 100644 --- a/src/runtime/Kernel/collector.c +++ b/src/runtime/Kernel/collector.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "node.h" /*#include "newmacros.h" -- already included in node.h */ /*#include "runtime.h" -- already included in node.h */ ef='/guix/tree/etc/committer.scm.in?id=0fc6f38e900ad981bd515c2761ce9519fc53b09a'>treecommitdiff
AgeCommit message (Expand)Author
2021-05-04etc: Break long lines in commit messages....* etc/committer.scm.in (break-string): New procedure. (change-commit-message): Use it. Ricardo Wurmus
2021-04-12etc/committer: Add missing newline....* etc/committer.scm.in (main): Add newline to message. Signed-off-by: Ricardo Wurmus <rekado@elephly.net> Morgan Smith
2021-04-12etc/committer: Use git plumbing instead of porcelain....* etc/committer.scm.in (diff-info): Use "git diff-files" instead of "git diff". (old-sexp): Use "git cat-file" instead of "git show". Signed-off-by: Ricardo Wurmus <rekado@elephly.net> Morgan Smith
2021-04-08etc/committer: Disable diff colors....Reported by: morgansmith on IRC. * etc/committer.scm.in (diff-info): Invoke "git diff" with "--no-color". Ricardo Wurmus
2021-04-08etc/committer: Recompute hunks before processing changes....* etc/committer.scm.in (main): Re-evaluate diff-info after processing insertions. Ricardo Wurmus
2021-04-08etc/committer: Record minimal context for hunks to avoid problems....With zero context new definitions would be applied to the wrong location in the file. More context lines lead to larger hunks, though, so we use just one line of context. * etc/committer.scm.in (diff-info): Invoke "git diff" with one line of context. [info]: Merge line break and first line. (lines-to-first-change): New procedure. (old-sexp, new-sexp): Use it. Ricardo Wurmus
2021-04-08etc/committer: Define delay duration as a variable....* etc/committer.scm.in (%delay): New variable. (main): Use it. Ricardo Wurmus
2021-04-08etc/committer: Handle package additions....* etc/committer.scm.in (<hunk>)[diff]: Rename this field... [diff-lines]: ...to this. [definition?]: New field. (hunk->patch): Join diff lines. (diff-info): Do not join diff lines; record whether a hunk is a new definition. (commit-message): Rename this procedure... (change-commit-message): ...to this. (add-commit-message): New procedure. (main): Handle new package definitions before changes. Ricardo Wurmus
2020-10-06etc: committer: Use EQUAL? instead of EQ? for differences....* etc/committer.scm.in (commit-message): Use EQUAL? instead of EQ? to compute differences because not all inputs may be symbols; some could be expressions. Ricardo Wurmus
2020-06-16etc: Add committer script....* etc/committer.scm.in: New file. * configure.ac: Configure it. Ricardo Wurmus