From b0afb8fe0ff1d87165af9df61501197a06240dda Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 28 Dec 2025 12:13:40 +0100 Subject: Sync with Gnulib stable-202507 code (a8ac9f9ce5) --- gl/m4/regex.m4 | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'gl/m4/regex.m4') diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4 index f0101fe6..49a8059f 100644 --- a/gl/m4/regex.m4 +++ b/gl/m4/regex.m4 @@ -1,9 +1,10 @@ # regex.m4 -# serial 75 -dnl Copyright (C) 1996-2001, 2003-2024 Free Software Foundation, Inc. +# serial 81 +dnl Copyright (C) 1996-2001, 2003-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. +dnl This file is offered as-is, without any warranty. dnl Initially derived from code in GNU grep. dnl Mostly written by Jim Meyering. @@ -39,19 +40,24 @@ AC_DEFUN([gl_REGEX], #include #include - #if defined M_CHECK_ACTION || HAVE_DECL_ALARM - # include - # include + #if HAVE_MALLOC_H + # include /* defines M_CHECK_ACTION on glibc */ #endif - #if HAVE_MALLOC_H - # include + #if defined __HAIKU__ || defined M_CHECK_ACTION || HAVE_DECL_ALARM + # include + # include #endif - #ifdef M_CHECK_ACTION + #if defined __HAIKU__ || defined M_CHECK_ACTION /* Exit with distinguishable exit code. */ static void sigabrt_no_core (int sig) { raise (SIGTERM); } #endif + + /* There is no need to check whether RE_SYNTAX_EMACS is + (RE_CHAR_CLASSES | RE_INTERVALS), corresponding to + Emacs 21 (2001) and later, because Gnulib's lib/regex.h + is always used and has this value. */ ]], [[int result = 0; static struct re_pattern_buffer regex; @@ -67,6 +73,9 @@ AC_DEFUN([gl_REGEX], signal (SIGALRM, SIG_DFL); alarm (2); #endif +#ifdef __HAIKU__ + signal (SIGABRT, sigabrt_no_core); +#endif #ifdef M_CHECK_ACTION signal (SIGABRT, sigabrt_no_core); mallopt (M_CHECK_ACTION, 2); @@ -388,7 +397,6 @@ AC_DEFUN([gl_PREREQ_REGEX], AC_REQUIRE([AC_C_INLINE]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_REQUIRE([gl_EEMALLOC]) AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS_ONCE([isblank iswctype]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) -- cgit v1.2.3-74-g34f1