Commit ce11f0fe authored by Thomas Roessler's avatar Thomas Roessler

Check volatility of sig_atomic_t.

parent 1c99ec8a
......@@ -175,3 +175,7 @@
/* Define if you have resizeterm, as a function or macro. */
#undef HAVE_RESIZETERM
/* Some systems declare sig_atomic_t as volatile, smome others -- no.
* This define will have value `sig_atomic_t' or `volatile sig_atomic_t'
* accordingly. */
#undef SIG_ATOMIC_VOLATILE_T
......@@ -217,8 +217,30 @@ AC_TYPE_SIGNAL
AC_MSG_CHECKING(for sig_atomic_t in signal.h)
AC_EGREP_HEADER(sig_atomic_t,signal.h,dnl
[ ac_cv_type_sig_atomic_t=yes; AC_MSG_RESULT(yes) ],dnl
AC_MSG_RESULT(no); AC_CHECK_TYPE(sig_atomic_t, int))
[
ac_cv_type_sig_atomic_t=yes;
AC_EGREP_HEADER(volatile.*sig_atomic_t,
signal.h,
[
is_sig_atomic_t_volatile=yes;
AC_MSG_RESULT([yes, volatile])
],
[
is_sig_atomic_t_volatile=no;
AC_MSG_RESULT([yes, non volatile])
])
],
[
AC_MSG_RESULT(no)
AC_CHECK_TYPE(sig_atomic_t, int)
is_sig_atomic_t_volatile=no
])
if test $is_sig_atomic_t_volatile = 'yes'
then
AC_DEFINE(SIG_ATOMIC_VOLATILE_T, sig_atomic_t)
else
AC_DEFINE(SIG_ATOMIC_VOLATILE_T, [volatile sig_atomic_t])
fi
AC_DECL_SYS_SIGLIST
......
......@@ -135,9 +135,9 @@ WHERE short ScoreThresholdRead;
WHERE short ScoreThresholdFlag;
/* flags for received signals */
WHERE volatile sig_atomic_t SigAlrm INITVAL (0);
WHERE volatile sig_atomic_t SigInt INITVAL (0);
WHERE volatile sig_atomic_t SigWinch INITVAL (0);
WHERE SIG_ATOMIC_VOLATILE_T SigAlrm INITVAL (0);
WHERE SIG_ATOMIC_VOLATILE_T SigInt INITVAL (0);
WHERE SIG_ATOMIC_VOLATILE_T SigWinch INITVAL (0);
WHERE int CurrentMenu;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment