Mercurial > hg > octave-nkf > gnulib-hg
changeset 10321:a6493a165dd2
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: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 16 Aug 2008 13:47:58 -0600 |
parents | 984531f1792d |
children | 794059e94b36 |
files | ChangeLog doc/posix-functions/sigaction.texi doc/posix-headers/signal.texi lib/signal.in.h m4/c-stack.m4 m4/sigaction.m4 m4/signal_h.m4 modules/signal |
diffstat | 8 files changed, 44 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +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'.
--- a/doc/posix-functions/sigaction.texi +++ b/doc/posix-functions/sigaction.texi @@ -37,6 +37,11 @@ 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 @smallexample
--- a/doc/posix-headers/signal.texi +++ b/doc/posix-headers/signal.texi @@ -15,12 +15,13 @@ @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
--- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -146,7 +146,11 @@ 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
--- a/m4/c-stack.m4 +++ b/m4/c-stack.m4 @@ -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_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.
--- a/m4/sigaction.m4 +++ b/m4/sigaction.m4 @@ -1,4 +1,4 @@ -# 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_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_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 ])
--- a/m4/signal_h.m4 +++ b/m4/signal_h.m4 @@ -1,4 +1,4 @@ -# 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 @@ 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]) ])
--- a/modules/signal +++ b/modules/signal @@ -28,6 +28,7 @@ -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