"#undef extended" temporarily to avoid conflict on GNU Hurd
Origin: vendor
Forwarded: https://github.com/fontforge/fontforge/pull/5047
Last-Update: 2022-06-16
GNU Mach microkernel header files (gnumach-dev 1.8+git20201129) added to
struct i386_xfp_save in /usr/include/i386-gnu/include/mach/i386/fp_reg.h
a new "extended" field which happens to collide with the macro definition
"#define extended double" in FontForge, leading to FTBFS on GNU Hurd:
FAILED: fontforge/CMakeFiles/fontforge.dir/asmfpst.c.o
/usr/bin/cc -Dfontforge_EXPORTS -I../../fontforge -I../../inc -Iinc -isystem /usr/include/glib-2.0 -isystem /usr/lib/i386-gnu/glib-2.0/include -isystem /usr/include/freetype2 -isystem /usr/include/libxml2 -isystem /usr/include/readline -isystem /usr/include/python3.9 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Werror=implicit-function-declaration -Werror=int-conversion -fdiagnostics-color=always -std=gnu99 -MD -MT fontforge/CMakeFiles/fontforge.dir/asmfpst.c.o -MF fontforge/CMakeFiles/fontforge.dir/asmfpst.c.o.d -o fontforge/CMakeFiles/fontforge.dir/asmfpst.c.o -c ../../fontforge/asmfpst.c
In file included from ../../fontforge/asmfpst.h:4,
from ../../fontforge/asmfpst.c:30:
../../fontforge/splinefont.h:63:18: error: two or more data types in declaration specifiers
63 | #define extended double
| ^~~~~~
In file included from /usr/include/i386-gnu/bits/sigcontext.h:30,
from /usr/include/signal.h:291,
from /usr/include/glib-2.0/glib/gbacktrace.h:36,
from /usr/include/glib-2.0/glib.h:34,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
from ../../inc/ffglib.h:29,
from ../../fontforge/baseviews.h:31,
from ../../fontforge/fontforgevw.h:31,
from ../../fontforge/asmfpst.c:33:
/usr/include/i386-gnu/mach/i386/fp_reg.h:80:24: error: expected identifier or ‘(’ before ‘[’ token
80 | unsigned char extended[0]; /* Extended region */
| ^
This patch temporarily undefines the "extended" macro before loading
<gio/gio.h> and friends, and redefines the "extended" macro right after.
and redefines it afterwards.
Last-Update: 2022-06-16
Gbp-Pq: Name 0005-hurd-undef-extended-temporarily.patch