]> Savannah Git Hosting - gnulib.git/commitdiff
regex: Make configure test more maintainable.
authorBruno Haible <bruno@clisp.org>
Sat, 26 Oct 2024 18:58:05 +0000 (20:58 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 12 Nov 2024 00:36:04 +0000 (01:36 +0100)
* m4/regex.m4 (gl_REGEX): Include <malloc.h> before testing for
M_CHECK_ACTION.

ChangeLog
m4/regex.m4

index fb09c3b0b267a687c6e26e6441c1db1b294dfdb0..3c85ac45bd11234c3140c5df24718ad024c519a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-26  Bruno Haible  <bruno@clisp.org>
+
+       regex: Make configure test more maintainable.
+       * m4/regex.m4 (gl_REGEX): Include <malloc.h> before testing for
+       M_CHECK_ACTION.
+
 2024-10-26  Bruno Haible  <bruno@clisp.org>
 
        pipe-filter-gi: Correct documentation.
index 3dfeabea05778cb0497a39d691b93ca2874cfe54..debe28a502aeeecce5b6d5165ef67566c695d4d6 100644 (file)
@@ -1,4 +1,4 @@
-# serial 75
+# serial 76
 
 # Copyright (C) 1996-2001, 2003-2024 Free Software Foundation, Inc.
 #
@@ -40,15 +40,15 @@ AC_DEFUN([gl_REGEX],
             #include <limits.h>
             #include <string.h>
 
+            #if HAVE_MALLOC_H
+            # include <malloc.h> /* defines M_CHECK_ACTION on glibc */
+            #endif
+
             #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
             # include <signal.h>
             # include <unistd.h>
             #endif
 
-            #if HAVE_MALLOC_H
-            # include <malloc.h>
-            #endif
-
             #ifdef M_CHECK_ACTION
             /* Exit with distinguishable exit code.  */
             static void sigabrt_no_core (int sig) { raise (SIGTERM); }