From be9ea2fe1dd55326efdbbcbc3a3ade4817ca7577 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 5 Jun 2024 16:41:52 +0800 Subject: [PATCH] Fix the GNUstep build * src/Makefile.in (NON_OBJC_CFLAGS): Add -Wflex-array-member-not-at-end. * src/lisp.h (flush_stack_call_func): "asm" is unavailable in Objective C. * src/nsfns.m (ns_make_frame_key_window): Delete unused function. (cherry picked from commit 533ed7b221ab40be217e951e925739360e457b50) --- src/Makefile.in | 2 +- src/lisp.h | 2 +- src/nsfns.m | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index a14ae5eacb8..cac0b4ea280 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -423,7 +423,7 @@ endif # Flags that might be in WARN_CFLAGS but are not valid for Objective C. NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd \ - -Wnested-externs -Wstrict-flex-arrays + -Wnested-externs -Wstrict-flex-arrays -Wflex-array-member-not-at-end # Ditto, but for C++. NON_CXX_CFLAGS = -Wmissing-prototypes -Wnested-externs -Wold-style-definition \ -Wstrict-prototypes -Wno-override-init diff --git a/src/lisp.h b/src/lisp.h index 67fcb146515..e1911cbb660 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4508,7 +4508,7 @@ flush_stack_call_func (void (*func) (void *arg), void *arg) /* Work around GCC sibling call optimization making '__builtin_unwind_init' ineffective (bug#65727). See . */ -#if defined __GNUC__ && !defined __clang__ +#if defined __GNUC__ && !defined __clang__ && !defined __OBJC__ asm (""); #endif } diff --git a/src/nsfns.m b/src/nsfns.m index b08d053610f..23f23375976 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -690,12 +690,6 @@ ns_change_tab_bar_height (struct frame *f, int height) SET_FRAME_GARBAGED (f); } -void -ns_make_frame_key_window (struct frame *f) -{ - [[FRAME_NS_VIEW (f) window] makeKeyWindow]; -} - /* tabbar support */ static void ns_set_tab_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) -- 2.39.5