From 46939413bcaceadc997374673db9577151c48d2c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 3 Oct 2023 00:28:31 +0200 Subject: [PATCH] localename, gettext: Avoid crash on macOS 14. Reported by Shupeng Xue at . Cf . * m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices framework in addition to the CoreFoundation framework. --- ChangeLog | 9 +++++++++ m4/intlmacosx.m4 | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11d0c060cb..33529e3f68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2023-10-02 Bruno Haible + + localename, gettext: Avoid crash on macOS 14. + Reported by Shupeng Xue at + . + Cf . + * m4/intlmacosx.m4 (gt_INTL_MACOSX): Link with the CoreServices + framework in addition to the CoreFoundation framework. + 2023-10-02 Bruno Haible localcharset: Avoid internal compiler error with -Wextra on macOS 10.5. diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4 index 81eefd750b..3141bf8c5e 100644 --- a/m4/intlmacosx.m4 +++ b/m4/intlmacosx.m4 @@ -1,4 +1,4 @@ -# intlmacosx.m4 serial 8 (gettext-0.20.2) +# intlmacosx.m4 serial 9 (gettext-0.22.3) dnl Copyright (C) 2004-2014, 2016, 2019-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -59,7 +59,11 @@ AC_DEFUN([gt_INTL_MACOSX], INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + dnl Starting with macOS version 14, CoreFoundation relies on CoreServices, + dnl and we have to link it in explicitly, otherwise an exception + dnl NSInvalidArgumentException "unrecognized selector sent to instance" + dnl occurs. + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) -- 2.39.5