From: Bruno Haible Date: Tue, 14 Oct 2003 10:24:31 +0000 (+0000) Subject: Test for sig_atomic_t. Needed for reliable signal handlers. X-Git-Tag: v0.13~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa97e00a275fcc9c2972791397b070f6a7081924;p=thirdparty%2Fgettext.git Test for sig_atomic_t. Needed for reliable signal handlers. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index dec1ad95e..ae133f0e5 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,8 @@ +2003-10-08 Bruno Haible + + * configure.ac: Invoke gt_SIG_ATOMIC_T. + * Makefile.am (config.h_vms, config.h.msvc): Define HAVE_SIG_ATOMIC_T. + 2003-10-04 Bruno Haible * configure.ac: Remove gt_PROG_LEX invocation. diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am index 433c74bac..5ea01522a 100644 --- a/gettext-tools/Makefile.am +++ b/gettext-tools/Makefile.am @@ -99,6 +99,7 @@ config.h_vms: config.h.in ../version.sh -e 's/#undef HAVE_SELECT$$/#define HAVE_SELECT 1/' \ -e 's/#undef HAVE_SETENV$$/#define HAVE_SETENV 1/' \ -e 's/#undef HAVE_SETLOCALE$$/#define HAVE_SETLOCALE 1/' \ + -e 's/#undef HAVE_SIG_ATOMIC_T$$/#define HAVE_SIG_ATOMIC_T 1/' \ -e 's/#undef HAVE_STDBOOL_H$$/#define HAVE_STDBOOL_H 1/' \ -e 's/#undef HAVE_STDDEF_H$$/#define HAVE_STDDEF_H 1/' \ -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \ @@ -183,6 +184,7 @@ config.h.msvc: config.h.in ../version.sh -e 's/#undef HAVE_RAISE$$/#define HAVE_RAISE 1/' \ -e 's/#undef HAVE_SEARCH_H$$/#define HAVE_SEARCH_H 1/' \ -e 's/#undef HAVE_SETLOCALE$$/#define HAVE_SETLOCALE 1/' \ + -e 's/#undef HAVE_SIG_ATOMIC_T$$/#define HAVE_SIG_ATOMIC_T 1/' \ -e 's/#undef HAVE_STDDEF_H$$/#define HAVE_STDDEF_H 1/' \ -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \ -e 's/#undef HAVE_STRCSPN$$/#define HAVE_STRCSPN 1/' \ diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 35d319217..bd491ffed 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -96,6 +96,7 @@ jm_AC_TYPE_UINTMAX_T gt_TYPE_SSIZE_T AC_TYPE_PID_T AC_TYPE_MODE_T +gt_TYPE_SIG_ATOMIC_T dnl Checks for library functions. gl_FUNC_ALLOCA diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index ce8f86090..8cdabdba7 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,3 +1,8 @@ +2003-10-14 Bruno Haible + + * sig_atomic_t.m4: New file. + * Makefile.am (EXTRA_DIST): Add it. + 2003-10-04 Bruno Haible * flex.m4: Remove file. diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am index dc9018e51..1a50530e8 100644 --- a/gettext-tools/m4/Makefile.am +++ b/gettext-tools/m4/Makefile.am @@ -58,6 +58,7 @@ readlink.m4 \ relocatable.m4 \ setenv.m4 \ setlocale.m4 \ +sig_atomic_t.m4 \ siginfo.m4 \ signalblocking.m4 \ ssize_t.m4 \ diff --git a/gettext-tools/m4/sig_atomic_t.m4 b/gettext-tools/m4/sig_atomic_t.m4 new file mode 100644 index 000000000..b89363553 --- /dev/null +++ b/gettext-tools/m4/sig_atomic_t.m4 @@ -0,0 +1,16 @@ +# sig_atomic_t.m4 serial 1 (gettext-0.12.2) +dnl Copyright (C) 2003 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +AC_DEFUN([gt_TYPE_SIG_ATOMIC_T], +[ + AC_CHECK_TYPES(sig_atomic_t, , + [AC_DEFINE(sig_atomic_t, int, + [Define as an integer type suitable for memory locations that can be + accessed atomically even in the presence of asynchnonous signals.])], + [#include ]) +])