From unknown Fri Jun 20 07:19:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6051: 4 small patches: traps, unnecessary #if HAVE_HEADER_H, factor doc Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 27 Apr 2010 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6051 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 6051@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.127236980724096 (code B ref -1); Tue, 27 Apr 2010 12:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Apr 2010 12:03:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6jVe-0006Gb-JF for submit@debbugs.gnu.org; Tue, 27 Apr 2010 08:03:27 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6jVb-0006GV-EK for submit@debbugs.gnu.org; Tue, 27 Apr 2010 08:03:25 -0400 Received: from lists.gnu.org ([199.232.76.165]:38919) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O6jVV-0003pu-W8 for submit@debbugs.gnu.org; Tue, 27 Apr 2010 08:03:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6jVV-0002bO-QN for bug-coreutils@gnu.org; Tue, 27 Apr 2010 08:03:17 -0400 Received: from [140.186.70.92] (port=51762 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6jVP-0002Yw-7s for bug-coreutils@gnu.org; Tue, 27 Apr 2010 08:03:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6jUv-0004lK-Pt for bug-coreutils@gnu.org; Tue, 27 Apr 2010 08:03:10 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:56528) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6jUu-0004ky-VD for bug-coreutils@gnu.org; Tue, 27 Apr 2010 08:02:41 -0400 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id CF736940108 for ; Tue, 27 Apr 2010 14:02:36 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id E0E7094017C for ; Tue, 27 Apr 2010 14:02:33 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id C15001017B; Tue, 27 Apr 2010 14:02:33 +0200 (CEST) From: Jim Meyering Date: Tue, 27 Apr 2010 14:02:33 +0200 Message-ID: <87bpd52jdy.fsf@meyering.net> Lines: 303 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) FYI, just pushed: [I have a syntax-check that prompted #2 and #3. coming soon to gnulib. ] >From 301c74865ef13a11e303a2320743b2997bb568e7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 24 Apr 2010 15:50:41 +0200 Subject: [PATCH 1/4] tests: clean up also upon SIGQUIT * tests/test-lib.sh: Also trap on SIGQUIT. Spotted by Dmitry V. Levin. --- tests/test-lib.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 8bf5601..a62857b 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -410,6 +410,7 @@ remove_tmp_() trap remove_tmp_ 0 trap 'Exit 129' 1 trap 'Exit 130' 2 +trap 'Exit 131' 3 trap 'Exit 141' 13 trap 'Exit 143' 15 -- 1.7.1.328.g9993c >From a4ab8d9c55f4e3c9aac7859e85545e769b43f256 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 24 Apr 2010 17:16:56 +0200 Subject: [PATCH 2/4] build: enable gnulib modules for more replacement headers * bootstrap.conf (gnulib_modules): Add the following: netinet_in, sys_ioctl, sys_wait, so that we can eliminate the #if HAVE_
_H tests guarding their header inclusions. --- bootstrap.conf | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 55b2f60..caa2b1a 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -159,6 +159,7 @@ gnulib_modules=" modechange mountlist mpsort + netinet_in nproc obstack pathmax @@ -210,7 +211,9 @@ gnulib_modules=" strtoimax strtoumax symlink + sys_ioctl sys_stat + sys_wait timespec tzset uname -- 1.7.1.328.g9993c >From 2191fe8f8d84e39f8c4b861cde28d395639393e1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 24 Apr 2010 17:38:13 +0200 Subject: [PATCH 3/4] maint: remove now-unnecessary #if HAVE_header_H tests. * .x-sc_prohibit_always_true_header_tests: New file. * Makefile.am (syntax_check_exceptions): Add it. * src/cat.c: Remove #if HAVE_SYS_IOCTL_H test. * src/copy.c: Likewise. * src/ls.c: Likewise. * src/stty.c: Likewise. * src/install.c: Remove #if HAVE_SYS_WAIT_H test. * src/kill.c: Likewise. * src/operand2sig.c: Likewise. * src/timeout.c: Likewise. * src/pathchk.c: Remove #if HAVE_WCHAR_H test. * src/stat.c: Remove #if HAVE_NETINET_IN_H test. --- .x-sc_prohibit_always_true_header_tests | 2 ++ Makefile.am | 1 + src/cat.c | 4 +--- src/copy.c | 4 +--- src/install.c | 4 +--- src/kill.c | 4 +--- src/ls.c | 4 +--- src/operand2sig.c | 4 +--- src/pathchk.c | 4 +--- src/stat.c | 2 +- src/stty.c | 4 +--- src/timeout.c | 4 +--- 12 files changed, 13 insertions(+), 28 deletions(-) create mode 100644 .x-sc_prohibit_always_true_header_tests diff --git a/.x-sc_prohibit_always_true_header_tests b/.x-sc_prohibit_always_true_header_tests new file mode 100644 index 0000000..732d9ec --- /dev/null +++ b/.x-sc_prohibit_always_true_header_tests @@ -0,0 +1,2 @@ +^m4/stat-prog\.m4$ +ChangeLog diff --git a/Makefile.am b/Makefile.am index 9a7f45c..83c28b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,6 +59,7 @@ syntax_check_exceptions = \ .x-sc_sun_os_names \ .x-sc_system_h_headers \ .x-sc_trailing_blank \ + .x-sc_prohibit_always_true_header_tests \ .x-sc_unmarked_diagnostics \ .x-sc_useless_cpp_parens diff --git a/src/cat.c b/src/cat.c index c33e0b3..8740e0e 100644 --- a/src/cat.c +++ b/src/cat.c @@ -30,9 +30,7 @@ #if HAVE_STROPTS_H # include #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #include "system.h" #include "error.h" diff --git a/src/copy.c b/src/copy.c index d18fd45..c16cef6 100644 --- a/src/copy.c +++ b/src/copy.c @@ -61,9 +61,7 @@ # include "verror.h" #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #ifndef HAVE_FCHOWN # define HAVE_FCHOWN false diff --git a/src/install.c b/src/install.c index bac5c7c..038e869 100644 --- a/src/install.c +++ b/src/install.c @@ -48,9 +48,7 @@ #define AUTHORS proper_name ("David MacKenzie") -#if HAVE_SYS_WAIT_H -# include -#endif +#include static int selinux_enabled = 0; static bool use_default_selinux_context = true; diff --git a/src/kill.c b/src/kill.c index dab4fa8..09d2808 100644 --- a/src/kill.c +++ b/src/kill.c @@ -22,9 +22,7 @@ #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif diff --git a/src/ls.c b/src/ls.c index 6bd680e..ca09ead 100644 --- a/src/ls.c +++ b/src/ls.c @@ -45,9 +45,7 @@ #if HAVE_STROPTS_H # include #endif -#if HAVE_SYS_IOCTL_H -# include -#endif +#include #ifdef WINSIZE_IN_PTEM # include diff --git a/src/operand2sig.c b/src/operand2sig.c index 5b26a75..d0500cd 100644 --- a/src/operand2sig.c +++ b/src/operand2sig.c @@ -25,9 +25,7 @@ #include #include -#if HAVE_SYS_WAIT_H -# include -#endif +#include #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif diff --git a/src/pathchk.c b/src/pathchk.c index d9f6c0a..62c2094 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -18,9 +18,7 @@ #include #include #include -#if HAVE_WCHAR_H -# include -#endif +#include #include "system.h" #include "error.h" diff --git a/src/stat.c b/src/stat.c index 5063e70..e6de541 100644 --- a/src/stat.c +++ b/src/stat.c @@ -44,7 +44,7 @@ /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */ # include # include -# if HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H +# if HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H /* Ultrix 4.4 needs these for the declaration of struct statfs. */ # include # include diff --git a/src/stty.c b/src/stty.c index 8c6920f..71045c2 100644 --- a/src/stty.c +++ b/src/stty.c @@ -42,9 +42,7 @@ #if HAVE_STROPTS_H # include #endif -#ifdef HAVE_SYS_IOCTL_H -# include -#endif +#include #ifdef WINSIZE_IN_PTEM # include diff --git a/src/timeout.c b/src/timeout.c index d1ea06d..c6f6525 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -49,10 +49,8 @@ #include #include #include +#include -#if HAVE_SYS_WAIT_H -# include -#endif #ifndef WIFSIGNALED # define WIFSIGNALED(s) (((s) & 0xFFFF) - 1 < (unsigned int) 0xFF) #endif -- 1.7.1.328.g9993c >From 83e4f0ca0224e9d3f628d6f1364ce49393a7af04 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 25 Apr 2010 10:35:51 +0200 Subject: [PATCH 4/4] doc: tweak factor-describing wording * doc/coreutils.texi (factor invocation): Don't say that "factoring large prime numbers is hard". A pedant might ding you, since it's trivial to factor a number that is known to be prime. Instead, say that "factoring large numbers... is hard". Reported by Andreas Eder. --- doc/coreutils.texi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index f40993e..73971c6 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -15470,7 +15470,7 @@ factor invocation Similarly, factoring the eighth Fermat number @math{2^{256}+1} takes about 20 seconds on the same machine. -Factoring large prime numbers is, in general, hard. The Pollard Rho +Factoring large numbers is, in general, hard. The Pollard Rho algorithm used by @command{factor} is particularly effective for numbers with relatively small factors. If you wish to factor large numbers which do not have small factors (for example, numbers which -- 1.7.1.328.g9993c From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 13:34:34 2010 Received: (at control) by debbugs.gnu.org; 30 Apr 2010 17:34:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7u6j-0005NE-42 for submit@debbugs.gnu.org; Fri, 30 Apr 2010 13:34:33 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7u6h-0005N7-UK for control@debbugs.gnu.org; Fri, 30 Apr 2010 13:34:32 -0400 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id BD06494014F for ; Fri, 30 Apr 2010 19:34:24 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id D6A11940096 for ; Fri, 30 Apr 2010 19:34:21 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id BA9D610350; Fri, 30 Apr 2010 19:34:21 +0200 (CEST) From: Jim Meyering To: control@debbugs.gnu.org Subject: control Date: Fri, 30 Apr 2010 19:34:21 +0200 Message-ID: <87vdb8kfoi.fsf@meyering.net> Lines: 4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) close 5995 close 5925 close 6051 tags 5962 + wishlist