Merge branch '3971_sighandler_t'

* 3971_sighandler_t:
  Ticket #3971: clarify sighandler_t usage in non-GNU OSes.
This commit is contained in:
Andrew Borodin 2019-06-15 09:40:45 +03:00
commit 0cf2ded646
2 changed files with 11 additions and 0 deletions

View File

@ -42,6 +42,12 @@ AC_DEFUN([mc_UNIT_TESTS],[
fi fi
AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes") AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes")
dnl sighandler_t is GNU extension
dnl AC_USE_SYSTEM_EXTENSIONS is reguired
AC_CHECK_TYPES([sighandler_t], [], [], [
#include <signal.h>
])
# on cygwin, the linker does not accept the "-z" option # on cygwin, the linker does not accept the "-z" option
case $host_os in case $host_os in
cygwin*) cygwin*)

View File

@ -28,6 +28,11 @@
#include "lib/vfs/vfs.h" #include "lib/vfs/vfs.h"
/* sighandler_t is GNU extension */
#ifndef HAVE_SIGHANDLER_T
typedef void (*sighandler_t) (int);
#endif
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
/* @CapturedValue */ /* @CapturedValue */