projects/guix·blob java-team · refs

82 lines · 2.0 KiB

1Upstream status: Taken from upstream.
2
3From dca87c025665f0f010f906a4eba96da9794a4d04 Mon Sep 17 00:00:00 2001
4From: Anthony Fok <[email protected]>
5Date: Thu, 16 Jun 2022 02:40:23 -0600
6Subject: [PATCH] Define PATH_MAX and MAXPATHLEN for GNU/Hurd compatibility
7
8Special thanks to @henrich, @ucko and @kilobyte for reporting the issue
9and offering suggestions on a fix.
10
11See also https://bugs.debian.org/877795
12
13Fixes #3119
14---
15 inc/basics.h | 8 ++++++++
16 1 file changed, 8 insertions(+)
17
18diff --git a/inc/basics.h b/inc/basics.h
19index b8d65823b..14590c5b1 100644
20--- a/inc/basics.h
21+++ b/inc/basics.h
22@@ -123,5 +123,13 @@ static inline int imax(int a, int b)
23 last = newitem; \
24 }
25
26+#ifdef __GNU__
27+# ifndef PATH_MAX
28+# define PATH_MAX 4096
29+# endif
30+# ifndef MAXPATHLEN
31+# define MAXPATHLEN 4096
32+# endif
33+#endif
34
35 #endif /* FONTFORGE_BASICS_H */
36--
372.40.1
38
39From e0480f143f27f8f2686b5b14d7d302fe22f35002 Mon Sep 17 00:00:00 2001
40From: Anthony Fok <[email protected]>
41Date: Thu, 16 Jun 2022 03:06:56 -0600
42Subject: [PATCH] Undefine "extended" macro temporarily on GNU Hurd
43
44GNU Mach microkernel header files (gnumach-dev 1.8+git20201129) added to
45struct i386_xfp_save in /usr/include/i386-gnu/include/mach/i386/fp_reg.h
46a new "extended" field which happens to collide with the macro definition
47"#define extended double" in FontForge, leading to FTBFS on GNU Hurd.
48
49This issue may be circumvented by temporarily undefining the "extended"
50macro before loading `<gio/gio.h>` and friends, and redefining the
51"extended" macro right after.
52---
53 inc/ffglib.h | 8 ++++++++
54 1 file changed, 8 insertions(+)
55
56diff --git a/inc/ffglib.h b/inc/ffglib.h
57index f3419f0ab..25fe9ebde 100644
58--- a/inc/ffglib.h
59+++ b/inc/ffglib.h
60@@ -26,11 +26,19 @@
61 #define GMenuItem GMenuItem_GIO
62 #define GTimer GTimer_GTK
63
64+#ifdef __GNU__
65+# undef extended
66+#endif
67+
68 #include <gio/gio.h>
69 #include <glib-object.h>
70 #include <glib.h>
71 #include <glib/gstdio.h>
72
73+#ifdef __GNU__
74+# define extended double
75+#endif
76+
77 #undef GList
78 #undef GMenuItem
79 #undef GTimer
80--
812.40.1
82