From: Stelian Pop Date: Wed, 30 Aug 2000 08:55:15 +0000 (+0000) Subject: Empty the sigaction structure to be portable. X-Git-Tag: release_0_4b20~13 X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=commitdiff_plain;h=bd73117103358c5ee4f02a8fad5dc45123c7a5cc Empty the sigaction structure to be portable. --- diff --git a/CHANGES b/CHANGES index 0845ca5..d8d7f79 100644 --- a/CHANGES +++ b/CHANGES @@ -1,12 +1,14 @@ -$Id: CHANGES,v 1.79 2000/08/21 10:45:39 stelian Exp $ +$Id: CHANGES,v 1.80 2000/08/30 08:55:15 stelian Exp $ Changes between versions 0.4b19 and 0.4b20 (released ???????????????) ===================================================================== -1. Added a configure option to search for sa_sigaction member - of the struct sigaction. This should fix the compile on - libc5. Thanks to Gunther Schlegel - for reporting the bug. +1. Fixed a small compilation problem due to a change + in the definintion of the struct sigaction in + glibc 2.0 / libc5. Thanks to Gunther Schlegel + for reporting the bug and to + Dave Platt for suggesting + a fix. 2. Modified the label and uuid analysis in order to be self-contained (independant of kernel/libc headers). This diff --git a/THANKS b/THANKS index 6bea619..94d27bc 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.35 2000/08/21 10:45:39 stelian Exp $ +$Id: THANKS,v 1.36 2000/08/30 08:55:15 stelian Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -54,6 +54,7 @@ Dejan Muhamedagic dejan@quant-x.com Lukas Nellen L.Nellen@ThPhys.Uni-Heidelberg.DE Nuno Oliveira nuno@eq.uc.pt Brent Olson night@halcyon.com +Dave Platt dplatt@snulbug.mtview.ca.us Kenneth Porter shiva@well.com Bernhard Sadlowski sadlowsk@Mathematik.Uni-Bielefeld.DE Jan Sanislo oystr@cs.washington.edu diff --git a/config.h.in b/config.h.in index 9c67444..1f51bea 100644 --- a/config.h.in +++ b/config.h.in @@ -47,6 +47,3 @@ /* Define this is you want old style F script (no arguments) */ #undef OLD_STYLE_FSCRIPT - -/* Define if you have the sa_sigaction field in struct sigaction */ -#undef HAVE_SIGACTION_SA_SIGACTION diff --git a/configure b/configure index 8b2bedd..44fa7a1 100755 --- a/configure +++ b/configure @@ -1939,47 +1939,13 @@ rm -f conftest* fi fi -echo $ac_n "checking whether struct sigaction has a sa_sigaction field""... $ac_c" 1>&6 -echo "configure:1944: checking whether struct sigaction has a sa_sigaction field" >&5 -if eval "test \"`echo '$''{'dump_cv_struct_sa_sigaction'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { -struct sigaction action; action.sa_sigaction = NULL; -; return 0; } -EOF -if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - dump_cv_struct_sa_sigaction=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - dump_cv_struct_sa_sigaction=no -fi -rm -f conftest* -fi - -echo "$ac_t""$dump_cv_struct_sa_sigaction" 1>&6 -if test "$dump_cv_struct_sa_sigaction" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_SIGACTION_SA_SIGACTION 1 -EOF - -fi - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1978: checking for ANSI C header files" >&5 +echo "configure:1944: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1987,7 +1953,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2004,7 +1970,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2022,7 +1988,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2043,7 +2009,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2054,7 +2020,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2078,12 +2044,12 @@ EOF fi echo $ac_n "checking for quad_t""... $ac_c" 1>&6 -echo "configure:2082: checking for quad_t" >&5 +echo "configure:2048: checking for quad_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_quad_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2111,12 +2077,12 @@ EOF fi echo $ac_n "checking for u_quad_t""... $ac_c" 1>&6 -echo "configure:2115: checking for u_quad_t" >&5 +echo "configure:2081: checking for u_quad_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_u_quad_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS diff --git a/configure.in b/configure.in index 802f31a..dcb6bfb 100644 --- a/configure.in +++ b/configure.in @@ -303,22 +303,6 @@ if test "$ac_cv_func_glob" = "yes"; then fi fi -dnl -dnl Check if sigaction structure has a sa_sigaction field -dnl -AC_MSG_CHECKING(whether struct sigaction has a sa_sigaction field) -AC_CACHE_VAL(dump_cv_struct_sa_sigaction, -AC_TRY_COMPILE( -[#include -#include ], -[struct sigaction action; action.sa_sigaction = NULL;], -[dump_cv_struct_sa_sigaction=yes], -[dump_cv_struct_sa_sigaction=no])) -AC_MSG_RESULT($dump_cv_struct_sa_sigaction) -if test "$dump_cv_struct_sa_sigaction" = yes; then - AC_DEFINE(HAVE_SIGACTION_SA_SIGACTION) -fi - dnl dnl Check for types dnl diff --git a/dump/tape.c b/dump/tape.c index 9147441..63b6426 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.22 2000/08/21 10:45:40 stelian Exp $"; + "$Id: tape.c,v 1.23 2000/08/30 08:55:21 stelian Exp $"; #endif /* not lint */ #ifdef __linux__ @@ -895,11 +895,8 @@ enslave(void) master = getpid(); { struct sigaction sa; -#if HAVE_SIGACTION_SA_SIGACTION - sa.sa_sigaction = NULL; -#endif + memset(&sa, 0, sizeof sa); sigemptyset(&sa.sa_mask); - sa.sa_flags = 0; sa.sa_handler = dumpabort; sigaction(SIGTERM, &sa, NULL); /* Slave sends SIGTERM on dumpabort() */ sa.sa_handler = sigpipe;