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 */ '/guix/tree/gnu/packages/gl.scm?id=c8b19d97833243e7e89f8ca83a0d641de6516271'>treecommitdiff
class='left'>Author
AgeCommit message (Expand)Author
2016-10-28daemon: Improve the SQLite wrapper API....In particular, this eliminates a bunch of boilerplate code. Also integrates these Nix commits: 80da7a6 Probably fix SQLITE_BUSY errors 37a337b throwSQLiteError(): Check for SIGINT so we don't loop forever Co-authored-by: Ludovic Courtès <ludo@gnu.org> Eelco Dolstra
2016-10-28daemon: Factor out SQLite handling....* nix/libstore/local-store.cc: Move SQLite code to... * nix/libstore/sqlite.cc, nix/libstore/sqlite.hh: ... here. New files. * nix/local.mk (libstore_a_SOURCES): Add sqlite.cc. (libstore_headers): Add sqlite.hh. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Eelco Dolstra