From a979d9c4db0adbf341eb329abaf3560aa12f10fd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 7 Dec 2006 06:58:13 +0000 Subject: * NEWS: Document the fixes below. * configure.ac (AC_CHECK_FUNCS_ONCE): Add siginterrupt. * gzip.c (lstat) [!defined(HAVE_LSTAT) && !defined(lstat)]: Remove. (SA_NOCLDSTOP, sigprocmask, sigset_t) [!defined SA_NOCLDSTOP]: New macros. (siginterrupt) [!defined SA_NOCLDSTOP && ! HAVE_SIGINTERRUPT]: New macro. (HAVE_WORKING_O_NOFOLLOW): Define to 0 if not defined. (caught_signals, exiting_signal, remove_ofname_fd): New vars. (remove_ofname): Remove; all uses changed to remove_ofname_fd. (same_file, name_too_long): Remove. (install_signal_handlers): New function. It prefers sigaction, which is more reliable in the presence of race conditions. Catch SIGXCPU and SIGXFSZ, too. (main): Use it instead of installing them by hand. (treat_file): Check for read error when closing ifd. (treat_file, create_outfile, remove_output_file): Avoid race conditions with signals. (create_outfile, check_ofname): Remove most of the gorp about working around ENAMETOOLONG deficiencies. It's obsolete now, and anyway it had race conditions. Just rely on O_EXCL and ENAMETOOLONG. The worst that can happen is that a file name will be silently truncated on an obsolete machine, but no data will be lost. (open_and_stat): Use HAVE_WORKING_O_NOFOLLOW rather than O_NOFOLLOW to work around some O_NOFOLLOW bugs. Otherwise, fall back on lstat only if lstat is available, as symlinks don't exist otherwise. (open_input_file): Use O_NONBLOCK and O_NOCTTY too, to avoid hanging gzip on special files. (abort_gzip_signal): If sigaction is not available, ignore signals. If we get the exiting signal, exit with ERROR status rather than raising a signal. * tailor.h (NO_ST_INO): Remove; no longer used now that same_file is gone. --- tailor.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tailor.h') diff --git a/tailor.h b/tailor.h index 2de59b7..0563436 100644 --- a/tailor.h +++ b/tailor.h @@ -1,6 +1,6 @@ /* tailor.h -- target dependent definitions - Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2002, 2006 Free Software Foundation, Inc. Copyright (C) 1992-1993 Jean-loup Gailly This program is free software; you can redistribute it and/or modify @@ -256,10 +256,6 @@ # define OS_CODE 0x0a #endif -#ifndef unix -# define NO_ST_INO /* don't rely on inode numbers */ -#endif - /* Common defaults */ -- cgit v1.2.1