all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 06e6928d1415474199e69089d49f326792ca6798 1239 bytes (raw)
name: gnu/packages/patches/nhc98-c-update.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
 
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 <stdlib.h>
 #include <stdio.h>
+#include <ctype.h>
 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 <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 #include "node.h"
 /*#include "newmacros.h"  -- already included in node.h */
 /*#include "runtime.h"    -- already included in node.h */

debug log:

solving 06e6928d14 ...
found 06e6928d14 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.