| 1 | Upstream status: Taken from upstream.
|
| 2 |
|
| 3 | From dca87c025665f0f010f906a4eba96da9794a4d04 Mon Sep 17 00:00:00 2001
|
| 4 | From: Anthony Fok <[email protected]>
|
| 5 | Date: Thu, 16 Jun 2022 02:40:23 -0600
|
| 6 | Subject: [PATCH] Define PATH_MAX and MAXPATHLEN for GNU/Hurd compatibility
|
| 7 |
|
| 8 | Special thanks to @henrich, @ucko and @kilobyte for reporting the issue
|
| 9 | and offering suggestions on a fix.
|
| 10 |
|
| 11 | See also https://bugs.debian.org/877795
|
| 12 |
|
| 13 | Fixes #3119
|
| 14 | ---
|
| 15 | inc/basics.h | 8 ++++++++
|
| 16 | 1 file changed, 8 insertions(+)
|
| 17 |
|
| 18 | diff --git a/inc/basics.h b/inc/basics.h
|
| 19 | index b8d65823b..14590c5b1 100644
|
| 20 | |
| 21 | |
| 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 | --
|
| 37 | 2.40.1
|
| 38 |
|
| 39 | From e0480f143f27f8f2686b5b14d7d302fe22f35002 Mon Sep 17 00:00:00 2001
|
| 40 | From: Anthony Fok <[email protected]>
|
| 41 | Date: Thu, 16 Jun 2022 03:06:56 -0600
|
| 42 | Subject: [PATCH] Undefine "extended" macro temporarily on GNU Hurd
|
| 43 |
|
| 44 | GNU Mach microkernel header files (gnumach-dev 1.8+git20201129) added to
|
| 45 | struct i386_xfp_save in /usr/include/i386-gnu/include/mach/i386/fp_reg.h
|
| 46 | a new "extended" field which happens to collide with the macro definition
|
| 47 | "#define extended double" in FontForge, leading to FTBFS on GNU Hurd.
|
| 48 |
|
| 49 | This issue may be circumvented by temporarily undefining the "extended"
|
| 50 | macro 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 |
|
| 56 | diff --git a/inc/ffglib.h b/inc/ffglib.h
|
| 57 | index f3419f0ab..25fe9ebde 100644
|
| 58 | |
| 59 | |
| 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 | --
|
| 81 | 2.40.1
|
| 82 |
|