emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] configure: Include <stdlib.h> for malloc in alternate signal sta


From: Florian Weimer
Subject: [PATCH] configure: Include <stdlib.h> for malloc in alternate signal stack test
Date: Fri, 23 Dec 2022 18:51:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

Otherwise the test can fail spuriously because the implicit-declared
malloc returns a 32-bit int even on 64-bit systems.

* configurea.c (emacs_cv_alternate_stack): Include <stdlib.h> for malloc.

diff --git a/configure.ac b/configure.ac
index 6e9b11986c..3476359195 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5242,6 +5242,7 @@ AC_CACHE_CHECK([whether signals can be handled on 
alternate stack],
               [emacs_cv_alternate_stack],
   [AC_COMPILE_IFELSE(
      [AC_LANG_PROGRAM([[#include <signal.h>
+                       #include <stdlib.h>
                      ]],
                      [[stack_t ss;
                        struct sigaction sa;

Thanks,
Florian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]