unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] configure: Include <stdlib.h> for malloc in alternate signal stack test
@ 2022-12-23 17:51 Florian Weimer
  2022-12-24  8:05 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2022-12-23 17:51 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] configure: Include <stdlib.h> for malloc in alternate signal stack test
  2022-12-23 17:51 [PATCH] configure: Include <stdlib.h> for malloc in alternate signal stack test Florian Weimer
@ 2022-12-24  8:05 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-12-24  8:05 UTC (permalink / raw)
  To: Florian Weimer; +Cc: emacs-devel

> From: Florian Weimer <fweimer@redhat.com>
> Date: Fri, 23 Dec 2022 18:51:08 +0100
> 
> 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.

Thanks, installed on the emacs-29 branch.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-24  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 17:51 [PATCH] configure: Include <stdlib.h> for malloc in alternate signal stack test Florian Weimer
2022-12-24  8:05 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).