Ticket #3971: clarify sighandler_t usage in non-GNU OSes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2019-02-22 11:32:43 +03:00
parent 4135eb6460
commit 4f06ba9346
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 */