summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bootstrap.conf2
-rw-r--r--configure.ac3
-rw-r--r--src/commands.c2
-rw-r--r--src/makeint.h2
4 files changed, 6 insertions, 3 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 1dc096db..a8b8b8d5 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -47,7 +47,7 @@ automake 1.16.1
"
gnulib_name=libgnu
-gnulib_files=doc/make-stds.texi
+gnulib_files="doc/make-stds.texi m4/sig_atomic_t.m4"
# Using the full strtoll module pulls in a lot of stuff. But, it's pretty
# simple to use just the base source file, so pull that. We'll use it in
diff --git a/configure.ac b/configure.ac
index 2f5d9810..e953bf1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,9 @@ AC_TYPE_SSIZE_T
AC_TYPE_INTMAX_T
AC_TYPE_UINTMAX_T
+# Check for sig_atomic_t
+gt_TYPE_SIG_ATOMIC_T
+
# Find out whether our struct stat returns nanosecond resolution timestamps.
AC_STRUCT_ST_MTIM_NSEC
diff --git a/src/commands.c b/src/commands.c
index e7c0cc87..13d98ff9 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -479,7 +479,7 @@ execute_file_commands (struct file *file)
/* This is set while we are inside fatal_error_signal,
so things can avoid nonreentrant operations. */
-int handling_fatal_signal = 0;
+volatile sig_atomic_t handling_fatal_signal = 0;
/* Handle fatal signals. */
diff --git a/src/makeint.h b/src/makeint.h
index 0bc41eb1..2da2a6fd 100644
--- a/src/makeint.h
+++ b/src/makeint.h
@@ -791,7 +791,7 @@ extern char *version_string, *remote_description, *make_host;
extern unsigned int commands_started;
-extern int handling_fatal_signal;
+extern volatile sig_atomic_t handling_fatal_signal;
#ifndef MIN
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))