Commit a3f953e8 authored by Eric Blake's avatar Eric Blake

c-stack: fix regression on Irix 5.3 from 2008-06-21

* m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for
sa_sigaction...
* m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here.
(gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's.
* m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default.
* modules/signal (Makefile.am): Use the value.
* lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION
&& !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define.
* doc/posix-headers/signal.texi (signal.h): Document this
portability issue.
* doc/posix-functions/sigaction.texi (sigaction): Likewise.
Reported by Tom G. Christensen.
Signed-off-by: 's avatarEric Blake <ebb9@byu.net>
parent 76bc00ad
2008-08-16 Eric Blake <ebb9@byu.net>
c-stack: fix regression on Irix 5.3 from 2008-06-21
* m4/c-stack.m4 (gl_PREREQ_C_STACK): Move check for
sa_sigaction...
* m4/sigaction.m4 (gl_PREREQ_SIG_HANDLER_H): ...here.
(gl_PREREQ_SIGACTION): Depend on sig-handler.h prereq's.
* m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Set the default.
* modules/signal (Makefile.am): Use the value.
* lib/signal.in.h (sa_sigaction) [HAVE_SIGACTION
&& !HAVE_STRUCT_SIGACTION_SA_SIGACTION]: Define.
* doc/posix-headers/signal.texi (signal.h): Document this
portability issue.
* doc/posix-functions/sigaction.texi (sigaction): Likewise.
Reported by Tom G. Christensen.
2008-08-17 Bruno Haible <bruno@clisp.org>
New module 'threadlib'.
......@@ -36,6 +36,11 @@ mingw.
Support for SA_RESTART is missing on some platforms:
mingw.
@item
In spite of having SA_SIGACTION, struct sigaction lacks the
sa_sigaction member on some platforms:
Irix 5.3.
@item
The symbolic value @code{SIG_IGN} for the @code{SIGCHLD} signal is equivalent
to a signal handler
......
......@@ -15,12 +15,13 @@ mingw.
@code{struct sigaction} and @code{siginfo_t} are missing on some
platforms:
mingw.
@item
@code{struct sigaction} lacks the @code{sa_sigaction} member on some
platforms:
Irix 5.3, Interix 3.5.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
@code{struct sigaction} lacks the @code{sa_sigaction} member on some
platforms; this can also be detected by whether @code{SA_SIGINFO} is defined:
Interix 3.5.
@end itemize
......@@ -146,7 +146,11 @@ struct sigaction
extern int sigaction (int, const struct sigaction *restrict,
struct sigaction *restrict);
#endif /* !@HAVE_SIGACTION@ */
#elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
# define sa_sigaction sa_handler
#endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
#ifdef __cplusplus
......
......@@ -7,7 +7,7 @@
# Written by Paul Eggert.
# serial 3
# serial 4
AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
[# for STACK_DIRECTION
......@@ -146,8 +146,6 @@ AC_DEFUN([gl_PREREQ_C_STACK],
AC_CHECK_HEADERS_ONCE([unistd.h ucontext.h])
AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , [#include <signal.h>])
AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])
dnl c-stack does not need -lsigsegv if the system has XSI heuristics.
......
# sigaction.m4 serial 3
# sigaction.m4 serial 4
dnl Copyright (C) 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -22,6 +22,7 @@ AC_DEFUN([gl_PREREQ_SIGACTION],
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_UID_T])
AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
AC_CHECK_TYPES([siginfo_t], [], [], [[
#include <signal.h>
......@@ -36,5 +37,10 @@ AC_DEFUN([gl_PREREQ_SIGACTION],
AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
[
AC_REQUIRE([AC_C_INLINE])
:
AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
[[#include <signal.h>]])
if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
fi
])
# signal_h.m4 serial 4
# signal_h.m4 serial 5
dnl Copyright (C) 2007, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -26,4 +26,6 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
])
......@@ -28,6 +28,7 @@ signal.h: signal.in.h
-e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
-e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
-e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
-e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
< $(srcdir)/signal.in.h; \
} > $@-t
......
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