GNU bug report logs - #10305
coreutils-8.14, "rm -r" fails with EBADF

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Severity: wishlist; Reported by: "Joachim Schmitz" <jojo@HIDDEN>; Keywords: notabug; dated Thu, 15 Dec 2011 14:08:01 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 5 Mar 2013 02:52:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 04 21:52:16 2013
Received: from localhost ([127.0.0.1]:59485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UChzE-00006m-GK
	for submit <at> debbugs.gnu.org; Mon, 04 Mar 2013 21:52:16 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:59215)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1UChzB-00006a-Q2
	for 10305 <at> debbugs.gnu.org; Mon, 04 Mar 2013 21:52:14 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 89991A6006F;
	Mon,  4 Mar 2013 18:51:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 8Y14J-HJM5b1; Mon,  4 Mar 2013 18:51:49 -0800 (PST)
Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net
	[71.189.154.249])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 41B66A60065;
	Mon,  4 Mar 2013 18:51:48 -0800 (PST)
Message-ID: <51355DC3.3030705@HIDDEN>
Date: Mon, 04 Mar 2013 18:51:47 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/20130221 Thunderbird/17.0.3
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: gnulib, as part of coreutils-8.21, some changes needed
References: <012201ce1914$9fe07210$dfa15630$@schmitz-digital.de>
In-Reply-To: <012201ce1914$9fe07210$dfa15630$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.8 (----)

Thanks, I pushed the following gnulib patch:

---
 ChangeLog                              | 8 ++++++++
 m4/non-recursive-gnulib-prefix-hack.m4 | 3 ---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 725fe13..0d2715c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-03-04  Paul Eggert  <eggert@HIDDEN>
+
+	non-recursive-gnulib-prefix-hack: port coreutils 8.21 to HP NonStop
+	* m4/non-recursive-gnulib-prefix-hack.m4
+	(gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't mess with ALLOCA.
+	Problem reported for HP NonStop + coreutils 8.21 by Joachim Schmitz in
+	<http://bugs.gnu.org/10305#237>.
+
 2013-03-04  Eric Blake  <eblake@HIDDEN>
 
 	test-getsockopt: avoid compiler warning
diff --git a/m4/non-recursive-gnulib-prefix-hack.m4 b/m4/non-recursive-gnulib-prefix-hack.m4
index 3153e0f..6d27f06 100644
--- a/m4/non-recursive-gnulib-prefix-hack.m4
+++ b/m4/non-recursive-gnulib-prefix-hack.m4
@@ -29,7 +29,4 @@ AC_DEFUN([gl_NON_RECURSIVE_GNULIB_PREFIX_HACK],
       (*_H:*.h) eval "$ac_var=$1/\$$ac_var";;
     esac
   done
-
-  # If $ALLOCA is not empty, prefix its value with "lib/".
-  test -n "$ALLOCA" && ALLOCA="lib/$ALLOCA"
 ])
-- 
1.7.11.7






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 4 Mar 2013 20:13:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 04 15:13:14 2013
Received: from localhost ([127.0.0.1]:59155 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UCbl3-00078m-M2
	for submit <at> debbugs.gnu.org; Mon, 04 Mar 2013 15:13:14 -0500
Received: from moutng.kundenserver.de ([212.227.17.8]:49805)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1UCbl1-00078a-Sf
	for 10305 <at> debbugs.gnu.org; Mon, 04 Mar 2013 15:13:12 -0500
Received: from DualCore (dsdf-4d0a1c05.pool.mediaWays.net [77.10.28.5])
	by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis)
	id 0MSHYx-1UNzt73h7b-00Tb72; Mon, 04 Mar 2013 21:12:47 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: <10305 <at> debbugs.gnu.org>,
	<bug-gnulib@HIDDEN>
Subject: RE: gnulib, as part of coreutils-8.21, some changes needed
Date: Mon, 4 Mar 2013 21:12:40 +0100
Message-ID: <012201ce1914$9fe07210$dfa15630$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac4OebixpgFTgufnQq65D4oybVXM3A==
Content-Language: de
X-Provags-ID: V02:K0:gqYcOknxSviyj1/1pksOBMALQF4UsubEWFizp3pSs+T
	jI0svvaiEbwArlTaI25anfDIikHuO+OrRhkr6x7DcbT0NitBDh
	PdbC8PI8BiaoD0WctuSiMohE2hZFWMW7uPQWfSgMT10RFPjyNV
	X7IxMauQCyqt77ipi3RgQyNZA+MeUegaj6oZ3LwyONsRKdkXXt
	BD9SY9xOsAyWg88OTTwrV/MDxuntuURz+L8uUgim4ZQNROzeQp
	1EVSR2hHQ8axW2AoLGenmn68S0BPfHtvFrz3ippZk3B/vmVfAG
	i0slD6qFNa1MXmvJ3tWMoIvsh/Aa3drO8DUtv7HwmTpE5rVUj7
	klBEwonvQTCD9d1u/bMvdy9i1GNFw+IpjSHr9IStGIJT05Wg/S
	y3Sa+Fttuiudw==
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 10305
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Hi folks
=20
In an attempt to port coreutils 8.21 to HP-NonStop I stumbled accross a =
couple problems, here are my fixes to them:

I had to tweak configure like this
diff -EBbu ./configure.orig ./configure
--- ./configure.orig    2013-02-14 09:54:18 -0600
+++ ./configure 2013-02-18 11:04:51 -0600
@@ -8134,7 +8134,7 @@



-ALLOCA=3D\${LIBOBJDIR}alloca.$ac_objext
+ALLOCA=3Dalloca.$ac_objext

 $as_echo "#define C_ALLOCA 1" >>confdefs.h


Otherwise make complained "no rule to make target lib/lib/alloca.o", I'm =
pretty sure though that there got to be a better fix for this




There are quite a few more changes that pertain to the recursive =
directory traversal

Bye, Jojo






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Feb 2013 05:49:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 21 00:49:59 2013
Received: from localhost ([127.0.0.1]:41134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U8P2b-00060I-Cl
	for submit <at> debbugs.gnu.org; Thu, 21 Feb 2013 00:49:59 -0500
Received: from g1t0027.austin.hp.com ([15.216.28.34]:7701)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <nagendra.vs@HIDDEN>) id 1U8P2Z-00060B-Q2
	for 10305 <at> debbugs.gnu.org; Thu, 21 Feb 2013 00:49:56 -0500
Received: from G2W4316.americas.hpqcorp.net (g2w4316.austin.hp.com
	[16.197.9.73]) (using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by g1t0027.austin.hp.com (Postfix) with ESMTPS id 81C2438134;
	Thu, 21 Feb 2013 05:48:39 +0000 (UTC)
Received: from G1W5784.americas.hpqcorp.net (16.193.26.2) by
	G2W4316.americas.hpqcorp.net (16.197.9.73) with Microsoft SMTP Server
	(TLS) id 14.2.328.9; Thu, 21 Feb 2013 05:47:04 +0000
Received: from G1W3646.americas.hpqcorp.net ([169.254.2.244]) by
	G1W5784.americas.hpqcorp.net ([16.193.26.2]) with mapi id
	14.02.0328.009; Thu, 21 Feb 2013 05:47:04 +0000
From: "V S, Nagendra (Nonstop Filesystems Team)" <nagendra.vs@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Thread-Topic: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Thread-Index: AQHOD/XkJN8jhHqONXf+h66ZX9yEJ5iDzJeg
Date: Thu, 21 Feb 2013 05:47:03 +0000
Message-ID: <FE47B30EBA7C6643A33452F19A2C6DDAA91B6A@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs
	.ucla.ed u> <006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
	<5125B332.2060303@HIDDEN>
In-Reply-To: <5125B332.2060303@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [16.193.232.20]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -4.8 (----)
X-Debbugs-Envelope-To: 10305
Cc: "bug-gnulib@HIDDEN" <bug-gnulib@HIDDEN>,
	Joachim Schmitz <jojo@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>,
	"10305 <at> debbugs.gnu.org" <10305 <at> debbugs.gnu.org>, "Schmitz, 
	Joachim" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -7.5 (-------)

PiBPbiAwNy8xOS8yMDEyIDExOjU1IFBNLCBWIFMsIE5hZ2VuZHJhIChOb25zdG9wIEZpbGVzeXN0
ZW1zIFRlYW0pIHdyb3RlOg0KPiA+IEZpbmQgdGhlIGVudGlyZSBwYXRjaCB3ZSB1c2UgYXR0YWNo
ZWQuDQo+IA0KPiBUaGFua3MsIGEgYnJpZWYgcmV2aWV3IG9mIHRoZSBwYXRjaCBzdWdnZXN0cyB0
aGF0IHRoZXJlIGlzIGVub3VnaCBtYXRlcmlhbCBpbg0KPiBpdCB0aGF0IHdlIHNob3VsZCBnZXQg
Y29weXJpZ2h0IHBhcGVycyBzaWduZWQgYmVmb3JlIHdlIGNhbiBpbmNvcnBvcmF0ZSBhbGwNCj4g
dGhvc2UgY2hhbmdlcyBpbiB0aGUgR05VIHZlcnNpb24uICBXb3VsZCB5b3UgbGlrZSB0byBkbyB0
aGF0Pw0KPiBJZiBzbywgcGxlYXNlIGxldCBtZSBrbm93LCBhbmQgSSdsbCBzdGFydCB0aGUgYmFs
bCByb2xsaW5nIHdpdGggdGhlIGNvcHlyaWdodCBjbGVyaw0KPiBvbiBvdXIgZW5kLg0KSSBoYXZl
IGFscmVhZHkgZ290IGluIHRvdWNoIHdpdGggdGhlIGNvcHlyaWdodCBjbGVyaywgRG9uYWxkIFIg
Um9iZXJ0c29uIElJSSAodmlhIFJUIDxjb3B5cmlnaHQtY2xlcmtAZnNmLm9yZz4pIGlzIGhlbHBp
bmcgdXMgd2l0aCByaWdodHMgYXNzaWdubWVudC4NCg0KIEkgaGF2ZSBhc2tlZCBvdXIgY29tcGFu
eSBhdHRvcm5leSBnbyB0aHJvdWdoIHRoZSByaWdodHMgZm9ybXMsIG9uY2UgaXQncyB0aHJvdWdo
IHRoZXJlIHJldmlldyBwcm9jZXNzIEkgd2lsbCBzZW5kIG91dCB0aGUgcmlnaHRzIGNvcHkuDQo=




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Feb 2013 05:41:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 21 00:41:24 2013
Received: from localhost ([127.0.0.1]:41126 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U8OuJ-0004uv-Mh
	for submit <at> debbugs.gnu.org; Thu, 21 Feb 2013 00:41:24 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:48171)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1U8OuE-0004ul-Vw
	for 10305 <at> debbugs.gnu.org; Thu, 21 Feb 2013 00:41:19 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id D81D539E8108;
	Wed, 20 Feb 2013 21:40:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 6BtXCvwNU6FH; Wed, 20 Feb 2013 21:40:03 -0800 (PST)
Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net
	[71.189.154.249])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 4DFD039E8100;
	Wed, 20 Feb 2013 21:40:03 -0800 (PST)
Message-ID: <5125B332.2060303@HIDDEN>
Date: Wed, 20 Feb 2013 21:40:02 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: "V S, Nagendra (Nonstop Filesystems Team)" <nagendra.vs@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
In-Reply-To: <FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 10305
Cc: "bug-gnulib@HIDDEN" <bug-gnulib@HIDDEN>,
	Joachim Schmitz <jojo@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>,
	"10305 <at> debbugs.gnu.org" <10305 <at> debbugs.gnu.org>, "Schmitz,
	Joachim" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

On 07/19/2012 11:55 PM, V S, Nagendra (Nonstop Filesystems Team) wrote:
> Find the entire patch we use attached.

Thanks, a brief review of the patch suggests that there
is enough material in it that we should get copyright papers
signed before we can incorporate all those changes
in the GNU version.  Would you like to do that?
If so, please let me know, and I'll start the ball rolling
with the copyright clerk on our end.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Feb 2013 08:09:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 20 03:09:13 2013
Received: from localhost ([127.0.0.1]:38532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U84jo-0007Ho-Rc
	for submit <at> debbugs.gnu.org; Wed, 20 Feb 2013 03:09:13 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:48969)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1U84jl-0007Hf-Ls
	for 10305 <at> debbugs.gnu.org; Wed, 20 Feb 2013 03:09:11 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 37509A60003;
	Wed, 20 Feb 2013 00:07:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id wT-mwMJO+b4b; Wed, 20 Feb 2013 00:07:58 -0800 (PST)
Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net
	[71.189.154.249])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 47E2339E8100;
	Wed, 20 Feb 2013 00:07:58 -0800 (PST)
Message-ID: <5124845D.4060507@HIDDEN>
Date: Wed, 20 Feb 2013 00:07:57 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: "V S, Nagendra (Nonstop Filesystems Team)" <nagendra.vs@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
In-Reply-To: <FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: "bug-gnulib@HIDDEN" <bug-gnulib@HIDDEN>,
	Joachim Schmitz <jojo@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>,
	"10305 <at> debbugs.gnu.org" <10305 <at> debbugs.gnu.org>, "Schmitz,
	Joachim" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.8 (----)

On 07/19/2012 11:55 PM, V S, Nagendra (Nonstop Filesystems Team) wrote:
> The coreutils config.hin no more defines any of RAW_DECL_* functions, which where present in 8.15.

Thanks, good catch.  I have pushed the following patch to gnulib to fix this;
it should appear in the next coreutils release.  I'll look into the other
NonStop issues later.

---
 ChangeLog             | 13 +++++++++++++
 lib/getcwd.c          |  2 +-
 m4/getcwd-path-max.m4 |  3 +++
 m4/getcwd.m4          |  2 +-
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6c50ff..a5b6b13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2013-02-19  Paul Eggert  <eggert@HIDDEN>
 
+	getcwd: support coreutils better
+	Like strtod, getcwd incorrectly referred to HAVE_RAW_DECL_GETCWD,
+	but this might not be correct in coreutils, which disables
+	the raw decl checks.  Problem reported by Nagendra in
+	<http://bugs.gnu.org/10305#192>.
+	* lib/getcwd.c (__getcwd): Do not depend on HAVE_RAW_DECL_GETCWD.
+	* m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
+	Test the getcwd function, not any macro, since getcwd.c wants the
+	function.
+	* m4/getcwd.m4 (gl_FUNC_GETCWD):
+	Don't define HAVE_MINIMALLY_WORKING_GETCWD if the code doesn't
+	compile, as might happen if there's a macro but no function.
+
 	strtod: support coreutils better
 	* lib/strtod.c (underlying_strtod): Just invoke the underlying strtod.
 	HAVE_RAW_DECL_STRTOD might not be correct in coreutils, which
diff --git a/lib/getcwd.c b/lib/getcwd.c
index 4b78138..f31c07e 100644
--- a/lib/getcwd.c
+++ b/lib/getcwd.c
@@ -135,7 +135,7 @@ __getcwd (char *buf, size_t size)
   size_t allocated = size;
   size_t used;
 
-#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD
+#if HAVE_MINIMALLY_WORKING_GETCWD
   /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
      this is much slower than the system getcwd (at least on
      GNU/Linux).  So trust the system getcwd's results unless they
diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4
index d30e1b3..0b03b66 100644
--- a/m4/getcwd-path-max.m4
+++ b/m4/getcwd-path-max.m4
@@ -52,6 +52,9 @@ AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX],
 # define is_ENAMETOOLONG(x) 0
 #endif
 
+/* Use the getcwd function, not any macro.  */
+#undef getcwd
+
 /* Don't get link errors because mkdir is redefined to rpl_mkdir.  */
 #undef mkdir
 
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index 93b3b86..6f91bd9 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -123,7 +123,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
   dnl Define HAVE_MINIMALLY_WORKING_GETCWD and HAVE_PARTLY_WORKING_GETCWD
   dnl if appropriate.
   case "$gl_cv_func_getcwd_path_max" in
-    "no, it has the AIX bug") ;;
+    "no"|"no, it has the AIX bug") ;;
     *)
       AC_DEFINE([HAVE_MINIMALLY_WORKING_GETCWD], [1],
         [Define to 1 if getcwd minimally works, that is, its result can be
-- 
1.7.11.7






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 20:33:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 15:33:49 2013
Received: from localhost ([127.0.0.1]:37418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7tsq-0006TW-Md
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 15:33:48 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:46639)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1U7tsl-0006TJ-SX
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 15:33:47 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 36F2339E8109;
	Tue, 19 Feb 2013 12:32:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id k8smDnjs79JQ; Tue, 19 Feb 2013 12:32:35 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id D6C3939E8108;
	Tue, 19 Feb 2013 12:32:35 -0800 (PST)
Message-ID: <5123E162.7000209@HIDDEN>
Date: Tue, 19 Feb 2013 12:32:34 -0800
From: Paul Eggert <eggert@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/20130110 Thunderbird/17.0.2
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN> <512367A0.4040506@HIDDEN>
	<5123A780.2020501@HIDDEN> <5123AC30.2050504@HIDDEN>
In-Reply-To: <5123AC30.2050504@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 02/19/13 08:45, P=C3=A1draig Brady wrote:

> I might defer the _Noreturn change so,
> to one that depends on stdnoreturn

stdnoreturn isn't suited for projects that
want to port to MSVC, unfortunately.
(Does coreutils want to port to MSVC?  I've forgotten.)





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 16:46:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 11:46:51 2013
Received: from localhost ([127.0.0.1]:37135 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7qLD-0007SN-Kc
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 11:46:51 -0500
Received: from mx1.redhat.com ([209.132.183.28]:14196)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <P@HIDDEN>) id 1U7qLA-0007SF-0w
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 11:46:49 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1JGjdqT025388
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 19 Feb 2013 11:45:39 -0500
Received: from [10.36.116.71] (ovpn-116-71.ams2.redhat.com [10.36.116.71])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id r1JGjaWW025027
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 19 Feb 2013 11:45:38 -0500
Message-ID: <5123AC30.2050504@HIDDEN>
Date: Tue, 19 Feb 2013 16:45:36 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN> <512367A0.4040506@HIDDEN>
	<5123A780.2020501@HIDDEN>
In-Reply-To: <5123A780.2020501@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	r1JGjdqT025388
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

On 02/19/2013 04:25 PM, Paul Eggert wrote:
> _Noreturn is typically put before the return type, e.g.,:
>
> static _Noreturn void randread_error (void const *);
>
> rather than putting the _Noreturn after the 'void',
> or after the ')'.
>
> C11 does not allow putting _Noreturn after the ')',
> if I'm reading the spec correctly.

Oops, right.
I might defer the _Noreturn change so,
to one that depends on stdnoreturn
and then does:

#include <stdnoreturn.h>
...
noreturn ...

cheers,
P=C3=A1draig.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 16:26:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 11:26:50 2013
Received: from localhost ([127.0.0.1]:37112 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7q1n-0006yB-CK
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 11:26:49 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:59399)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1U7q1k-0006y1-LI
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 11:26:46 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id AEB0F39E8109;
	Tue, 19 Feb 2013 08:25:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id Kxj9DsuBwU5c; Tue, 19 Feb 2013 08:25:36 -0800 (PST)
Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net
	[71.189.154.249])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DE12A39E8108;
	Tue, 19 Feb 2013 08:25:36 -0800 (PST)
Message-ID: <5123A780.2020501@HIDDEN>
Date: Tue, 19 Feb 2013 08:25:36 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN> <512367A0.4040506@HIDDEN>
In-Reply-To: <512367A0.4040506@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

_Noreturn is typically put before the return type, e.g.,:

static _Noreturn void randread_error (void const *);

rather than putting the _Noreturn after the 'void',
or after the ')'.

C11 does not allow putting _Noreturn after the ')',
if I'm reading the spec correctly.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 12:26:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 07:26:58 2013
Received: from localhost ([127.0.0.1]:36113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7mHi-0008OG-FK
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 07:26:58 -0500
Received: from mx1.redhat.com ([209.132.183.28]:46542)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <P@HIDDEN>) id 1U7mHf-0008O7-3M
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 07:26:57 -0500
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1JCPmxR010096
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 19 Feb 2013 07:25:48 -0500
Received: from [10.36.116.71] (ovpn-116-71.ams2.redhat.com [10.36.116.71])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id r1JCPksQ003282
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 19 Feb 2013 07:25:47 -0500
Message-ID: <51236F49.5020506@HIDDEN>
Date: Tue, 19 Feb 2013 12:25:45 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN> <512367A0.4040506@HIDDEN>
	<009501ce0e9a$1968bcd0$4c3a3670$@schmitz-digital.de>
In-Reply-To: <009501ce0e9a$1968bcd0$4c3a3670$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	r1JCPmxR010096
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

On 02/19/2013 12:10 PM, Joachim Schmitz wrote:
> You seem to have missed one change, unless I'm missing something? This =
is your patch:
>
> diff --git a/src/chroot.c b/src/chroot.c
> index 1c1a976..bb45825 100644
> --- a/src/chroot.c
> +++ b/src/chroot.c
> @@ -57,7 +57,7 @@ static struct option const long_opts[] =3D
>      always-successful replacement to avoid checking for setgroups
>      availability everywhere, just to support broken platforms. */
>   static int
> -setgroups (size_t size ATTRIBUTE_UNUSED, gid_t const *list ATTRIBUTE_U=
NUSED)
> +setgroups (size_t size _GL_UNUSED, gid_t const *list ATTRIBUTE_UNUSED)

Good catch!
My sed was missing a /g
and that function was excluded from my compile.

thanks!
P=C3=A1draig.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 12:11:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 07:11:41 2013
Received: from localhost ([127.0.0.1]:36105 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7m2s-00082S-IO
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 07:11:41 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:57357)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1U7m2p-00082J-IO
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 07:11:36 -0500
Received: from DualCore (dsdf-4db50f91.pool.mediaWays.net [77.181.15.145])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LwEHK-1UwxtV2gUY-018N4b; Tue, 19 Feb 2013 13:10:27 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: =?utf-8?Q?'P=C3=A1draig_Brady'?= <P@HIDDEN>
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN> <512367A0.4040506@HIDDEN>
In-Reply-To: <512367A0.4040506@HIDDEN>
Subject: RE: bug#10305: coreutils-8.21, some changes needed
Date: Tue, 19 Feb 2013 13:10:24 +0100
Message-ID: <009501ce0e9a$1968bcd0$4c3a3670$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQCbOCKLJ75e8O4XBo6hVJMZ44BXUwGasJ5qAgP/sQ+aycspsA==
Content-Language: de
X-Provags-ID: V02:K0:YGnpLwvLgtL/uFvRaSy3PjH9+tJoByms4npSpJ6D+75
	61xLOogZwvT4q5X/mKZB42zadnJeNe58KFV8tWf2p5mXDRLTer
	4vrSSmrpuGkqumsmxbXwZIlWAVlKMLuTbe27fX3TWFyb3FTQP/
	VdZl6l0+9r9cvHiM2gkTV8eSS+7bnQE4Z8jYPXBDWgFpA25/aq
	Fq/V0QhauYO/05lk1HBkdr7FGplX/zNQrmaI6UZUZv2kC6hfXw
	5RXe+r3kWPNRL/CrqopiuzdL7xqubTZCuY+z9baeZ29BLta41V
	I28HM/hmOBh0c/e89zF+g6/FrKXzqKlwEehI6v6yTvauwmaA2e
	ZIqf3Gzgddi++YF9z4MadsgnQ3aaK4Px2wcdFpNKr1gD7B2aPp
	JjNMiLAltFlYg==
X-Spam-Score: -0.5 (/)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> -----Original Message-----
> From: P=C3=A1draig Brady [mailto:P@HIDDEN]
> Sent: Tuesday, February 19, 2013 12:53 PM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org
> Subject: Re: bug#10305: coreutils-8.21, some changes needed
>=20
> >>> diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
> >>> -__attribute ((pure))
> >>> +__attribute__ ((pure))
> >
> > Oops. I'll fix this up with a more extensive patch in coreutils.
>=20
> 3 patches attached.

Thanks. Of course the 3rd patch works for me, I've tested the first =
patch and that is fine too. Haven't yet checked the (quite big) 2nd =
patch though.

You seem to have missed one change, unless I'm missing something? This =
is your patch:

diff --git a/src/chroot.c b/src/chroot.c
index 1c1a976..bb45825 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -57,7 +57,7 @@ static struct option const long_opts[] =3D
    always-successful replacement to avoid checking for setgroups
    availability everywhere, just to support broken platforms. */
 static int
-setgroups (size_t size ATTRIBUTE_UNUSED, gid_t const *list =
ATTRIBUTE_UNUSED)
+setgroups (size_t size _GL_UNUSED, gid_t const *list ATTRIBUTE_UNUSED)
 {
   return 0;
 }


Guess it should be this instead:

diff --git a/src/chroot.c b/src/chroot.c
index 1c1a976..bb45825 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -57,7 +57,7 @@ static struct option const long_opts[] =3D
    always-successful replacement to avoid checking for setgroups
    availability everywhere, just to support broken platforms. */
 static int
-setgroups (size_t size ATTRIBUTE_UNUSED, gid_t const *list =
ATTRIBUTE_UNUSED)
+setgroups (size_t size _GL_UNUSED, gid_t const *list _GL_UNUSED)
 {
   return 0;
 }


Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 11:54:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 06:54:22 2013
Received: from localhost ([127.0.0.1]:36097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7lm8-0007fR-DZ
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 06:54:21 -0500
Received: from mx1.redhat.com ([209.132.183.28]:16033)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <P@HIDDEN>) id 1U7lm2-0007fG-T4
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 06:54:17 -0500
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
	(int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1JBr8sX024333
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 19 Feb 2013 06:53:08 -0500
Received: from [10.36.116.71] (ovpn-116-71.ams2.redhat.com [10.36.116.71])
	by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id r1JBr5vJ024355
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 19 Feb 2013 06:53:07 -0500
Message-ID: <512367A0.4040506@HIDDEN>
Date: Tue, 19 Feb 2013 11:53:04 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN>
In-Reply-To: <512353D5.5060601@HIDDEN>
Content-Type: multipart/mixed; boundary="------------070009030607080900030906"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

This is a multi-part message in MIME format.
--------------070009030607080900030906
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r1JBr8sX024333

>>> diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
>>> -__attribute ((pure))
>>> +__attribute__ ((pure))
>
> Oops. I'll fix this up with a more extensive patch in coreutils.

3 patches attached.

thanks,
P=C3=A1draig.

--------------070009030607080900030906
Content-Type: text/x-patch;
 name="coreutils-nonstop.diff"
Content-Disposition: attachment;
 filename="coreutils-nonstop.diff"
Content-Transfer-Encoding: 7bit

From 8ebe5ae503a0f6955456bc94dc9c771cc579d533 Mon Sep 17 00:00:00 2001
From: Joachim Schmitz <jojo@HIDDEN>
Date: Tue, 19 Feb 2013 11:09:44 +0000
Subject: [PATCH 1/3] build: fix numfmt build error on compilers without
 __attribute

* src/numfmt.c (): Use the more standard _GL_ATTRIBUTE_PURE
which is elided where required.
Reported in http://bugs.gnu.org/10305
---
 src/numfmt.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/numfmt.c b/src/numfmt.c
index 8c21c2b..f689a97 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -1194,8 +1194,7 @@ process_suffixed_number (char *text, long double *result, size_t *precision)
 /* Skip the requested number of fields in the input string.
    Returns a pointer to the *delimiter* of the requested field,
    or a pointer to NUL (if reached the end of the string).  */
-static inline char *
-__attribute ((pure))
+static inline char * _GL_ATTRIBUTE_PURE
 skip_fields (char *buf, int fields)
 {
   char *ptr = buf;
-- 
1.7.7.6


From 43cdfc6863831fdeea76718d7d759de2893d650f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@HIDDEN>
Date: Tue, 19 Feb 2013 10:58:51 +0000
Subject: [PATCH 2/3] maint: cleaup up various uses of __attribute__

* src/cfg.mk (sc_prohibit-gl-attributes): Disallow the __attribute()
form without trailing underscores as that is not elided where required.
Also ensure we use gnulib macros rather than defining our own.
* src/system.h: Remove gnulib provided macros.
* gl/lib/randread.c: Use gnulib provided macros.
* src/chown-core.c: Likewise.
* src/chroot.c: Likewise.
* src/copy.c: Likewise.
* src/csplit.c: Likewise.
* src/dd.c: Likewise.
* src/expr.c: Likewise.
* src/extent-scan.c: Likewise.
* src/factor.c: Likewise.
* src/ls.c: Likewise.
* src/od.c: Likewise.
* src/paste.c: Likewise.
* src/ptx.c: Likewise.
* src/sort.c: Likewise.
* src/stat.c: Likewise.
* src/stty.c: Likewise.
* src/system.h: Likewise.
* src/tac.c: Likewise.
* src/test.c: Likewise.
* src/tsort.c: Likewise.
---
 cfg.mk            |   10 ++++++++++
 gl/lib/randread.c |   12 +-----------
 src/chown-core.c  |    2 +-
 src/chroot.c      |    2 +-
 src/copy.c        |   20 ++++++++++----------
 src/csplit.c      |    6 +++---
 src/dd.c          |    2 +-
 src/expr.c        |    4 ++--
 src/extent-scan.c |    2 +-
 src/factor.c      |   14 +++++++-------
 src/ls.c          |    2 +-
 src/od.c          |   10 +++++-----
 src/paste.c       |    2 +-
 src/ptx.c         |    2 +-
 src/sort.c        |    6 +++---
 src/stat.c        |    2 +-
 src/stty.c        |    2 +-
 src/system.h      |   10 +---------
 src/tac.c         |    2 +-
 src/test.c        |    4 ++--
 src/tsort.c       |    2 +-
 21 files changed, 55 insertions(+), 63 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index c9952d2..4ee3809 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -201,6 +201,16 @@ sc_prohibit-j-printf-format:
 	  && { echo '$(ME): Use PRI*MAX instead of %j' 1>&2; exit 1; }  \
 	  || :
 
+# Ensure the alternative __attribute (keyword) form isn't used as
+# that form is not elided where required.  Also ensure that we don't
+# directly use attributes already defined by gnulib.
+# TODO: move the check for _GL... attributes to gnulib.
+sc_prohibit-gl-attributes:
+	@cd $(srcdir) && GIT_PAGER= git grep -En			\
+	    "__attribute |__(noreturn|unused|pure|const)__" src gl/lib/*.[ch] \
+	  && { echo '$(ME): Use _GL... attribute macros' 1>&2; exit 1; }  \
+	  || :
+
 # Look for lines longer than 80 characters, except omit:
 # - program-generated long lines in diff headers,
 # - tests involving long checksum lines, and
diff --git a/gl/lib/randread.c b/gl/lib/randread.c
index dfba611..9e272ec 100644
--- a/gl/lib/randread.c
+++ b/gl/lib/randread.c
@@ -46,16 +46,6 @@
 #include "unlocked-io.h"
 #include "xalloc.h"
 
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#  define __attribute__(x) /* empty */
-# endif
-#endif
-
-#ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif
-
 #ifndef MIN
 # define MIN(a, b) ((a) < (b) ? (a) : (b))
 #endif
@@ -120,7 +110,7 @@ struct randread_source
 
 /* The default error handler.  */
 
-static void ATTRIBUTE_NORETURN
+static void _Noreturn
 randread_error (void const *file_name)
 {
   if (file_name)
diff --git a/src/chown-core.c b/src/chown-core.c
index 3a3044e..a5a2b47 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -68,7 +68,7 @@ chopt_init (struct Chown_option *chopt)
 }
 
 extern void
-chopt_free (struct Chown_option *chopt ATTRIBUTE_UNUSED)
+chopt_free (struct Chown_option *chopt _GL_UNUSED)
 {
   /* Deliberately do not free chopt->user_name or ->group_name.
      They're not always allocated.  */
diff --git a/src/chroot.c b/src/chroot.c
index 1c1a976..bb45825 100644
--- a/src/chroot.c
+++ b/src/chroot.c
@@ -57,7 +57,7 @@ static struct option const long_opts[] =
    always-successful replacement to avoid checking for setgroups
    availability everywhere, just to support broken platforms. */
 static int
-setgroups (size_t size ATTRIBUTE_UNUSED, gid_t const *list ATTRIBUTE_UNUSED)
+setgroups (size_t size _GL_UNUSED, gid_t const *list ATTRIBUTE_UNUSED)
 {
   return 0;
 }
diff --git a/src/copy.c b/src/copy.c
index 3f2cc2b..244313e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -471,7 +471,7 @@ errno_unsupported (int err)
 
 #if USE_XATTR
 static void
-copy_attr_error (struct error_context *ctx ATTRIBUTE_UNUSED,
+copy_attr_error (struct error_context *ctx _GL_UNUSED,
                  char const *fmt, ...)
 {
   if (!errno_unsupported (errno))
@@ -487,7 +487,7 @@ copy_attr_error (struct error_context *ctx ATTRIBUTE_UNUSED,
 }
 
 static void
-copy_attr_allerror (struct error_context *ctx ATTRIBUTE_UNUSED,
+copy_attr_allerror (struct error_context *ctx _GL_UNUSED,
                  char const *fmt, ...)
 {
   int err = errno;
@@ -500,14 +500,14 @@ copy_attr_allerror (struct error_context *ctx ATTRIBUTE_UNUSED,
 }
 
 static char const *
-copy_attr_quote (struct error_context *ctx ATTRIBUTE_UNUSED, char const *str)
+copy_attr_quote (struct error_context *ctx _GL_UNUSED, char const *str)
 {
   return quote (str);
 }
 
 static void
-copy_attr_free (struct error_context *ctx ATTRIBUTE_UNUSED,
-                char const *str ATTRIBUTE_UNUSED)
+copy_attr_free (struct error_context *ctx _GL_UNUSED,
+                char const *str _GL_UNUSED)
 {
 }
 
@@ -539,11 +539,11 @@ copy_attr (char const *src_path, int src_fd,
 #else /* USE_XATTR */
 
 static bool
-copy_attr (char const *src_path ATTRIBUTE_UNUSED,
-           int src_fd ATTRIBUTE_UNUSED,
-           char const *dst_path ATTRIBUTE_UNUSED,
-           int dst_fd ATTRIBUTE_UNUSED,
-           struct cp_options const *x ATTRIBUTE_UNUSED)
+copy_attr (char const *src_path _GL_UNUSED,
+           int src_fd _GL_UNUSED,
+           char const *dst_path _GL_UNUSED,
+           int dst_fd _GL_UNUSED,
+           struct cp_options const *x _GL_UNUSED)
 {
   return true;
 }
diff --git a/src/csplit.c b/src/csplit.c
index 22f3ad4..86d1b28 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -205,7 +205,7 @@ cleanup (void)
   sigprocmask (SIG_SETMASK, &oldset, NULL);
 }
 
-static void cleanup_fatal (void) ATTRIBUTE_NORETURN;
+static void cleanup_fatal (void) _Noreturn;
 static void
 cleanup_fatal (void)
 {
@@ -691,7 +691,7 @@ dump_rest_of_file (void)
    on iteration REPETITION if nonzero. */
 
 static void handle_line_error (const struct control *, uintmax_t)
-     ATTRIBUTE_NORETURN;
+     _Noreturn;
 static void
 handle_line_error (const struct control *p, uintmax_t repetition)
 {
@@ -739,7 +739,7 @@ process_line_count (const struct control *p, uintmax_t repetition)
     handle_line_error (p, repetition);
 }
 
-static void regexp_error (struct control *, uintmax_t, bool) ATTRIBUTE_NORETURN;
+static void regexp_error (struct control *, uintmax_t, bool) _Noreturn;
 static void
 regexp_error (struct control *p, uintmax_t repetition, bool ignore)
 {
diff --git a/src/dd.c b/src/dd.c
index c98e578..ff401f8 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -852,7 +852,7 @@ process_signals (void)
     }
 }
 
-static void ATTRIBUTE_NORETURN
+static void _Noreturn
 quit (int code)
 {
   cleanup ();
diff --git a/src/expr.c b/src/expr.c
index b4fa808..dbbac79 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -44,7 +44,7 @@
    int, the widest unsigned type that GMP supports.  */
 verify (SIZE_MAX <= ULONG_MAX);
 
-static void integer_overflow (char) ATTRIBUTE_NORETURN;
+static void integer_overflow (char) _Noreturn;
 
 #ifndef HAVE_GMP
 # define HAVE_GMP 0
@@ -287,7 +287,7 @@ integer_overflow (char op)
 }
 
 static void die (int errno_val, char const *msg)
-  ATTRIBUTE_NORETURN;
+  _Noreturn;
 static void
 die (int errno_val, char const *msg)
 {
diff --git a/src/extent-scan.c b/src/extent-scan.c
index 5d25b9a..6d3032a7 100644
--- a/src/extent-scan.c
+++ b/src/extent-scan.c
@@ -218,7 +218,7 @@ extent_scan_read (struct extent_scan *scan)
 }
 #else
 extern bool
-extent_scan_read (struct extent_scan *scan ATTRIBUTE_UNUSED)
+extent_scan_read (struct extent_scan *scan _GL_UNUSED)
 {
   scan->initial_scan_failed = true;
   errno = ENOTSUP;
diff --git a/src/factor.c b/src/factor.c
index 8f1542a..257a7ed 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -791,7 +791,7 @@ factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0,
     {
       for (;;)
         {
-          uintmax_t q1, q0, hi, lo ATTRIBUTE_UNUSED;
+          uintmax_t q1, q0, hi, lo _GL_UNUSED;
 
           q0 = t0 * primes_dtab[i].binv;
           umul_ppmm (hi, lo, q0, p);
@@ -933,7 +933,7 @@ static const unsigned char  binvert_table[128] =
     _q0 = (u0) * _di;                                                   \
     if ((u1) >= (d))                                                    \
       {                                                                 \
-        uintmax_t _p1, _p0 ATTRIBUTE_UNUSED;                            \
+        uintmax_t _p1, _p0 _GL_UNUSED;                            \
         umul_ppmm (_p1, _p0, _q0, d);                                   \
         (q1) = ((u1) - _p1) * _di;                                      \
         (q0) = _q0;                                                     \
@@ -948,7 +948,7 @@ static const unsigned char  binvert_table[128] =
 /* x B (mod n). */
 #define redcify(r_prim, r, n)                                           \
   do {                                                                  \
-    uintmax_t _redcify_q ATTRIBUTE_UNUSED;                              \
+    uintmax_t _redcify_q _GL_UNUSED;                              \
     udiv_qrnnd (_redcify_q, r_prim, r, 0, n);                           \
   } while (0)
 
@@ -981,7 +981,7 @@ static const unsigned char  binvert_table[128] =
 static inline uintmax_t
 mulredc (uintmax_t a, uintmax_t b, uintmax_t m, uintmax_t mi)
 {
-  uintmax_t rh, rl, q, th, tl ATTRIBUTE_UNUSED, xh;
+  uintmax_t rh, rl, q, th, tl _GL_UNUSED, xh;
 
   umul_ppmm (rh, rl, a, b);
   q = rl * mi;
@@ -1001,7 +1001,7 @@ mulredc2 (uintmax_t *r1p,
           uintmax_t a1, uintmax_t a0, uintmax_t b1, uintmax_t b0,
           uintmax_t m1, uintmax_t m0, uintmax_t mi)
 {
-  uintmax_t r1, r0, q, p1, p0 ATTRIBUTE_UNUSED, t1, t0, s1, s0;
+  uintmax_t r1, r0, q, p1, p0 _GL_UNUSED, t1, t0, s1, s0;
   mi = -mi;
   assert ( (a1 >> (W_TYPE_SIZE - 1)) == 0);
   assert ( (b1 >> (W_TYPE_SIZE - 1)) == 0);
@@ -1271,7 +1271,7 @@ prime_p (uintmax_t n)
           a_prim = s0 % n;
         else
           {
-            uintmax_t dummy ATTRIBUTE_UNUSED;
+            uintmax_t dummy _GL_UNUSED;
             udiv_qrnnd (dummy, a_prim, s1, s0, n);
           }
       }
@@ -1803,7 +1803,7 @@ isqrt2 (uintmax_t nh, uintmax_t nl)
   /* Do we need more than one iteration? */
   for (;;)
     {
-      uintmax_t r ATTRIBUTE_UNUSED;
+      uintmax_t r _GL_UNUSED;
       uintmax_t q, y;
       udiv_qrnnd (q, r, nh, nl, x);
       y = (x + q) / 2;
diff --git a/src/ls.c b/src/ls.c
index f1ed43b..d9876f8 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2734,7 +2734,7 @@ has_capability (char const *name)
 }
 #else
 static bool
-has_capability (char const *name ATTRIBUTE_UNUSED)
+has_capability (char const *name _GL_UNUSED)
 {
   errno = ENOTSUP;
   return false;
diff --git a/src/od.c b/src/od.c
index ffccd74..e7d881b 100644
--- a/src/od.c
+++ b/src/od.c
@@ -416,7 +416,7 @@ N (size_t fields, size_t blank, void const *block,                      \
   PRINT_FIELDS (N, T, fmt_string, xprintf (fmt_string, adjusted_width, x))
 
 #define PRINT_FLOATTYPE(N, T, FTOASTR, BUFSIZE)                         \
-  PRINT_FIELDS (N, T, fmt_string ATTRIBUTE_UNUSED,                      \
+  PRINT_FIELDS (N, T, fmt_string _GL_UNUSED,                      \
                 char buf[BUFSIZE];                                      \
                 FTOASTR (buf, sizeof buf, 0, 0, x);                     \
                 xprintf ("%*s", adjusted_width, buf))
@@ -452,7 +452,7 @@ dump_hexl_mode_trailer (size_t n_bytes, const char *block)
 
 static void
 print_named_ascii (size_t fields, size_t blank, void const *block,
-                   const char *unused_fmt_string ATTRIBUTE_UNUSED,
+                   const char *unused_fmt_string _GL_UNUSED,
                    int width, int pad)
 {
   unsigned char const *p = block;
@@ -483,7 +483,7 @@ print_named_ascii (size_t fields, size_t blank, void const *block,
 
 static void
 print_ascii (size_t fields, size_t blank, void const *block,
-             const char *unused_fmt_string ATTRIBUTE_UNUSED, int width,
+             const char *unused_fmt_string _GL_UNUSED, int width,
              int pad)
 {
   unsigned char const *p = block;
@@ -1056,8 +1056,8 @@ skip (uintmax_t n_skip)
 }
 
 static void
-format_address_none (uintmax_t address ATTRIBUTE_UNUSED,
-                     char c ATTRIBUTE_UNUSED)
+format_address_none (uintmax_t address _GL_UNUSED,
+                     char c _GL_UNUSED)
 {
 }
 
diff --git a/src/paste.c b/src/paste.c
index bc9fa76..91fa5b8 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -153,7 +153,7 @@ collapse_escapes (char const *strptr)
 
 /* Report a write error and exit.  */
 
-static void write_error (void) ATTRIBUTE_NORETURN;
+static void write_error (void) _Noreturn;
 static void
 write_error (void)
 {
diff --git a/src/ptx.c b/src/ptx.c
index f993673..29d8417 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -277,7 +277,7 @@ static BLOCK reference;		/* reference field for input reference mode */
 
 /* Diagnose an error in the regular expression matcher.  Then exit.  */
 
-static void ATTRIBUTE_NORETURN
+static void _Noreturn
 matcher_error (void)
 {
   error (0, errno, _("error in regular expression matcher"));
diff --git a/src/sort.c b/src/sort.c
index 7410abc..aceb713 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -376,7 +376,7 @@ static unsigned int nmerge = NMERGE_DEFAULT;
 /* Report MESSAGE for FILE, then clean up and exit.
    If FILE is null, it represents standard output.  */
 
-static void die (char const *, char const *) ATTRIBUTE_NORETURN;
+static void die (char const *, char const *) _Noreturn;
 static void
 die (char const *message, char const *file)
 {
@@ -3969,7 +3969,7 @@ insertkey (struct keyfield *key_arg)
 /* Report a bad field specification SPEC, with extra info MSGID.  */
 
 static void badfieldspec (char const *, char const *)
-     ATTRIBUTE_NORETURN;
+     _Noreturn;
 static void
 badfieldspec (char const *spec, char const *msgid)
 {
@@ -3980,7 +3980,7 @@ badfieldspec (char const *spec, char const *msgid)
 
 /* Report incompatible options.  */
 
-static void incompatible_options (char const *) ATTRIBUTE_NORETURN;
+static void incompatible_options (char const *) _Noreturn;
 static void
 incompatible_options (char const *opts)
 {
diff --git a/src/stat.c b/src/stat.c
index dd210d1..2326698 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -583,7 +583,7 @@ out_minus_zero (char *pformat, size_t prefix_len)
    acts like printf's %f format.  */
 static void
 out_epoch_sec (char *pformat, size_t prefix_len,
-               struct stat const *statbuf ATTRIBUTE_UNUSED,
+               struct stat const *statbuf _GL_UNUSED,
                struct timespec arg)
 {
   char *dot = memchr (pformat, '.', prefix_len);
diff --git a/src/stty.c b/src/stty.c
index ee891a5..e518839 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -745,7 +745,7 @@ main (int argc, char **argv)
   int argi = 0;
   int opti = 1;
   bool require_set_attr;
-  bool speed_was_set ATTRIBUTE_UNUSED;
+  bool speed_was_set _GL_UNUSED;
   bool verbose_output;
   bool recoverable_output;
   int k;
diff --git a/src/system.h b/src/system.h
index 1677999..31f1c5a 100644
--- a/src/system.h
+++ b/src/system.h
@@ -421,14 +421,6 @@ enum
 # endif
 #endif
 
-#ifndef ATTRIBUTE_NORETURN
-# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif
-
-#ifndef ATTRIBUTE_UNUSED
-# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif
-
 /* The warn_unused_result attribute appeared first in gcc-3.4.0 */
 #undef ATTRIBUTE_WARN_UNUSED_RESULT
 #if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
@@ -620,7 +612,7 @@ usable_st_size (struct stat const *sb)
           || S_TYPEISSHM (sb) || S_TYPEISTMO (sb));
 }
 
-void usage (int status) ATTRIBUTE_NORETURN;
+void usage (int status) _Noreturn;
 
 #define emit_cycle_warning(file_name)	\
   do					\
diff --git a/src/tac.c b/src/tac.c
index c6a8cf6..5bf40a7 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -409,7 +409,7 @@ record_or_unlink_tempfile (char const *fn, FILE *fp)
 #else
 
 static void
-record_or_unlink_tempfile (char const *fn, FILE *fp ATTRIBUTE_UNUSED)
+record_or_unlink_tempfile (char const *fn, FILE *fp _GL_UNUSED)
 {
   unlink (fn);
 }
diff --git a/src/test.c b/src/test.c
index 2038209..72ddbd0 100644
--- a/src/test.c
+++ b/src/test.c
@@ -80,8 +80,8 @@ static bool and (void);
 static bool or (void);
 
 static void test_syntax_error (char const *format, char const *arg)
-     ATTRIBUTE_NORETURN;
-static void beyond (void) ATTRIBUTE_NORETURN;
+     _Noreturn;
+static void beyond (void) _Noreturn;
 
 static void
 test_syntax_error (char const *format, char const *arg)
diff --git a/src/tsort.c b/src/tsort.c
index d22f1f0..93ff894 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -280,7 +280,7 @@ record_relation (struct item *j, struct item *k)
 }
 
 static bool
-count_items (struct item *unused ATTRIBUTE_UNUSED)
+count_items (struct item *unused _GL_UNUSED)
 {
   n_strings++;
   return false;
-- 
1.7.7.6


From 9df5bc69bade3b36de0bd136979177c94ca37ec7 Mon Sep 17 00:00:00 2001
From: Joachim Schmitz <jojo@HIDDEN>
Date: Tue, 19 Feb 2013 11:36:57 +0000
Subject: [PATCH 3/3] copy: ensure the correct root ID is checked on all
 platforms

* src/copy.c (copy_reg): Check ROOT_UID rather than 0 which is
significant on HP-NonStop.
---
 src/copy.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/copy.c b/src/copy.c
index 244313e..5c0ee1e 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -51,6 +51,7 @@
 #include "ignore-value.h"
 #include "ioblksize.h"
 #include "quote.h"
+#include "root-uid.h"
 #include "same.h"
 #include "savedir.h"
 #include "stat-size.h"
@@ -1127,7 +1128,7 @@ preserve_metadata:
     {
       bool access_changed = false;
 
-      if (!(sb.st_mode & S_IWUSR) && geteuid () != 0)
+      if (!(sb.st_mode & S_IWUSR) && geteuid () != ROOT_UID)
         access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0;
 
       if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)
@@ -2718,7 +2719,7 @@ cp_options_default (struct cp_options *x)
     priv_freeset (pset);
   }
 #else
-  x->chown_privileges = x->owner_privileges = (geteuid () == 0);
+  x->chown_privileges = x->owner_privileges = (geteuid () == ROOT_UID);
 #endif
 }
 
-- 
1.7.7.6


--------------070009030607080900030906--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 10:55:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 05:55:18 2013
Received: from localhost ([127.0.0.1]:36074 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7kr0-0005QB-18
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 05:55:18 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:64886)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1U7kqv-0005Q1-RV
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 05:55:16 -0500
Received: from DualCore (dsdf-4db50f91.pool.mediaWays.net [77.181.15.145])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0LmAly-1UgXcc14lO-00Zv02; Tue, 19 Feb 2013 11:54:05 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: =?utf-8?Q?'P=C3=A1draig_Brady'?= <P@HIDDEN>
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
	<512353D5.5060601@HIDDEN>
In-Reply-To: <512353D5.5060601@HIDDEN>
Subject: RE: bug#10305: coreutils-8.21, some changes needed
Date: Tue, 19 Feb 2013 11:54:00 +0100
Message-ID: <008601ce0e8f$6dec7bd0$49c57370$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQCbOCKLJ75e8O4XBo6hVJMZ44BXUwGasJ5qmtnVyZA=
Content-Language: de
X-Provags-ID: V02:K0:oJ7jMMRZA+ljyAZ9rT0Qm1xqcAR3VMLGALSWuaz/Zmr
	hDI0Wv2seZpQQ1Z4JLOl2HpCDQ1d/5Nowj/3ngPsYFNpoG881Y
	QfNge+tMZ6CEVXtaigHxvVjwG9EriHK5DsCeiRZY+5Rn5Zjnj6
	9ORwZpufc21ggC5yQFJo5BRQjR5AP5QqJNc3oWC/RMDLa1nPig
	8dW6HWqEfV5gugrvPnBrTyeXrS22rsdTeGE6UNf4OMI8qr3CII
	lCRvfS3YRWwIpX9q1v5ppHBluVb7FJgBtWT74rnSh3u4G8x8Qn
	oJGRVJDdE2RocLx82AFYwBE8pDkeBi7ECUTlvPBsM1h/By/5z5
	TjMi3x1f76tGQpQBk2AeBG23gc4v7QDSvEia0SjXEkjWGYgQ0k
	fe9toGF6T4SCg==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: P=C3=A1draig Brady [mailto:P@HIDDEN]
> Sent: Tuesday, February 19, 2013 11:29 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.21, some changes needed
>=20
> On 02/19/2013 09:08 AM, Joachim Schmitz wrote:
> >> -----Original Message-----
> >> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> >> Sent: Tuesday, February 19, 2013 9:18 AM
> >> To: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'
> >> Subject: coreutils-8.21, some changes needed
> >>
> >> Hi folks
> >>
> >> In an attempt to port coreutils 8.21 to HP-NonStop I stumbled =
accross a couple problems, here are my fixes to them:
> >>
> >> Here another file needs to get adjusted to using the new root-uid.h
> >>
> >> diff -EBbu ./src/copy.c.orig ./src/copy.c
> >> --- ./src/copy.c.orig   2013-02-07 03:37:05 -0600
> >> +++ ./src/copy.c        2013-02-18 09:29:22 -0600
> >> @@ -51,6 +51,7 @@
> >>   #include "ignore-value.h"
> >>   #include "ioblksize.h"
> >>   #include "quote.h"
> >> +#include "root-uid.h"
> >>   #include "same.h"
> >>   #include "savedir.h"
> >>   #include "stat-size.h"
> >> @@ -1127,7 +1128,7 @@
> >>       {
> >>         bool access_changed =3D false;
> >>
> >> -      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D 0)
> >> +      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D ROOT_UID)
> >>           access_changed =3D fchmod_or_lchmod (dest_desc, dst_name, =
0600) =3D=3D 0;
> >>
> >>         if (!copy_attr (src_name, source_desc, dst_name, dest_desc, =
x)
> >> @@ -2718,7 +2719,7 @@
> >>       priv_freeset (pset);
> >>     }
> >>   #else
> >> -  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =
=3D=3D 0);
> >> +  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =
=3D=3D ROOT_UID);
> >>   #endif
> >>   }
>=20
> I'll apply this in your name.

Thanks

> >> On HP-NonStop we use  0x80000000 instead of -1 for getuid(), =
getgid() and friends to indicate NO_UID rsp. NO_GID
> >> Guess that difference could go into gnulibs root-uid.h?

Additional info, here's what the manual says:

     RETURN VALUES
          The getuid() function returns the requested user ID. It is
          always successful.

          When the authentication information for a process is
          uninitialized, the "uninitialized" user ID (hexadecimal
          80000000) is returned.

So it not exactly NO_UID, but close enough?=20
(and similar for getgid().
=20
> You could wrap get[gu]id() to return -1 in that case,
> or alternatively define NO_UID and NO_GID in root-uid.h
> and use that everywhere. Probably the easiest approach
> for coreutils at least since it already users NO_GID since:
> http://bugs.gnu.org/10021

That's why I think it to be best suited there

> Though I note that root-uid.h would be an inaccurate
> name if we did that.

Well, yes, but does this matter a lot? It is about mapping a userid =
after all.
=20
> BTW, Is 0 a valid "non root" user id on nonstop?

It is. Sort of 'nobody' in the rest of the UNIX world

> If not then we could use the wrapper approach to
> hide the ROOT_UID issue also.

I thought about this a long time, but couldn't come up with a 'water =
proof' method.
And after all we're dealing with a system's security here, so better =
stay on the safe side...

> In the meantime we should at least document these differences
> in gnulib in doc/posix-functions/getuid.texi.
>=20
> >> Such a change would affect coreutils in =
...src/{groups,id,install,test,whoami}.c (in addition to root-uid.h of =
course)
> >>
>=20
> >> Here two trailing _ seem missing?
> >>
> >> diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
> >> --- ./src/numfmt.c.orig 2013-02-14 08:49:30 -0600
> >> +++ ./src/numfmt.c      2013-02-18 10:58:27 -0600
> >> @@ -1195,7 +1195,7 @@
> >>      Returns a pointer to the *delimiter* of the requested field,
> >>      or a pointer to NUL (if reached the end of the string).  */
> >>   static inline char *
> >> -__attribute ((pure))
> >> +__attribute__ ((pure))
>=20
> Oops. I'll fix this up with a more extensive patch in coreutils.
>=20
> Thanks,
> P=C3=A1draig.





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 10:29:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 05:29:48 2013
Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7kSK-0004r4-1u
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 05:29:48 -0500
Received: from mx1.redhat.com ([209.132.183.28]:7961)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <P@HIDDEN>) id 1U7kSI-0004qx-BI
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 05:29:47 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r1JASeb3014048
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Tue, 19 Feb 2013 05:28:40 -0500
Received: from [10.36.116.71] (ovpn-116-71.ams2.redhat.com [10.36.116.71])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id r1JASb07000867
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO);
	Tue, 19 Feb 2013 05:28:39 -0500
Message-ID: <512353D5.5060601@HIDDEN>
Date: Tue, 19 Feb 2013 10:28:37 +0000
From: =?UTF-8?B?UMOhZHJhaWcgQnJhZHk=?= <P@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.21, some changes needed
References: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
In-Reply-To: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id
	r1JASeb3014048
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

On 02/19/2013 09:08 AM, Joachim Schmitz wrote:
>> -----Original Message-----
>> From: Joachim Schmitz [mailto:jojo@HIDDEN]
>> Sent: Tuesday, February 19, 2013 9:18 AM
>> To: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'
>> Subject: coreutils-8.21, some changes needed
>>
>> Hi folks
>>
>> In an attempt to port coreutils 8.21 to HP-NonStop I stumbled accross =
a couple problems, here are my fixes to them:
>>
>> Here another file needs to get adjusted to using the new root-uid.h
>>
>> diff -EBbu ./src/copy.c.orig ./src/copy.c
>> --- ./src/copy.c.orig   2013-02-07 03:37:05 -0600
>> +++ ./src/copy.c        2013-02-18 09:29:22 -0600
>> @@ -51,6 +51,7 @@
>>   #include "ignore-value.h"
>>   #include "ioblksize.h"
>>   #include "quote.h"
>> +#include "root-uid.h"
>>   #include "same.h"
>>   #include "savedir.h"
>>   #include "stat-size.h"
>> @@ -1127,7 +1128,7 @@
>>       {
>>         bool access_changed =3D false;
>>
>> -      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D 0)
>> +      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D ROOT_UID)
>>           access_changed =3D fchmod_or_lchmod (dest_desc, dst_name, 06=
00) =3D=3D 0;
>>
>>         if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)
>> @@ -2718,7 +2719,7 @@
>>       priv_freeset (pset);
>>     }
>>   #else
>> -  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =3D=3D =
0);
>> +  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =3D=3D =
ROOT_UID);
>>   #endif
>>   }

I'll apply this in your name.

>> On HP-NonStop we use  0x80000000 instead of -1 for getuid(), getgid() =
and friends to indicate NO_UID rsp. NO_GID
>> Guess that difference could go into gnulibs root-uid.h?

You could wrap get[gu]id() to return -1 in that case,
or alternatively define NO_UID and NO_GID in root-uid.h
and use that everywhere. Probably the easiest approach
for coreutils at least since it already users NO_GID since:
http://bugs.gnu.org/10021
Though I note that root-uid.h would be an inaccurate
name if we did that.

BTW, Is 0 a valid "non root" user id on nonstop?
If not then we could use the wrapper approach to
hide the ROOT_UID issue also.

In the meantime we should at least document these differences
in gnulib in doc/posix-functions/getuid.texi.

>> Such a change would affect coreutils in ...src/{groups,id,install,test=
,whoami}.c (in addition to root-uid.h of course)
>>

>> Here two trailing _ seem missing?
>>
>> diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
>> --- ./src/numfmt.c.orig 2013-02-14 08:49:30 -0600
>> +++ ./src/numfmt.c      2013-02-18 10:58:27 -0600
>> @@ -1195,7 +1195,7 @@
>>      Returns a pointer to the *delimiter* of the requested field,
>>      or a pointer to NUL (if reached the end of the string).  */
>>   static inline char *
>> -__attribute ((pure))
>> +__attribute__ ((pure))

Oops. I'll fix this up with a more extensive patch in coreutils.

Thanks,
P=C3=A1draig.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 09:10:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 04:10:08 2013
Received: from localhost ([127.0.0.1]:35983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7jDE-00033u-1S
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 04:10:08 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:58821)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1U7jDB-00033h-4v
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 04:10:06 -0500
Received: from DualCore (dsdf-4db50f91.pool.mediaWays.net [77.181.15.145])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0MWfQV-1UMIKY0whf-00Xeu0; Tue, 19 Feb 2013 10:08:57 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: <10305 <at> debbugs.gnu.org>,
	<bug-gnulib@HIDDEN>,
	<bug-coreutils@HIDDEN>
References: 
In-Reply-To: 
Subject: RE: coreutils-8.21, some changes needed
Date: Tue, 19 Feb 2013 10:08:53 +0100
Message-ID: <007d01ce0e80$be6ab4f0$3b401ed0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac4Od35oCaxTIUelRSOz/vyNGR4pCwACJKgw
Content-Language: de
X-Provags-ID: V02:K0:aFRvnm53j3JbLhKKNtmi278vbxxRglMQ9KjliXsb9wZ
	EN12J4ZKk4tSFJeKb8sZdDjXkqj3ihvl3ENDy2y1+U07pGUBIn
	esR5RloSUazoPirD6AwgxR4tsgVr83Lfggpi7jwDevU+ygVzdk
	c5vSC4VJ4FsHzIv+7P0HOkIKgCc+xKvNKHjFyqzbfBKm64addT
	WIkJ3ruz4SK1tftf5dZ3KDf5vjbx9cfxJqaAw++u078mxJqj2K
	/7cA3+BBcEL0aMIgtDDJdlR4oh9OxN8NocE0z3QlxlbQoc3Dpt
	JPnp0s1bYup2Jn8Qd33ZhYCv8CHqMvpVPVJtkKD9tep3BNh2MB
	08KO53IimaV18BRY+HYP2JZNgLK7OmpSllgUCnDaZxRppEXKYI
	dnKGLo/7wPjJA==
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 10305
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> -----Original Message-----
> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> Sent: Tuesday, February 19, 2013 9:18 AM
> To: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'
> Subject: coreutils-8.21, some changes needed
> 
> Hi folks
> 
> In an attempt to port coreutils 8.21 to HP-NonStop I stumbled accross a couple problems, here are my fixes to them:
> 
> Here another file needs to get adjusted to using the new root-uid.h
> 
> diff -EBbu ./src/copy.c.orig ./src/copy.c
> --- ./src/copy.c.orig   2013-02-07 03:37:05 -0600
> +++ ./src/copy.c        2013-02-18 09:29:22 -0600
> @@ -51,6 +51,7 @@
>  #include "ignore-value.h"
>  #include "ioblksize.h"
>  #include "quote.h"
> +#include "root-uid.h"
>  #include "same.h"
>  #include "savedir.h"
>  #include "stat-size.h"
> @@ -1127,7 +1128,7 @@
>      {
>        bool access_changed = false;
> 
> -      if (!(sb.st_mode & S_IWUSR) && geteuid () != 0)
> +      if (!(sb.st_mode & S_IWUSR) && geteuid () != ROOT_UID)
>          access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0;
> 
>        if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)
> @@ -2718,7 +2719,7 @@
>      priv_freeset (pset);
>    }
>  #else
> -  x->chown_privileges = x->owner_privileges = (geteuid () == 0);
> +  x->chown_privileges = x->owner_privileges = (geteuid () == ROOT_UID);
>  #endif
>  }
> 
> 
> 
> On HP-NonStop we use  0x80000000 instead of -1 for getuid(), getgid() and friends to indicate NO_UID rsp. NO_GID
> Guess that difference could go into gnulibs root-uid.h?
> Such a change would affect coreutils in ...src/{groups,id,install,test,whoami}.c (in addition to root-uid.h of course)
> 
> 
> Here two trailing _ seem missing?
> 
> diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
> --- ./src/numfmt.c.orig 2013-02-14 08:49:30 -0600
> +++ ./src/numfmt.c      2013-02-18 10:58:27 -0600
> @@ -1195,7 +1195,7 @@
>     Returns a pointer to the *delimiter* of the requested field,
>     or a pointer to NUL (if reached the end of the string).  */
>  static inline char *
> -__attribute ((pure))
> +__attribute__ ((pure))
>  skip_fields (char *buf, int fields)
>  {
>    char *ptr = buf;
> 

And here as a git diff:

diff --git a/src/copy.c b/src/copy.c
index 3f2cc2b..affdda1 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -51,6 +51,7 @@
 #include "ignore-value.h"
 #include "ioblksize.h"
 #include "quote.h"
+#include "root-uid.h"
 #include "same.h"
 #include "savedir.h"
 #include "stat-size.h"
@@ -1127,7 +1128,7 @@ preserve_metadata:
     {
       bool access_changed = false;

-      if (!(sb.st_mode & S_IWUSR) && geteuid () != 0)
+      if (!(sb.st_mode & S_IWUSR) && geteuid () != ROOT_UID)
         access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0;

       if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)
@@ -2718,7 +2719,7 @@ cp_options_default (struct cp_options *x)
     priv_freeset (pset);
   }
 #else
-  x->chown_privileges = x->owner_privileges = (geteuid () == 0);
+  x->chown_privileges = x->owner_privileges = (geteuid () == ROOT_UID);
 #endif
 }

diff --git a/src/numfmt.c b/src/numfmt.c
index 8c21c2b..50f295d 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -1195,7 +1195,7 @@ process_suffixed_number (char *text, long double *result,
    Returns a pointer to the *delimiter* of the requested field,
    or a pointer to NUL (if reached the end of the string).  */
 static inline char *
-__attribute ((pure))
+__attribute__ ((pure))
 skip_fields (char *buf, int fields)
 {
   char *ptr = buf;






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 08:38:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 03:38:45 2013
Received: from localhost ([127.0.0.1]:35940 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7iir-0002LH-5D
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 03:38:45 -0500
Received: from moutng.kundenserver.de ([212.227.17.8]:52217)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1U7iiq-0002LA-20
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 03:38:44 -0500
Received: from DualCore (dsdf-4db50f91.pool.mediaWays.net [77.181.15.145])
	by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis)
	id 0M8MDe-1V2Ybm3Z1W-00vIoz; Tue, 19 Feb 2013 09:37:17 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu >
	<002a01cd6682$7048c010$50da4030$@schmitz-digital.de>
	<500A4037.4080300@HIDDEN> 
In-Reply-To: 
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Tue, 19 Feb 2013 09:37:13 +0100
Message-ID: <007101ce0e7c$51d5e930$f581bb90$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwI9FnscAm8Gh/MCiSKlyQL8vwCEASdzD2IBuzCQ4QFOg/R4Apo5ZfMB5v6whgJyt8DoAlY49bgBPB1V5AInEJHlAdvrCscBm4dspAGZNkBnAUKJT/gCW8DVwADWZoZEArGMF6UBSawb8QH6df8mAe57iqSXM3ReMIFOn+MQ
Content-Language: de
X-Provags-ID: V02:K0:7/UeAEMyxhnPWbWYYS/V03gtWK29yew+kQNNDXvs4BP
	636Z9kuoy2B1vYu2LaJxqxFWhINukUykSAVFFWsxOrUIBgvtFa
	OXxtiVzWzj3O0J44RVMbTB7nrdGqKk545RXbQi0lftHlVavDR9
	FJJlpNHZG/Oj0mg9AYrWwBzpEZwCYbkpCGp/bkMg/zOcYxKRh+
	Zkr13F42Kv+ZlbPRgnd3dZyIKjvC/xc/gKjTwS5fDIY4B8OsOo
	QgjQoiNEqcRTWGAtrZyudzienUtDQzo82ZlFcOaGzg27jQtjyN
	USxjNY+Mm1Ac5X621CuiDCrojxWUprUPm1LpfqasVTxHwupRQM
	/IWnWOk14jRf4gvQowxGgFXO97N1AKvdPmocyuPaRRJKVntEhe
	zTRBX6Wt8yMMA==
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
	has
	identified this incoming email as possible spam. The original message
	has been attached to this so you can view it (if it isn't spam) or
	label similar future email.  If you have any questions, see
	the administrator of that system for details.
	Content preview: > From: Joachim Schmitz
	[mailto:jojo@HIDDEN] >
	Sent: Saturday, July 21, 2012 12:42 PM Yes,
	it's ben a while... > To: 'Paul
	Eggert' > Cc: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN';
	'Eric Blake'; 'Jim Meyering'; 'Schmitz, Joachim';
	'nagendra.vs@HIDDEN' > Subject: RE: bug#10305: coreutils-8.14,
	"rm -r" fails with EBADF > > > From: Paul Eggert
	[mailto:eggert@HIDDEN] > > Sent: Saturday, July 21,
	2012 7:38 AM > > To: Joachim Schmitz > > Cc:
	10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim Meyering';
	> > 'Schmitz, Joachim';
	nagendra.vs@HIDDEN > > Subject: Re: bug#10305: coreutils-8.14,
	"rm -r" fails with EBADF > > > > On 07/20/2012 09:17 AM, Joachim Schmitz
	wrote: > > > The coreutils config.hin in 8.17 no more defines any of
	RAW_DECL_* > > functions,
	which were present in 8.15. Can we expect more problems because
	> > of this? > > Sorry,
	I've lost context -- there has been a blizzard of
	emails in this thread and I > > don't know what the current state is
	any more. > > > > As I understand it,
	the idea is that you submit your patches one at a time,
	> > against the current git master. Which patch runs afoul
	of the RAW_DECL_* > > change, and why? > > The patch in question here is
	this: > /usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c >
	---
	./lib/getcwd.c.orig 2012-01-06 03:14:31 -0600 > +++ ./lib/getcwd.c
	2012-07-19
	11:34:01 -0500 > @@ -135,7 +135,7 @@ > size_t allocated = size; > size_t
	used;
	> > -#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD > +#if
	(HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || __TANDEM >
	/* If AT_FDCWD is not defined,
	the algorithm below is O(N**2) and > this is much
	slower than the system getcwd (at least on > GNU/Linux). So trust the
	system
	getcwd's results unless they > > And the fact that somewhere between
	corutils-8.15
	and 8.17 these HAVE_RAW_DECL_* have disappeared from config.hin. >
	Without
	the above patch we run into an endless recursion loop: getcwd(),
	openat(), rpl_open(), get_name(),
	getcwd() .... > until we hit the max. stack limit
	and abort. > > While the above patch seems to fix this for use,
	Nagendra's concern is whether there is more to [...] 
	Content analysis details:   (2.1 points, 10.0 required)
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	1.3 RCVD_IN_RP_RNBL        RBL: Relay in RNBL,
	https://senderscore.org/blacklistlookup/
	[212.227.17.8 listed in bl.score.senderscore.com]
	-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
	-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,
	no trust [212.227.17.8 listed in list.dnswl.org]
	0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
	[score: 0.5000]
X-Debbugs-Envelope-To: 10305
Cc: bug-gnulib@HIDDEN, nagendra.vs@HIDDEN, 'Jim Meyering' <jim@HIDDEN>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  > From: Joachim Schmitz [mailto:jojo@HIDDEN] >
    Sent: Saturday, July 21, 2012 12:42 PM Yes, it's ben a while... > To: 'Paul
    Eggert' > Cc: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'; 'Eric Blake';
    'Jim Meyering'; 'Schmitz, Joachim'; 'nagendra.vs@HIDDEN' > Subject: RE: bug#10305:
    coreutils-8.14, "rm -r" fails with EBADF > > > From: Paul Eggert [mailto:eggert@HIDDEN]
    > > Sent: Saturday, July 21, 2012 7:38 AM > > To: Joachim Schmitz > > Cc:
    10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim Meyering';
   > > 'Schmitz, Joachim'; nagendra.vs@HIDDEN > > Subject: Re: bug#10305: coreutils-8.14,
    "rm -r" fails with EBADF > > > > On 07/20/2012 09:17 AM, Joachim Schmitz
   wrote: > > > The coreutils config.hin in 8.17 no more defines any of RAW_DECL_*
    > > functions, which were present in 8.15. Can we expect more problems because
    > > of this? > > Sorry, I've lost context -- there has been a blizzard of
    emails in this thread and I > > don't know what the current state is any
   more. > > > > As I understand it, the idea is that you submit your patches
    one at a time, > > against the current git master. Which patch runs afoul
    of the RAW_DECL_* > > change, and why? > > The patch in question here is
   this: > /usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c > ---
    ./lib/getcwd.c.orig 2012-01-06 03:14:31 -0600 > +++ ./lib/getcwd.c 2012-07-19
    11:34:01 -0500 > @@ -135,7 +135,7 @@ > size_t allocated = size; > size_t
   used; > > -#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD > +#if
    (HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || __TANDEM > /*
   If AT_FDCWD is not defined, the algorithm below is O(N**2) and > this is much
    slower than the system getcwd (at least on > GNU/Linux). So trust the system
    getcwd's results unless they > > And the fact that somewhere between corutils-8.15
    and 8.17 these HAVE_RAW_DECL_* have disappeared from config.hin. > Without
    the above patch we run into an endless recursion loop: getcwd(), openat(),
    rpl_open(), get_name(), getcwd() .... > until we hit the max. stack limit
    and abort. > > While the above patch seems to fix this for use, Nagendra's
    concern is whether there is more to [...] 
 
 Content analysis details:   (2.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  1.3 RCVD_IN_RP_RNBL        RBL: Relay in RNBL,
                             https://senderscore.org/blacklistlookup/
                             [212.227.17.8 listed in bl.score.senderscore.com]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
                             trust
                             [212.227.17.8 listed in list.dnswl.org]
  0.0 SINGLE_HEADER_3K       A single header contains 3K-4K characters
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  0.8 BAYES_50               BODY: Bayes spam probability is 40 to 60%
                             [score: 0.5000]

> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> Sent: Saturday, July 21, 2012 12:42 PM

Yes, it's ben a while...

> To: 'Paul Eggert'
> Cc: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'; 'Eric Blake'; 'Jim =
Meyering'; 'Schmitz, Joachim'; 'nagendra.vs@HIDDEN'
> Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> > From: Paul Eggert [mailto:eggert@HIDDEN]
> > Sent: Saturday, July 21, 2012 7:38 AM
> > To: Joachim Schmitz
> > Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim =
Meyering';
> > 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> > Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> >
> > On 07/20/2012 09:17 AM, Joachim Schmitz wrote:
> > > The coreutils config.hin in 8.17 no more defines any of RAW_DECL_*
> > functions, which were present in 8.15. Can we expect more problems =
because
> > of this?
> > Sorry, I've lost context -- there has been a blizzard of emails in =
this thread and I
> > don't know what the current state is any more.
> >
> > As I understand it, the idea is that you submit your patches one at =
a time,
> > against the current git master.  Which patch runs afoul of the =
RAW_DECL_*
> > change, and why?
>=20
> The patch in question here is this:
> /usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c
> --- ./lib/getcwd.c.orig	2012-01-06 03:14:31 -0600
> +++ ./lib/getcwd.c	2012-07-19 11:34:01 -0500
> @@ -135,7 +135,7 @@
>    size_t allocated =3D size;
>    size_t used;
>=20
> -#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD
> +#if (HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || =
__TANDEM
>    /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
>       this is much slower than the system getcwd (at least on
>       GNU/Linux).  So trust the system getcwd's results unless they
>=20
> And the fact that somewhere between corutils-8.15 and 8.17 these =
HAVE_RAW_DECL_* have disappeared from config.hin.
> Without the above patch we run into an endless recursion loop: =
getcwd(), openat(), rpl_open(), get_name(), getcwd() ....
> until we hit the max. stack limit and abort.
>=20
> While the above patch seems to fix this for use, Nagendra's concern is =
whether there is more to the removal of these HAVE_RAW_DECL_*
> stuff, whether there are other problems with these


And the above patch is still needed to get coreutils-8.21 to build on =
HP-NonStop

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Feb 2013 08:18:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 19 03:18:57 2013
Received: from localhost ([127.0.0.1]:35928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1U7iPh-0001tc-0A
	for submit <at> debbugs.gnu.org; Tue, 19 Feb 2013 03:18:57 -0500
Received: from moutng.kundenserver.de ([212.227.126.171]:53970)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1U7iPe-0001tT-5B
	for 10305 <at> debbugs.gnu.org; Tue, 19 Feb 2013 03:18:55 -0500
Received: from DualCore (dsdf-4db50f91.pool.mediaWays.net [77.181.15.145])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0LdIcX-1UXwOT0omv-00iBtc; Tue, 19 Feb 2013 09:17:48 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: <10305 <at> debbugs.gnu.org>,
	<bug-gnulib@HIDDEN>
Subject: coreutils-8.21, some changes needed
Date: Tue, 19 Feb 2013 09:17:45 +0100
Message-ID: <007001ce0e79$99240770$cb6c1650$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac4Od35oCaxTIUelRSOz/vyNGR4pCw==
Content-Language: de
X-Provags-ID: V02:K0:veyR4Fk/MvQ6m+bWO4YQdyfakS24Wp+9k/4t+o1+sgV
	z4Uz/jfnmjil+zsXqhi+8hrCQsRd7/PP/8nqW/uXDSlCTDGU3p
	bJ9ZasMJ5RkxQqnQAebDuZXv0wlP/LIGTWJJsw98YE6kqf9KVq
	jNynbHr6za8cVJP5yCXC1qOUE7EJVkK6UohxYcWi7YAfZv2K7N
	kUDQPWfpyu2Fw7xA8Q6HRc43aA/r2+5A8UR0rLJWvmbG3KRNTA
	xJvYv5qj2biqzislD0afxDe264q4mQzoCH/pjf0i4cyu+wZ/zG
	yYNyEk4ZfrN9VLqeEGc5NZIWoPwzlEMwU+T6gR/BotxOChoKXp
	MGBHHdtu36/zU1e1IivEFCQHIN8SO+siHaDY77K4YZ5YluApel
	LkrswRowngpyQ==
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 10305
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.0 (/)

Hi folks

In an attempt to port coreutils 8.21 to HP-NonStop I stumbled accross a couple problems, here are my fixes to them:

Here another file needs to get adjusted to using the new root-uid.h

diff -EBbu ./src/copy.c.orig ./src/copy.c
--- ./src/copy.c.orig   2013-02-07 03:37:05 -0600
+++ ./src/copy.c        2013-02-18 09:29:22 -0600
@@ -51,6 +51,7 @@
 #include "ignore-value.h"
 #include "ioblksize.h"
 #include "quote.h"
+#include "root-uid.h"
 #include "same.h"
 #include "savedir.h"
 #include "stat-size.h"
@@ -1127,7 +1128,7 @@
     {
       bool access_changed = false;

-      if (!(sb.st_mode & S_IWUSR) && geteuid () != 0)
+      if (!(sb.st_mode & S_IWUSR) && geteuid () != ROOT_UID)
         access_changed = fchmod_or_lchmod (dest_desc, dst_name, 0600) == 0;

       if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)
@@ -2718,7 +2719,7 @@
     priv_freeset (pset);
   }
 #else
-  x->chown_privileges = x->owner_privileges = (geteuid () == 0);
+  x->chown_privileges = x->owner_privileges = (geteuid () == ROOT_UID);
 #endif
 }



On HP-NonStop we use  0x80000000 instead of -1 for getuid(), getgid() and friends to indicate NO_UID rsp. NO_GID
Guess that difference could go into gnulibs root-uid.h?
Such a change would affect coreutils in ...src/{groups,id,install,test,whoami}.c (in addition to root-uid.h of course)


Here two trailing _ seem missing?

diff -EBbu ./src/numfmt.c.orig ./src/numfmt.c
--- ./src/numfmt.c.orig 2013-02-14 08:49:30 -0600
+++ ./src/numfmt.c      2013-02-18 10:58:27 -0600
@@ -1195,7 +1195,7 @@
    Returns a pointer to the *delimiter* of the requested field,
    or a pointer to NUL (if reached the end of the string).  */
 static inline char *
-__attribute ((pure))
+__attribute__ ((pure))
 skip_fields (char *buf, int fields)
 {
   char *ptr = buf;







Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Jul 2012 21:16:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 21 17:16:52 2012
Received: from localhost ([127.0.0.1]:56284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Ssh2h-00015a-QL
	for submit <at> debbugs.gnu.org; Sat, 21 Jul 2012 17:16:52 -0400
Received: from g1t0026.austin.hp.com ([15.216.28.33]:31196)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <nagendra.vs@HIDDEN>) id 1Ss7Et-0004S4-L7
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 03:03:06 -0400
Received: from G2W1953G.americas.hpqcorp.net (gvt0525.austin.hp.com
	[16.238.8.185]) (using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by g1t0026.austin.hp.com (Postfix) with ESMTPS id B8C55C0E3;
	Fri, 20 Jul 2012 06:56:46 +0000 (UTC)
Received: from G2W2419G.americas.hpqcorp.net (16.197.128.79) by
	G2W1953G.americas.hpqcorp.net (16.238.8.185) with Microsoft SMTP Server
	(TLS) id 14.2.283.4; Fri, 20 Jul 2012 06:55:59 +0000
Received: from G1W3648.americas.hpqcorp.net ([169.254.12.8]) by
	G2W2419G.americas.hpqcorp.net ([16.197.128.79]) with mapi id
	14.02.0283.003; Fri, 20 Jul 2012 06:55:58 +0000
From: "V S, Nagendra (Nonstop Filesystems Team)" <nagendra.vs@HIDDEN>
To: Joachim Schmitz <jojo@HIDDEN>, 'Paul Eggert'
	<eggert@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Thread-Topic: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Thread-Index: AQEbigJvFwhQLjXly0WTo/OPxyEotQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cAA1maGRAKxjBelApqUAp6W/TCAMIAMtviwgBdg2QA=
Date: Fri, 20 Jul 2012 06:55:57 +0000
Message-ID: <FE47B30EBA7C6643A33452F19A2C6DDA021715@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs
	.ucla.ed u> <006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
In-Reply-To: <001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [16.193.232.13]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: 10305
X-Mailman-Approved-At: Sat, 21 Jul 2012 17:16:45 -0400
Cc: "10305 <at> debbugs.gnu.org" <10305 <at> debbugs.gnu.org>,
	'Eric Blake' <eblake@HIDDEN>,
	"bug-gnulib@HIDDEN" <bug-gnulib@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>, "Schmitz, Joachim" <schmitz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

V2FzIGRvaW5nIG1vcmUgY29kZSBzdHVkeSBvbiB0aGUgZ2V0Y3dkIHByb2JsZW0sDQoNClRoZSBj
b3JldXRpbHMgY29uZmlnLmhpbiBubyBtb3JlIGRlZmluZXMgYW55IG9mIFJBV19ERUNMXyogZnVu
Y3Rpb25zLCB3aGljaCB3aGVyZSBwcmVzZW50IGluIDguMTUuIENhbiB3ZSBleGNlcHQgbW9yZSBw
cm9ibGVtcyBiZWNhdXNlIG9mIHRoaXM/DQoNClRoYW5rcyAmIFJlZ2FyZHMNCk5hZ2VuZHJhLlYu
Uw0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogSm9hY2hpbSBTY2htaXR6IFtt
YWlsdG86am9qb0BzY2htaXR6LWRpZ2l0YWwuZGVdIA0KU2VudDogVGh1cnNkYXksIEp1bHkgMTks
IDIwMTIgMTE6MjQgUE0NClRvOiAnUGF1bCBFZ2dlcnQnDQpDYzogMTAzMDVAZGViYnVncy5nbnUu
b3JnOyBidWctZ251bGliQGdudS5vcmc7ICdFcmljIEJsYWtlJzsgJ0ppbSBNZXllcmluZyc7IFNj
aG1pdHosIEpvYWNoaW07IFYgUywgTmFnZW5kcmEgKE5vbnN0b3AgRmlsZXN5c3RlbXMgVGVhbSkN
ClN1YmplY3Q6IFJFOiBidWcjMTAzMDU6IGNvcmV1dGlscy04LjE0LCAicm0gLXIiIGZhaWxzIHdp
dGggRUJBREYNCg0KPiBGcm9tOiBKb2FjaGltIFNjaG1pdHogW21haWx0bzpqb2pvQHNjaG1pdHot
ZGlnaXRhbC5kZV0NCj4gU2VudDogV2VkbmVzZGF5LCBKdW5lIDI3LCAyMDEyIDk6MjUgQU0NCj4g
VG86ICdQYXVsIEVnZ2VydCcNCj4gQ2M6ICcxMDMwNUBkZWJidWdzLmdudS5vcmcnOyAnYnVnLWdu
dWxpYkBnbnUub3JnJzsgJ0VyaWMgQmxha2UnOyAnSmltIA0KPiBNZXllcmluZycNCj4gU3ViamVj
dDogUkU6IGJ1ZyMxMDMwNTogY29yZXV0aWxzLTguMTQsICJybSAtciIgZmFpbHMgd2l0aCBFQkFE
Rg0KPiANCj4gPiBGcm9tOiBQYXVsIEVnZ2VydCBbbWFpbHRvOmVnZ2VydEBjcy51Y2xhLmVkdV0N
Cj4gPiBTZW50OiBXZWRuZXNkYXksIEp1bmUgMjcsIDIwMTIgMjo0OSBBTQ0KPiA+IFRvOiBKb2Fj
aGltIFNjaG1pdHoNCj4gPiBDYzogMTAzMDVAZGViYnVncy5nbnUub3JnOyBidWctZ251bGliQGdu
dS5vcmc7ICdFcmljIEJsYWtlJzsgJ0ppbQ0KPiBNZXllcmluZycNCj4gPiBTdWJqZWN0OiBSZTog
YnVnIzEwMzA1OiBjb3JldXRpbHMtOC4xNCwgInJtIC1yIiBmYWlscyB3aXRoIEVCQURGDQo+ID4N
Cj4gPiBPbiAwNi8yNi8yMDEyIDA5OjM4IEFNLCBKb2FjaGltIFNjaG1pdHogd3JvdGU6DQo+ID4N
Cj4gPiA+IExldCBtZSBrbm93IHdoYXQgeW91IHRoaW5rIGFuZCB3aGVyZS9ob3cgeW91J2QgZG8g
aXQgZGlmZmVyZW50bHkuDQo+ID4NCj4gPiBUaGUgY2hhbmdlcyBtb3N0bHkgbG9vayBnb29kLiAg
VGhlIHRyaXZpYWwgb25lcyB3ZSd2ZSBpbmNvcnBvcmF0ZWQgDQo+ID4gYWxyZWFkeS4gIEkgaGF2
ZSBzb21lIGNvbW1lbnRzIG9uIHRoZSBub250cml2aWFsIG9uZXMgKHBsZWFzZSBzZWUgYmVsb3cp
Lg0KDQo+ID4gSGVyZSBhcmUgc29tZSBjb21tZW50cyBhYm91dCB0aGF0IHBhdGNoOg0KDQo+ID4g
PiAtLS0gLi9nbnUvZGlyZmQuYy5vcmlnCTIwMTEtMDMtMTIgMDM6MTQ6MjguMDAwMDAwMDAwIC0w
NjAwDQo+ID4gPiArKysgLi9nbnUvZGlyZmQuYwkyMDEyLTA2LTI1IDAyOjU1OjA5LjAwMDAwMDAw
MCAtMDUwMA0KPiA+ID4gLi4uDQo+ID4gPiArI2lmZGVmIF9fVEFOREVNDQo+ID4gPiArIyBpbmNs
dWRlIDx1bmlzdGQuaD4gLyogZm9yIF9nbF9mbnVtMmR0KCksIG5lZWRlZCBpbiBDOTkgbW9kZSAq
LyANCj4gPiA+ICsjZW5kaWYNCj4gPg0KPiA+IFNob3VsZG4ndCB0aGF0IGJlICJfZ2xfZm51bTJm
ZCI/DQo+IA0KPiBZZXMsIG9mIGNvdXJzZSwgc3R1cGlkIHR5cG8uDQo+IA0KPiA+IE1vcmUgaW1w
b3J0YW50LCBkb2Vzbid0IHRoZSBkZWNsYXJhdGlvbiBvZiBfZ2xfZm51bTJmZCBiZWxvbmcgYmV0
dGVyIA0KPiA+IGluIGRpcmVudC5oLCBub3QgdW5pc3RkLmg/ICBBbW9uZyBvdGhlciB0aGluZ3Ms
IHRoYXQgd291bGQgbWVhbiB0aGUgDQo+ID4gYWJvdmUgY2hhbmdlIGNhbiBiZSBvbWl0dGVkLg0K
Pg0KPiBNeSBhdHRlbXB0cyB0byBpbnRlZ3JhdGUgdGhpcyBpbnRvIGNvcmV1dGlscy04LjE3IHNl
ZW0gdG8gaW5kaWNhdGUgDQo+IHRoYXQgdGhpcyBmdW5jdGlvbiBhbmQgYSBjb3VwbGUgbW9yZSBh
cmUgdXNlZCBlbHNld2hlcmUgdG9vIExvb2tzIGxpa2UgDQo+IHRoZXJlIGNsb3NlZGlyLm8gbmVl
ZHMgX2dsX3VuZ2VyaXN0ZXJfZm51bSgpLCBkaXJmZC5jIG5lZWRzIA0KPiBfZ2xfZm51bTJkcygp
IGFuZCBvcGVuZGlyLmMgbmVlZHMgX2dsX3JlZ2lzdGVyX2ZudW0oKS4NCg0KRnVydGhlcm1vcmUg
dGhhdCBmdW5jdGlvbiBuZWVkcyBhY2Nlc3MgdG8gZm51bTJmZG1hcCwgd2hpY2ggaXMgbG9jYWwg
dG8gZmNoZGlyLmMNCiANCj4gPiA+ICBpbnQNCj4gPiA+ICBkaXJmZCAoRElSICpkaXJfcCkNCj4g
PiA+ICB7DQo+ID4gPiAgICBpbnQgZmQgPSBESVJfVE9fRkQgKGRpcl9wKTsNCj4gPiA+ICAgIGlm
IChmZCA9PSAtMSkNCj4gPiA+ICAgICAgZXJybm8gPSBFTk9UU1VQOw0KPiA+ID4gKyNpZmRlZiBf
X1RBTkRFTQ0KPiA+ID4gKyAgZmQgPSBfZ2xfZm51bTJmZChmZCk7DQo+ID4gPiArI2VuZGlmDQo+
ID4NCj4gPiBUaGlzIG1pZ2h0IGJlIGNsZWFuZXIgaWYgRElSX1RPX0ZEIGludm9rZWQgX2dsX2Zu
dW0yZmQgZGlyZWN0bHkuDQo+ID4gVGhhdCB3YXksIGRpcmZkLmMgY291bGQgYmUgbGVmdCBhbG9u
ZS4gIChPciBwZXJoYXBzIG5vdDsgSSBkb24ndCANCj4gPiB1bmRlcnN0YW5kIHRoZSBjb2RlIHRo
YXQgd2VsbC4pDQo+IA0KPiBXb24ndCB0aGF0IG1ha2UgdGhhdCBtYWNybyB0b28gY29tcGxpY2F0
ZWQ/DQoNCkkgYmVsaWV2ZSBpdCB3b3VsZC4gUHJvdmUgbWUgd3JvbmcgOy0pDQoNCj4gPiA+ICsg
IGNoYXIgZm51bTsgICAgICAgIC8qICd5JyBvciAnbicsIGFjdHVhbGx5IGEgYm9vbCAqLw0KPiA+
DQo+ID4gV2h5IG5vdCB1c2UgMSBhbmQgMD8gIFRoYXQncyBmYXIgbW9yZSB0eXBpY2FsIGZvciBi
b29sZWFuIHZhbHVlcywgDQo+ID4gYW5kIGdlbmVyYXRlcyBiZXR0ZXIgY29kZS4NCg0KRG9uZSwg
cmV2ZWFsZWQgYSBiYWQgYnVnIGluIG91ciBjb2RlLCBmaXhlZCBub3cgdG9vLg0KDQo+IE1heWJl
IHdlIGNvdWxkIGFsc28gbWFrZSBpdCBhIHNob3J0IGFuZCBwbGFjZSBmbnVtIHJpZ2h0IHRoZXJl
PyBUaGF0IA0KPiB3b3VsZCBjaGFuZ2UgdGhlIGltcGxlbWVudGF0aW9uIHF1aXRlIGEgYml0IHRo
b3VnaCwgYnV0IG1pZ2h0IG1ha2UgaXQgbGVhbmVyIHRvby4NCj4gQW5kIHRoZSBjb21tZW50DQo+
IC8qIEZJWE1FIC0gYWRkIGEgRElSKiBtZW1iZXIgdG8gbWFrZSBkaXJmZCBwb3NzaWJsZSBvbiBt
aW5ndz8gICovIA0KPiBJbmRpY2F0ZXMgdGhhdCB0aGVyZSBpcyBhIGNoYW5nZSBwZW5kaW5nIGZv
ciBhIHNpbWlsYXIgcHVycG9zZSBvbiBhIGRpZmZlcmVudCBwbGF0Zm9ybS4uLg0KDQpPayBub3cu
Li4NCg0KQWZ0ZXIgcXVpdGUgYSBmZXcgaXRlcmF0aW9ucyBhbmQgd2l0aCBpbnRlZ3JhdGluZyB0
aGUgdGhpbmdzIHlvdSBhbHJlYWR5IGZpeGVkIGZvciB0aGUgbmV4dCByZWxlYXNlcyBvZiBnbnVs
aWIsIGNvcmV1aXRscyBhbmQgdGFyLCB3ZSBmaW5hbGx5IGdvdCBpdCBydW5uaW5nIGZpbmUgZm9y
IGNvcmV1dGlscy04LjE1LiBEb2luZyB0aGUgZXF1aXZhbGVudCBjaGFuZ2VzIChub3QgMTAwJSBp
ZGVudGljYWwsIHRoZSBjb3JldXRpbHMgcmVzcC4gZ251bGliIGNvZGUgaGFkIGNoYW5nZWQgYW5k
IHJlc2h1ZmZsZWQgcXVpdGUgYSBiaXQpIGxlYWQgdXMgaW50byBhbiBlbmRsZXNzIHJlY3Vyc2lv
biAod2VsbCBhcyBlbmRsZXNzIGFzIHRoZSBzdGFjayBjb3VsZCBncm93IHdpdGhvdXQgYWJvcnRp
bmcpLiBBZnRlciBxdWl0ZSBzb21lIGVmZm9ydCBpbiBkZWJ1Z2dpbmcsIE5hZ2VuZHJhIGZpbmFs
bHkgZm91bmQgdGhlIGN1bHByaXQ6IGluIDguMTUgY29uZmlndXJlIGNoZWNrcyBmb3Igc2V2ZXJh
bCBmdW5jdGlvbnMgdG8gYmUgZGVjbGFyZWQgd2l0aG91dCBhIG1hY3JvLCBvbmUgb2YgdGhlbSBp
cyBnZXRjd2QoKSwgYW5kIHRoZW4gcHV0cyBhICNkZWZpbmUgSEFWRV9SQVdfREVDTF9HRVRDV0Qg
aW50byBjb25maWcuaC4gQ29yZXV0aWxzLTguMTcgZG9lc24ndCBoYXZlIHRoYXQgY2hlY2sgYW55
bW9yZSwgaGVuY2UgZG9lc24ndCBzZXQgdGhhdCBkZWZpbmUgYW5kIHRoZW4gaW4gZ2V0Y3dkLmMg
ZW50ZXJzIHRoYXQgZW5kbGVzcyByZWN1cnNpb24gbG9vcDogZ2V0Y3dkKCksIG9wZW5hdCgpLCBy
cGxfb3BlbigpLCBnZXRfbmFtZSgpLCBnZXRjd2QoKSAuLi4uDQoNCk91ciAodGVtcC4/KSBmaXgg
aXMgdG8gYWRkIGFuICJ8fCBfX1RBTkRFTSIgdG8gbGliL2dldGN3ZC5jLCBsaW5lIDEzOC4NCg0K
RmluZCB0aGUgZW50aXJlIHBhdGNoIHdlIHVzZSBhdHRhY2hlZC4gU29tZSBtb3JlIGNvbW1lbnRz
IG9uIHRoZXNlOg0KDQpXZSBoYWQgdG8gaG9wIHRocnUgc2V2ZXJhbCBsb29wcyB0byBnZXQgZ2V0
bW50ZW50KCkgaW1wbGVtZW50ZWQgZm9yIE5vblN0b3AsIHlvdSBtYXkgb3IgbWF5IG5vdCBiZSBp
bnRlcmVzdGVkIGluIHRoZSBkZXRhaWxzLiBJdCBpcyB2ZXJ5IHN5c3RlbSBzcGVjaWZpYy4gUGFy
dCBvZiB0aGUgc3R1ZmYgaXMgb3V0c2lkZSB0aGlzIHBhdGNoIGluIG91ciBvd24gR05VbGliLWxp
a2UgbGlicmFyeSAoY2FsbGVkIGZsb3NzLCBGcmVld2FyZSBMb29rIGZvciBPcGVuIFN5c3RlbSBT
ZXJ2aWNlcykuIE1heWJlIGV2ZW50dWFsbHkgdGhpcyBnZXRzIGFkZGVkIHRvIG91ciBzeXN0ZW0g
bGlicywgd2hvIGtub3dzLi4uDQoNClRoZSBwYXRjaCB0byBsaWIvaS1yaW5nLmggaXMgbmVlZGVk
IGZvciB0aGUgZnRzLWZ1bmN0aW9ucyB0byByZWN1ciBkZWVwZXIgdGhhbiA0IGxldmVscywgYXQg
bGVhc3Qgb24gTm9uU3RvcC4gSXQgaXMgbm90IHJlYWxseSBmdWxseSB1bmRlcnN0b29kIHdoeSB0
aGF0IGlzIChub3QgYnkgbWUgYXQgbGVhc3QpLCBidXQgdGhhdCBjaGFuZ2UgY3VyZWQgdGhlIHN5
bXB0b20gOy0pLiBQcm9iYWJseSBkb2Vzbid0IG5lZWQgdG8gYmUgcXVpdCBhcyBiaWcuLi4NCg0K
VGhlIHBhdGNoIHRvIGxpYi9yZWFkdXRtcC5oIGlzIHVnbHkgYnV0IG5lZWRlZCwgYXQgbGVhc3Qg
Zm9yIG5vdywgaWdub3JlIGl0LCB1bmxlc3MgeW91IGhhdmUgYSBiZXR0ZXIgaWRlYS4gV2UgZG9u
J3QgaGF2ZSB1dG1wIGFuZCBmcmllbmRzIGF0IGFsbC4gVGhpcyBpcyBhIGJpdCB3b3JrIGluIHBy
b2dyZXNzLCBwcm9iYWJseSBmYWxscyBpbnRvIHRoZSBzYW1lIGNhdGVnb3J5IGFzIGdldG1udGVu
dCgpLg0KDQpUaGUgcGF0Y2hlcyByZWcuIE5PX1VJRCBhbmQgTk9fR0lEIG1pZ2h0IGJlIGJldHRl
ciBkb25lIHNvbWVwbGFjZSBlbHNlLCBvciBub3QgYXQgYWxsLCBJJ20gc3VyZSB3aGV0aGVyIHRo
ZXkgYXJlIHdvcnRoIHRoZSBlZmZvcnQuDQoNCkkndmUgZGlzYWJsZSBhIGJpdCBvZiBhcHBhcmVu
dGx5IGRlYWQgY29kZSBpbiBzcmMvcmVtb3ZlLmMNCg0KSSdtIG5vdCBzdXJlIHdoYXQncyB3cm9u
ZyB3aXRoICBzcmMvc3RhdC5jLCBidXQgb3VyIGNvbXBpbGVyIHRocm93cyB1cCBvbiB0aGUgb3Jp
Z2luYWwgY29kZS4gTWlnaHQgd2VsbCBiZSBhIGJ1ZyBpbiBvdXIgY29tcGlsZXI/DQpTYW1lIGZv
ciBzcmMvc3lzdGVtLmgsIEkgY2FuJ3QgZ2V0IGl0IHRocnUgdGhlIGNvbXBpbGVyIHdpdGhvdXQg
dGhhdCBoYWNrLCBidXQgaGF2ZW4ndCBiZWVuIGFibGUgdG8gZmluZCBvdXQgd2h5Lg0KDQpUaGUg
cGF0Y2ggaW4gc3JjL3N1LmMgaXMgbm90IHJlYWxseSBuZWVkZWQsIHdlIGNhbid0IHVzZSB0aGlz
IHN1IGFueXdheSwgYXMgb3VyIGF1dGhlbnRpY2F0aW9uIHdvcmtzIGRpZmZlcmVudGx5LiBCdXQg
dGhlIERFRkFVTFRfVVNFUiBiZWluZyAicm9vdCIgbWlnaHQgYmUgd29ydGggZ2V0dGluZyBhZGRl
ZCB0byByb290LXVpZC5oLCBwb3NzaWJseT8NCg0KSW4gc3JjL3VwdGltZS5jIGl0IGdldHMgcHJl
dHR5IHN5c3RlbSBzcGVjaWZpYyAoYnV0IG5vdCBhcyBkZWVwbHkgYXMgZ2V0bW50ZW50KSwgZG9u
J3Qga25vdyB3aGV0aGVyIHlvdSdyZSBpbnRlcmVzdGVkIGluIHRoaXMsIGJ1dCBJIGluY2x1ZGVk
IGl0IGhlcmUgYW55d2F5Lg0KDQpJJ3ZlIHRyaWVkIHRvIGZpeCBzb21lIHRlc3RzLCBzcGxpdC9m
aWx0ZXIgYW5kIHRvdWNoL25vdC1vd25lci4gU29tZSBtb3JlIHRlc3RzIGFyZSBmYWlsaW5nIGZv
ciBubyBnb29kIHJlYXNvbiwgYnV0IGEpIEkgaGF2ZW4ndCB5ZXQgZm91bmQgd2h5IHRoZXkgZmFp
bCBub3IgaG93IHRvIGZpeCBpdCBhbmQgYikgbmV2ZXIgY2hlY2sgZm9yIGVycm9yIGNvbmRpdGlv
bnMgeW91IGNhbid0IGhhbmRsZSwgc28gSSBqdXN0IGRvbid0IGNhcmUgYWJvdXQgdGhlc2UgdGVz
dCB0b28gbXVjaCA7LSkNCg0KQXMgbWVudGlvbmVkIGZ1cnRoZXIgYWJvdmUgc29tZSBwYXRjaGVz
IGFyZSB0YWtlbiB3aGF0IHlvdSBhbHJlYWR5IGRpZCB0byBjb3JldXRpbHMsIGdudWxpYiBhbmQg
dGFyLg0KDQpJJ3ZlIHJlbW92ZWQgYSBmZXcgaHVua3Mgb3V0IG9mIHRoZSBwYXRjaCwgdGhpcyBt
YXkgcmVzdWx0IGluIHdhcm5pbmdzIGJ5IHBhdGNoIGFib3V0IGFuIG9mZnNldCwgYnV0IEkgZ3Vl
c3MgeW91IHdvdWxkbid0IGFwcGx5IHRoZW0gdW5hbHRlcmVkIGFueXdheS4NCg0KV2hlcmV2ZXIg
eW91IHNlZSByb29tIGZvciBpbXByb3ZlbWVudCBvciBoYXZlIG1vcmUgcXVlc3Rpb25zLCB3ZSdy
ZSBvcGVuLCBqdXN0IGxldCBOYWdlbmRyYSBhbmQgbWUga25vdyAoYW5kIHllcywgc2NobWl0ekBo
cC5jb20gYW5kIGpvam9Ac2NobWl0ei1kaWdpdGFsLmRlIGlzIHRoZSBzYW1lIHBlcnNvbiwgbWUs
IGp1c3QgaW4gZGlmZmVyZW50IHJvbGVzLCBidXNpbmVzcyBhbmQgcHJpdmF0ZSwgYnV0IGZlZWwg
ZnJlZSB0byBwaWNrIHlvdXIgY2hvaWNlKQ0KDQpCeWUsIEpvam8NCg==




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Jul 2012 10:48:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 21 06:48:51 2012
Received: from localhost ([127.0.0.1]:54025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsXEx-0001va-CL
	for submit <at> debbugs.gnu.org; Sat, 21 Jul 2012 06:48:51 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:56146)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsXEt-0001vP-2G
	for 10305 <at> debbugs.gnu.org; Sat, 21 Jul 2012 06:48:48 -0400
Received: from DualCore (dsdf-4db52f3d.pool.mediaWays.net [77.181.47.61])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0MCT7F-1T1dpH1ml7-0098Zf; Sat, 21 Jul 2012 12:42:22 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu >
	<002a01cd6682$7048c010$50da4030$@schmitz-digital.de>
	<500A4037.4080300@HIDDEN>
In-Reply-To: <500A4037.4080300@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Sat, 21 Jul 2012 12:42:19 +0200
Message-ID: <000901cd672d$819ad690$84d083b0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwI9FnscAm8Gh/MCiSKlyQL8vwCEASdzD2IBuzCQ4QFOg/R4Apo5ZfMB5v6whgJyt8DoAlY49bgBPB1V5AInEJHlAdvrCscBm4dspAGZNkBnAUKJT/gCW8DVwADWZoZEArGMF6UBSawb8QH6df8mAe57iqSXM3ReMA==
Content-Language: de
X-Provags-ID: V02:K0:imK2k5tMiPbkqXPKSqr3vsC/Hd8Fhc1VKd472apOOuI
	Q0XV0WPx0nfFyodauwtKfnwEvTyz9Mz2oo9PafuJiQGOwWPwmW
	xb/kwo+WCjgiaZNimZDbez5G8Hyyphm9GgZb6C825AakbpJidt
	Dt9yf+pOnjCvSLEHuRBiQ/3Lhei887Fk5/p4EOrBMswz/Dwbty
	EqAgUgYejg/iIZupMrPJpkPwSsKXVccb/TNwx2ZPJg2RnPe8eg
	Ul6J7osSTfKiHvhR05wytRYBszojnoeIUnSftVsWgxBrn7Xaxq
	FS7y6Cv72hFf2RbE4tsCIEU47RhatzKFdY0Io6tRC0UE0wTM9y
	uWIYGTjZJN3QSjMb4mckQOCz2dix/qbd41txDMs8JC7UEyfRoZ
	GdUeEq6KDA0AA==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: bug-gnulib@HIDDEN, nagendra.vs@HIDDEN, 'Jim Meyering' <jim@HIDDEN>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Saturday, July 21, 2012 7:38 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim =
Meyering';
> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 07/20/2012 09:17 AM, Joachim Schmitz wrote:
> > The coreutils config.hin in 8.17 no more defines any of RAW_DECL_*
> functions, which were present in 8.15. Can we expect more problems =
because
> of this?
> Sorry, I've lost context -- there has been a blizzard of emails in =
this thread and I
> don't know what the current state is any more.
>=20
> As I understand it, the idea is that you submit your patches one at a =
time,
> against the current git master.  Which patch runs afoul of the =
RAW_DECL_*
> change, and why?

The patch in question here is this:
/usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c
--- ./lib/getcwd.c.orig	2012-01-06 03:14:31 -0600
+++ ./lib/getcwd.c	2012-07-19 11:34:01 -0500
@@ -135,7 +135,7 @@
   size_t allocated =3D size;
   size_t used;
=20
-#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD
+#if (HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || __TANDEM
   /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
      this is much slower than the system getcwd (at least on
      GNU/Linux).  So trust the system getcwd's results unless they

And the fact that somewhere between corutils-8.15 and 8.17 these =
HAVE_RAW_DECL_* have disappeared from config.hin.
Without the above patch we run into an endless recursion loop: getcwd(), =
openat(), rpl_open(), get_name(), getcwd() ....
until we hit the max. stack limit and abort.

While the above patch seems to fix this for use, Nagendra's concern is =
whether there is more to the removal of these HAVE_RAW_DECL_* stuff, =
whether there are other problems with these

Bye, Jojo






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Jul 2012 05:44:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 21 01:44:32 2012
Received: from localhost ([127.0.0.1]:53472 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsSUS-0002dJ-1m
	for submit <at> debbugs.gnu.org; Sat, 21 Jul 2012 01:44:32 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:37400)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1SsSUP-0002dB-Es
	for 10305 <at> debbugs.gnu.org; Sat, 21 Jul 2012 01:44:30 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 9286039E800B;
	Fri, 20 Jul 2012 22:38:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id qZQEyLYJXoDl; Fri, 20 Jul 2012 22:38:07 -0700 (PDT)
Received: from [10.0.0.123] (wsip-70-165-104-51.om.om.cox.net [70.165.104.51])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8235539E8007;
	Fri, 20 Jul 2012 22:38:06 -0700 (PDT)
Message-ID: <500A4037.4080300@HIDDEN>
Date: Sat, 21 Jul 2012 00:37:59 -0500
From: Paul Eggert <eggert@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@cs. ucla.edu >
	<002a01cd6682$7048c010$50da4030$@schmitz-digital.de>
In-Reply-To: <002a01cd6682$7048c010$50da4030$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: bug-gnulib@HIDDEN, nagendra.vs@HIDDEN, 'Jim Meyering' <jim@HIDDEN>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

On 07/20/2012 09:17 AM, Joachim Schmitz wrote:
> The coreutils config.hin in 8.17 no more defines any of RAW_DECL_* functions, which were present in 8.15. Can we expect more problems because of this?
Sorry, I've lost context -- there has been a blizzard of emails
in this thread and I don't know what the current state is any more.

As I understand it, the idea is that you submit your patches one
at a time, against the current git master.  Which patch runs
afoul of the RAW_DECL_* change, and why?




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 16:54:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 12:54:27 2012
Received: from localhost ([127.0.0.1]:52769 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsGTD-0002Eu-EW
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 12:54:27 -0400
Received: from mail-bk0-f44.google.com ([209.85.214.44]:48545)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1SsGTA-0002Ej-GV
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 12:54:25 -0400
Received: by bkty7 with SMTP id y7so3197731bkt.3
	for <10305 <at> debbugs.gnu.org>; Fri, 20 Jul 2012 09:48:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=91EXCO/iDs6rjAoByp26z+ZQMrvWWZPwtnI9kYyRu0M=;
	b=ORd4WKjQqhp+ZpcAo+i7QUA34LD+LvBR4BAzAZfo2Uvv/ti+q2HQxrGvfibJCtpBBN
	8ETsgqhXmcENme/UMr7z89ILUbxjzmvRKNRs+E0JdxR8MNsCY23EevpLxyyzrfcWJYHd
	zlvp0z8PiLDSCDTij24EB6ZvW/S9aF1cer49CDPMz6r5fG86jfTl8gOwqH+JhCBh/aUn
	dUi/HnaocR1RxhXAZJJAJxR7ndF804fMzQBdBqifF/yqB2hoQn/WMpJQ9RzAAlXfxj0q
	HGDkwe3Fq67H8bWE/A3911baWLPWa0dC8aMKa1r8JPqfVkfx+1QfpDC2KHShQZC1zn9j
	JAQg==
Received: by 10.204.156.73 with SMTP id v9mr3468091bkw.116.1342802885681;
	Fri, 20 Jul 2012 09:48:05 -0700 (PDT)
Received: from [192.168.178.21]
	(host105-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.105])
	by mx.google.com with ESMTPS id n5sm3130240bkv.14.2012.07.20.09.48.03
	(version=SSLv3 cipher=OTHER); Fri, 20 Jul 2012 09:48:04 -0700 (PDT)
Message-ID: <50098BBA.1040208@HIDDEN>
Date: Fri, 20 Jul 2012 18:47:54 +0200
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
	<50096FFF.6070101@HIDDEN>
	<003d01cd668b$01b52b30$051f8190$@schmitz-digital.de>
In-Reply-To: <003d01cd668b$01b52b30$051f8190$@schmitz-digital.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On 07/20/2012 05:19 PM, Joachim Schmitz wrote:
> I've been told that git needs python, and in a newer version, for
> getting it installed.
>
That is false; quoting the comments in the git Makefile:

  Define NO_PYTHON if you do not want Python scripts or libraries at all.

> Haven't verified that yet and as having newer version of Python
> is a good idea anyway, I started looking into that first.
> Unfortunately there are only 24 hours to a day ;-) 
> 
> Bye, Jojo
> 

HTH,
  Stefano




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 15:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 11:25:40 2012
Received: from localhost ([127.0.0.1]:52709 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsF5H-0000FT-Q2
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 11:25:40 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:59299)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsF5F-0000FM-MW
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 11:25:39 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0McM3H-1TB8kF1sxj-00JcXy; Fri, 20 Jul 2012 17:19:08 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Stefano Lattarini'" <stefano.lattarini@HIDDEN>
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
	<50096FFF.6070101@HIDDEN>
In-Reply-To: <50096FFF.6070101@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 17:19:06 +0200
Message-ID: <003d01cd668b$01b52b30$051f8190$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQGAa5NRZ7I/3+VeST7scFBjKP0pbAIgp0J6AgjDX/UC73RHypeTdusA
Content-Language: de
X-Provags-ID: V02:K0:stZPsE3PuUMv9FcH+Mo1KL15+5gILPsrmVYJ4634iwn
	YGQ3/k+X7fxsBsqd4yBQpmyI9IE9OhQB9nO+MPO9eok1H0Vqhq
	CmHdYWbX1sSUDiJPbbp8X+VCBuXH9Sunkq/9ZpjRs98Ec/TLeW
	1oOItadv03PxB4VzCSoGwaV7TSyKI4o2W8psisU3PtCLX0TeIe
	EbCUVe1VgieyknlluhediFAfF6kPfFvvwp8fbgzFTRgjrG22Sv
	vcJ43xK828/fcvgb+i+2BoCSGPq6c6borU0cfP8DxIUC4SeCnE
	QVJrftcI4lzZaodRPkK/KAd9ZB/IzJiLGGCRRG2neVH2o30vFd
	latbADlxLkBAH4LHP3+l8R8irMwqb/BtpZqx0jS3yhMi+8n4NL
	y174HuLyS7Glg==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Stefano Lattarini [mailto:stefano.lattarini@HIDDEN]
> Sent: Friday, July 20, 2012 4:50 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; 'Paul Eggert'; bug-gnulib@HIDDEN; 'Eric Blake';
> 10305 <at> debbugs.gnu.org; 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 07/20/2012 04:42 PM, Joachim Schmitz wrote:
> >
> > First I'd need to get git ported to NonStop, this is on my todolist
already.
> > Appare4ny git install needs Python
> >
> AFAIK, only some non-fundamental programs and features in the Git toolbox
> need python.  Most of git is perfectly usable without python.  I don't
know more
> details right away, and have little time to dig them up, sorry.  You might
try to
> ask on the Git list for help and guidance, it's usually very responsive
and
> helpful.

I've been told that git needs python, and in a newer version, for getting it
installed. Haven't verified that yet and as having newer version of Python
is a good idea anyway, I started looking into that first.
Unfortunately there are only 24 hours to a day ;-) 

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 15:01:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 11:01:08 2012
Received: from localhost ([127.0.0.1]:52681 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEhY-00087p-5Z
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 11:01:08 -0400
Received: from moutng.kundenserver.de ([212.227.17.9]:49654)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsEhV-00087h-RK
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 11:01:07 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0LenO7-1TduHS3wzf-00qhLx; Fri, 20 Jul 2012 16:54:38 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Eric Blake'" <eblake@HIDDEN>
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
	<50096FA2.1050807@HIDDEN>
In-Reply-To: <50096FA2.1050807@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 16:54:36 +0200
Message-ID: <003301cd6687$953d67e0$bfb837a0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQGAa5NRZ7I/3+VeST7scFBjKP0pbAIgp0J6AgjDX/UBT8K8y5egbTLg
Content-Language: de
X-Provags-ID: V02:K0:rocQ/YFTV35dQH+twtRWvfdoPffSvWDQHNXLxQ8ZzrR
	E/qbn5NEzN3Q6DY9ND5ubFaG9FJs3cI8Jjxi+1cHm6mSKcC4Xp
	3gscqlFwsqXEJLTe2vWiFf/bJ3kAkMuJILgmDpiy2223tekx5X
	q7+KMV0Wf2YuWmpu+RrjVxoGM1+yNwoLP81Eo1W4ErrniXhO3m
	j34E4WwwRGor53QfHkrVk+zbnx3DMCyN7pzgrpKtMRejXFlodA
	iLU5FMetTIVKEbQkV1xforfqzY2bK28JWjzA+b/yGtvz7JBtaD
	rU1a5/rEV+ZsTkCSYfRGV5pQggNrQb057kOwuaDdY8fbvopjWn
	pKUrNUSs++B1iTPnnJZJqLN7jwQYfT3F8w3e6v7cYagdjduFBV
	KRmBJJHWwEE0g==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Eric Blake [mailto:eblake@HIDDEN]
> Sent: Friday, July 20, 2012 4:48 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; 'Paul Eggert'; bug-gnulib@HIDDEN; nagendra.vs@HIDDEN;
> 10305 <at> debbugs.gnu.org; 'Schmitz, Joachim'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 07/20/2012 08:42 AM, Joachim Schmitz wrote:
> >>> Huh? 8.17 is old? It's the latest I could get and still has src/su.c.
> >>> Anyway, that patch isn't needed for NonStop anyway, as we need an
> >>> entirely different authentication method.
> >>
> >> It's removed in git, for the upcoming 8.18 release.
> >> When you (or anyone) submit patches, we prefer that they be against
> >> the
> > latest
> >> in git.  See the file, HACKING, for coreutils contribution guidelines.
> >
> > First I'd need to get git ported to NonStop, this is on my todolist
already.
> 
> Do you have shared network drives?  It is sufficient to do a git checkout
on
> another system where git is already ported, then copy the files over to
your
> nonstop system, without you having to directly port git to nonstop.

Well, Samba is ported (and pretty current too), but the box I'm doing the
ports on is behind a firewall and I have only ssh access. And from there
http and ftp to the outside world, so I usually use wget to pull packages.
Furthermore the ports should be on a stable release

I'll look into the git business. Just a few weeks ago I started using GitHub
for some other project and really start to like it.

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:57:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:57:07 2012
Received: from localhost ([127.0.0.1]:52675 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEdf-00081Y-Me
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:57:07 -0400
Received: from mx.meyering.net ([88.168.87.75]:43036)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsEdd-00081R-Ps
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:57:06 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 49F1F60A48;
	Fri, 20 Jul 2012 16:50:47 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 16:42:26 +0200")
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 16:50:47 +0200
Message-ID: <87wr1y8p14.fsf@HIDDEN>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Eric Blake' <eblake@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
...
>> You can make it easier for us to process your coreutils patches by
> separating
>> them into conceptually-related sets, with commit log entries following
>> HACKING's guidelines.
>
> OK, will try in futur...
>
> Would you accept git pull requests?

Sure, but please also post the content of each commit to the mailing list.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:56:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:56:02 2012
Received: from localhost ([127.0.0.1]:52671 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEcc-0007zz-7j
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:56:02 -0400
Received: from mail-bk0-f44.google.com ([209.85.214.44]:42725)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <stefano.lattarini@HIDDEN>) id 1SsEcZ-0007za-KD
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:56:00 -0400
Received: by bkty7 with SMTP id y7so3077561bkt.3
	for <10305 <at> debbugs.gnu.org>; Fri, 20 Jul 2012 07:49:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=message-id:date:from:mime-version:to:cc:subject:references
	:in-reply-to:content-type:content-transfer-encoding;
	bh=RVaraLN4CYqWgDurScUy0uvmLvGDIYXrEO5a8q+Nd84=;
	b=yDccSjcbWirqzcOLVlMcskyirzvPSxPbAo27EeCwWSUdfCN5wRp/sfbIlcrfizFgbU
	D+ix5CYpT7Jr0pF9IMnCOIg0fEA7Cd6v+gJFnqHucDZVTXbCr6HVFkRbxA++nJUYY+a4
	ZJ/5qtH4YrPzNg8gFn8oJwo0fPMpuZFrAz4g+pB3DAMEfyWMJ7TXjcoJ2Hciu4tHsAkm
	tcmxfrtbQtro2tIEyAp+uW/GRpxxIqad3xsdA2Q89NerKC9gwgtyrFRxjJgneAuns4cR
	k8EKc4wnh7tVjSSxBl8599yhlbbB0OaAawMtUY+uNw5hN4jbrvrBmPS4l9fEDdanOW3i
	uR7w==
Received: by 10.204.133.196 with SMTP id g4mr3317280bkt.89.1342795781363;
	Fri, 20 Jul 2012 07:49:41 -0700 (PDT)
Received: from [192.168.178.21]
	(host105-96-dynamic.4-87-r.retail.telecomitalia.it. [87.4.96.105])
	by mx.google.com with ESMTPS id z19sm2974962bkw.10.2012.07.20.07.49.38
	(version=SSLv3 cipher=OTHER); Fri, 20 Jul 2012 07:49:40 -0700 (PDT)
Message-ID: <50096FFF.6070101@HIDDEN>
Date: Fri, 20 Jul 2012 16:49:35 +0200
From: Stefano Lattarini <stefano.lattarini@HIDDEN>
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
In-Reply-To: <002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.6 (--)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, 'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.6 (--)

On 07/20/2012 04:42 PM, Joachim Schmitz wrote:
> 
> First I'd need to get git ported to NonStop, this is on my todolist already.
> Appare4ny git install needs Python
>
AFAIK, only some non-fundamental programs and features in the Git toolbox
need python.  Most of git is perfectly usable without python.  I don't know
more details right away, and have little time to dig them up, sorry.  You
might try to ask on the Git list for help and guidance, it's usually very
responsive and helpful.

HTH,
  Stefano




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:54:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:54:34 2012
Received: from localhost ([127.0.0.1]:52667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEbB-0007xf-PJ
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:54:34 -0400
Received: from mx1.redhat.com ([209.132.183.28]:31342)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eblake@HIDDEN>) id 1SsEb9-0007xW-FE
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:54:33 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
	(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6KEm5Ww011513
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 20 Jul 2012 10:48:05 -0400
Received: from [10.3.113.102] (ovpn-113-102.phx2.redhat.com [10.3.113.102])
	by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id q6KEm4Rd005732; Fri, 20 Jul 2012 10:48:04 -0400
Message-ID: <50096FA2.1050807@HIDDEN>
Date: Fri, 20 Jul 2012 08:48:02 -0600
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
	<002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
In-Reply-To: <002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
X-Enigmail-Version: 1.4.3
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig593DD018C7CBA4662E2C7E4A"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -6.9 (------)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig593DD018C7CBA4662E2C7E4A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 07/20/2012 08:42 AM, Joachim Schmitz wrote:
>>> Huh? 8.17 is old? It's the latest I could get and still has src/su.c.=

>>> Anyway, that patch isn't needed for NonStop anyway, as we need an
>>> entirely different authentication method.
>>
>> It's removed in git, for the upcoming 8.18 release.
>> When you (or anyone) submit patches, we prefer that they be against th=
e
> latest
>> in git.  See the file, HACKING, for coreutils contribution guidelines.=

>=20
> First I'd need to get git ported to NonStop, this is on my todolist alr=
eady.

Do you have shared network drives?  It is sufficient to do a git
checkout on another system where git is already ported, then copy the
files over to your nonstop system, without you having to directly port
git to nonstop.

>=20
> Would you accept git pull requests?

They certainly make it easier to review large patch series.

--=20
Eric Blake   eblake@HIDDEN    +1-919-301-3266
Libvirt virtualization library http://libvirt.org




--------------enig593DD018C7CBA4662E2C7E4A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJQCW+jAAoJEKeha0olJ0NqvVEIAJNxZ+Y0v05KmQVVKFWavGR4
uskERMin/o2jisA63vZZWVjIYni1LK5jwVJXauevmpQSUrb0BR2BwxatlJLKDXAK
jsjYakFzUUXBHFba6FhMxEjAxSjyXY78nLUxpyExBtgzTEilc62LqmpoOK6V+2bF
ly2lvzMV6900j+mN4mjvIiTC4uEnt+vMbkZlshaWx3Ki/e8WuRct8mZaM1gnkVn7
2hK5i/RMVVflj1apijrcVjPYZ+vwiUdQg7OvKT7a6a/IjDnG6Fv52hFbXGoISv9t
a5kKSNLp1Au7rGOwCQlmoJTzcPOUMtbWxb+/8zubCdZ5zOb645/QKfSHvBTzpTg=
=ZPZu
-----END PGP SIGNATURE-----

--------------enig593DD018C7CBA4662E2C7E4A--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:49:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:49:02 2012
Received: from localhost ([127.0.0.1]:52649 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEVq-0007py-Bt
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:49:02 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:56855)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsEVn-0007pX-8K
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:49:00 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0MLmZb-1SsVOK40sF-000qyf; Fri, 20 Jul 2012 16:42:28 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
	<87394ma4mr.fsf@HIDDEN>
In-Reply-To: <87394ma4mr.fsf@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 16:42:26 +0200
Message-ID: <002b01cd6685$e22288d0$a6679a70$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQGAa5NRZ7I/3+VeST7scFBjKP0pbAIgp0J6l7suHBA=
Content-Language: de
X-Provags-ID: V02:K0:hp6+1RvZkIPB1vwI8jsAUSTP7sWDHIxJk0P0PVkJ6CU
	+b5RRPnfpIvf6B+D3TnS9kkFPj7+44AbZmJDl7H35s3CHiQoZo
	kCGDec+PoGiJ+fhqLiWcjWJB9CpCzF0P/Gbl4UEWd54zKIULl0
	2VM+MsHe0M1afGiPeDWRf7pDw0Jp91MvVvwjH+LLR23nxkhUit
	cEIoNzK5vyTLQeZhY4JoLRRZo9bXQ5bUdZVzG18DsbBrq62wtb
	LJV7fRhyBGq2OYGJFQyucVKY9Fyby4gWw6GLrzBoL8CUX8UJ61
	umG5uX3u7Ut5v2HUE33pKztx0/6usva2aqDIq2b9cLNygZ6rX2
	/NU3mjTPICtLh7lriLN/TPb5QeazIbHowJK8qIUj7NvPlTofLJ
	URHzPvxbrZPeA==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Eric Blake' <eblake@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> -----Original Message-----
> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, July 20, 2012 4:28 PM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; bug-gnulib@HIDDEN; nagendra.vs@HIDDEN;
> 10305 <at> debbugs.gnu.org; 'Schmitz, Joachim'; 'Eric Blake'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> >> However, note that you're using an old version of coreutils.  In the
> > latest, su.c
> >> has been removed so you can drop the patches to that file.
> >
> > Huh? 8.17 is old? It's the latest I could get and still has src/su.c.
> > Anyway, that patch isn't needed for NonStop anyway, as we need an
> > entirely different authentication method.
> 
> It's removed in git, for the upcoming 8.18 release.
> When you (or anyone) submit patches, we prefer that they be against the
latest
> in git.  See the file, HACKING, for coreutils contribution guidelines.

First I'd need to get git ported to NonStop, this is on my todolist already.
Appare4ny git install needs Python and a new one as had been ported, so that
one's needed first (started that one just yesterday, looks like a relative
easy port so far) and who knows what else is needed...

> >> If no one gets back to you on the other coreutils-specific pieces in
> >> two
> > or three
> >> weeks, please feel free to ping us at coreutils@HIDDEN
> >
> > OK, I'll check, after my vacation.
> 
> You can make it easier for us to process your coreutils patches by
separating
> them into conceptually-related sets, with commit log entries following
> HACKING's guidelines.

OK, will try in futur...

Would you accept git pull requests?

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:34:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:34:48 2012
Received: from localhost ([127.0.0.1]:52645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsEI4-0007Ur-4V
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:34:48 -0400
Received: from mx.meyering.net ([88.168.87.75]:42966)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsEI2-0007Uk-O3
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:34:47 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 0403B608FE;
	Fri, 20 Jul 2012 16:28:28 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 16:13:00 +0200")
References: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 16:28:28 +0200
Message-ID: <87394ma4mr.fsf@HIDDEN>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Eric Blake' <eblake@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
>> However, note that you're using an old version of coreutils.  In the
> latest, su.c
>> has been removed so you can drop the patches to that file.
>
> Huh? 8.17 is old? It's the latest I could get and still has src/su.c.
> Anyway, that patch isn't needed for NonStop anyway, as we need an entirely
> different authentication method.

It's removed in git, for the upcoming 8.18 release.
When you (or anyone) submit patches, we prefer that
they be against the latest in git.  See the file, HACKING,
for coreutils contribution guidelines.

>> If no one gets back to you on the other coreutils-specific pieces in two
> or three
>> weeks, please feel free to ping us at coreutils@HIDDEN
>
> OK, I'll check, after my vacation.

You can make it easier for us to process your coreutils patches
by separating them into conceptually-related sets, with commit log
entries following HACKING's guidelines.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:24:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:24:14 2012
Received: from localhost ([127.0.0.1]:52638 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsE7n-0007Fh-Bg
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:24:13 -0400
Received: from moutng.kundenserver.de ([212.227.126.171]:64391)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsE7k-0007FW-Qj
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:24:09 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis)
	id 0M9cIl-1T0AFf1hhX-00CzNv; Fri, 20 Jul 2012 16:17:48 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN> 
In-Reply-To: 
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 16:17:46 +0200
Message-ID: <002a01cd6682$7048c010$50da4030$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cAA1maGRAKxjBelApqUAp6W/TCAMIAMtviwgBgCoBA=
Content-Language: de
X-Provags-ID: V02:K0:xY9MFwHx/FVjt+GL4uAFY7oHPtMNKwbx8c1B/Fhu3wz
	Nsn6NmydR/L9M/61vKEnyuHQK+UTiwzDfb5pyQGePidhmgIIAL
	fbrpW+9hl576WE268WQpFdfZF5TiZcRd+R8YZnBhOOq+6whroJ
	rnUPT9U76lyCGs49ZcwYaiF20M34CKmP0haBtTQBwQ+p+adYMW
	tQeVDElgGnJHWdAUW3Z+R/MjW6CDahefD5YgArwXY3N2ePSJsl
	iKaygNHvxKxocqUpAdU7PBItk9xXe0I8M59wcIYcAeL0me6eEp
	Wp0sk3nkztUT6i9a0M3fAaLTBIHLnFqzLVZ7ezT6hdXZSAOFkU
	/7i0wSuKLbWXq5S2G5VIoZYczOj8KkYWbSXIz5NYh7ZuwLnCrr
	kAcaDFXu0/gfA==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: bug-gnulib@HIDDEN, nagendra.vs@HIDDEN, 'Jim Meyering' <jim@HIDDEN>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> Sent: Thursday, July 19, 2012 7:54 PM
<snip>
> After quite a few iterations and with integrating the things you =
already fixed for
> the next releases of gnulib, coreuitls and tar, we finally got it =
running fine for
> coreutils-8.15. Doing the equivalent changes (not 100% identical, the =
coreutils
> resp. gnulib code had changed and reshuffled quite a bit) lead us into =
an
> endless recursion (well as endless as the stack could grow without =
aborting).
> After quite some effort in debugging, Nagendra finally found the =
culprit: in 8.15
> configure checks for several functions to be declared without a macro, =
one of
> them is getcwd(), and then puts a #define HAVE_RAW_DECL_GETCWD into
> config.h. Coreutils-8.17 doesn't have that check anymore, hence =
doesn't set
> that define and then in getcwd.c enters that endless recursion loop: =
getcwd(),
> openat(), rpl_open(), get_name(), getcwd() ....
>=20
> Our (temp.?) fix is to add an "|| __TANDEM" to lib/getcwd.c, line 138.

Nagandra had another concern, but couldn't email, it got filtered =
apparently?
----snip---
Was doing more code study on the getcwd problem,

The coreutils config.hin in 8.17 no more defines any of RAW_DECL_* =
functions, which were present in 8.15. Can we expect more problems =
because of this?

Thanks & Regards
Nagendra.V.S
---snip---

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:19:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:19:37 2012
Received: from localhost ([127.0.0.1]:52633 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsE3M-00079B-MU
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:19:36 -0400
Received: from moutng.kundenserver.de ([212.227.126.187]:58012)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsE3K-000793-9y
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:19:35 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0MYYR3-1TMexo2Bkn-00VBmd; Fri, 20 Jul 2012 16:13:02 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 16:13:00 +0200
Message-ID: <002801cd6681$c5713f00$5053bd00$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Ac1mgbE0Q/GcmPJaRnSt1+YOdthBrw==
Content-Language: de
X-Provags-ID: V02:K0:adw2dL+PB5K5YQB4Ky/Zo/v5KA00iSEPS1n7Or5E7St
	gnNggxepl4HFvHGHIee3q5WJCFixM2pgnukXgLKWT1MfqFM8wP
	sTXmVcezqXxTrSihENf6HhwmgEAbw1Ehz8kQNTVYAeyNuoMQ3S
	S1EPRZPColHU6M69FiNBui2qOlUAFazTyC9a/X3LX4FYKuAiXc
	isF96/hRBAiRJDXyoDgedryJori8wiF3D1gipEKYHGNDfXPGYQ
	/eKQdW+RJ2tOyHCYe+XYZlO4kx9Y7DLeBZIKkcjKJ52BzNb/MF
	YNpD6VORNuWdxBUosQEfYdRf1+FosmE0hctRqjEFEeZwmZvaOO
	zE8kRIsATbmZ3UN6Lfi9rgmogCab8jtPvfDFzQotii/eAyGBRs
	nIWYAWaFx+wsw==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Eric Blake' <eblake@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)


> -----Original Message-----
> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, July 20, 2012 4:07 PM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; bug-gnulib@HIDDEN; nagendra.vs@HIDDEN;
> 10305 <at> debbugs.gnu.org; 'Schmitz, Joachim'; 'Eric Blake'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> 
> >> From: Jim Meyering [mailto:jim@HIDDEN]
> >> Sent: Friday, July 20, 2012 3:48 PM
> >> To: Joachim Schmitz
> >> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
> > Blake';
> >> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> >> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> >>
> >> Joachim Schmitz wrote:
> >> ...
> >> > I just saw that my patch removed 2 functions more than your's, mine
> >> > also removes cache_stat_ok() and is_nondir_lstat().
> >> > Intention? Used where?
> >>
> >> Hah!  I should have temporarily defined-away "inline" to be sure I'd
> > removed
> >> all of them -- then gcc warns about each defined-but-not-used function.
> > I've
> >> just done that.  Those two in remove.c are the only ones in src/.
> >>
> >> As penance, I'll do this one for you, too.
> >
> > ;-) Thanks!
> >
> > Is anyone looking into my other patches too?
> 
> I don't know.
> 
> However, note that you're using an old version of coreutils.  In the
latest, su.c
> has been removed so you can drop the patches to that file.

Huh? 8.17 is old? It's the latest I could get and still has src/su.c.
Anyway, that patch isn't needed for NonStop anyway, as we need an entirely
different authentication method.

> If no one gets back to you on the other coreutils-specific pieces in two
or three
> weeks, please feel free to ping us at coreutils@HIDDEN

OK, I'll check, after my vacation.





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:13:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:13:17 2012
Received: from localhost ([127.0.0.1]:52629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsDxE-00070Y-Tf
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:13:17 -0400
Received: from mx.meyering.net ([88.168.87.75]:42901)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsDxC-00070R-2Z
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:13:15 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 07FCF6070E;
	Fri, 20 Jul 2012 16:06:56 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002401cd667e$dbe40a40$93ac1ec0$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 15:52:09 +0200")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
	<002301cd667d$20607570$61216050$@schmitz-digital.de>
	<87pq7qa6if.fsf@HIDDEN>
	<002401cd667e$dbe40a40$93ac1ec0$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 16:06:56 +0200
Message-ID: <87eho6a5mn.fsf@HIDDEN>
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN,
	'Eric Blake' <eblake@HIDDEN>, 10305 <at> debbugs.gnu.org,
	"'Schmitz, Joachim'" <schmitz@HIDDEN>, nagendra.vs@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:

>> From: Jim Meyering [mailto:jim@HIDDEN]
>> Sent: Friday, July 20, 2012 3:48 PM
>> To: Joachim Schmitz
>> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
> Blake';
>> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
>> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>>
>> Joachim Schmitz wrote:
>> ...
>> > I just saw that my patch removed 2 functions more than your's, mine
>> > also removes cache_stat_ok() and is_nondir_lstat().
>> > Intention? Used where?
>>
>> Hah!  I should have temporarily defined-away "inline" to be sure I'd
> removed
>> all of them -- then gcc warns about each defined-but-not-used function.
> I've
>> just done that.  Those two in remove.c are the only ones in src/.
>>
>> As penance, I'll do this one for you, too.
>
> ;-) Thanks!
>
> Is anyone looking into my other patches too?

I don't know.

However, note that you're using an old version
of coreutils.  In the latest, su.c has been removed
so you can drop the patches to that file.

If no one gets back to you on the other coreutils-specific
pieces in two or three weeks, please feel free to ping us at
coreutils@HIDDEN




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 14:00:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 10:00:46 2012
Received: from localhost ([127.0.0.1]:52620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsDl8-0006js-Do
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:00:46 -0400
Received: from mx.meyering.net ([88.168.87.75]:42858)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsDl5-0006jl-T7
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 10:00:44 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 021AE606F5;
	Fri, 20 Jul 2012 15:54:26 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002301cd667d$20607570$61216050$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 15:39:45 +0200")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
	<002301cd667d$20607570$61216050$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 15:54:25 +0200
Message-ID: <87k3xya67i.fsf@HIDDEN>
Lines: 61
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
...
> I just saw that my patch removed 2 functions more than your's, mine also
> removes cache_stat_ok() and is_nondir_lstat().
> Intention? Used where?

Here's the patch:

From c1263bb95e8ff84e819753c9050b96d16441aa81 Mon Sep 17 00:00:00 2001
From: Joachim Schmitz <jojo@HIDDEN>
Date: Fri, 20 Jul 2012 15:52:10 +0200
Subject: [PATCH] maint: rm: remove two more unused static inline functions

* src/remove.c (cache_stat_ok, is_nondir_lstat): Remove unused
functions.
---
 src/remove.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/src/remove.c b/src/remove.c
index 42f2063..5ebd2ce 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -88,13 +88,6 @@ cache_stat_init (struct stat *st)
   return st;
 }

-/* Return true if *ST has been statted successfully.  */
-static inline bool
-cache_stat_ok (struct stat *st)
-{
-  return (0 <= st->st_size);
-}
-
 /* Return 1 if FILE is an unwritable non-symlink,
    0 if it is writable or some other type of file,
    -1 and set errno if there is some problem in determining the answer.
@@ -304,21 +297,6 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
   return RM_OK;
 }

-/* Return true if FILENAME is a non-directory.
-   Otherwise, including the case in which lstat fails, return false.
-   *ST is FILENAME's tstatus.
-   Do not modify errno.  */
-static inline bool
-is_nondir_lstat (int fd_cwd, char const *filename, struct stat *st)
-{
-  int saved_errno = errno;
-  bool is_non_dir =
-    (cache_fstatat (fd_cwd, filename, st, AT_SYMLINK_NOFOLLOW) == 0
-     && !S_ISDIR (st->st_mode));
-  errno = saved_errno;
-  return is_non_dir;
-}
-
 /* When a function like unlink, rmdir, or fstatat fails with an errno
    value of ERRNUM, return true if the specified file system object
    is guaranteed not to exist;  otherwise, return false.  */
--
1.7.11.2.194.g7bdb748




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 13:58:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 09:58:43 2012
Received: from localhost ([127.0.0.1]:52616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsDj8-0006gC-Hl
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:58:43 -0400
Received: from moutng.kundenserver.de ([212.227.126.171]:54282)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsDj6-0006g5-F8
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:58:41 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0M2Yvh-1Tjuk32Ucf-00sESG; Fri, 20 Jul 2012 15:52:11 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>	<4EEB9235.9090902@HIDDEN>	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>	<4EEBE1C9.20807@HIDDEN>	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>	<4EEE6800.2030409@HIDDEN>	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>	<4EEF7447.2060801@HIDDEN>	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>	<87sjkdaoz2.fsf@HIDDEN>
	<4EF2090E.5090108@HIDDEN>	<4EF2287C.8040009@HIDDEN>	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>	<4EF2F52E.1040804@HIDDEN>	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>	<4FEA5878.6010407@HIDDEN>	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>	<87d33qbogx.fsf@HIDDEN>	<002301cd667d$20607570$61216050$@schmitz-digital.de>
	<87pq7qa6if.fsf@HIDDEN>
In-Reply-To: <87pq7qa6if.fsf@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 15:52:09 +0200
Message-ID: <002401cd667e$dbe40a40$93ac1ec0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwL8vwCEASdzD2IBuzCQ4QFOg/R4Apo5ZfMB5v6whgJyt8DoAlY49bgBPB1V5AInEJHlAdvrCscBm4dspAGZNkBnAUKJT/gCW8DVwAKxjBelApqUAp4CQhHJtQKIK0LkAd3y4g4BOeHyvpdIJmuA
Content-Language: de
X-Provags-ID: V02:K0:910UQUK1LENQask6XZgp1LzbXWen7ttduKrzcR2ikcj
	H/FFr3k5/U89nN/x3+Y3gKwsylfSs5lX4gpuew2t/7iGuZWKVZ
	GAePS8NnSE3f+nDbs6lagUBzTigwd4WEyYuxSYTcyddc7dbZNI
	kxwKKRAivg3rZRWTGBbF7TwKrah9RZGjKOC0aKd1cyYGSE5Cfd
	jnZPZ1WTEvKugit+Uisal+Tlmcne3iQ7pRMp0ZjXEzLApXLVNU
	KtAeQWXhHQGQ4XRreGwHOmqRMWEcK8n+KFEWN+fLxQSqmzFDN/
	zb+Roq1EfZsz1ty5JqpwGugWif+l9uh/4vL6RpolyQSp/k04he
	xY1iqNO0wKBJvBy6LY7fw46PSNRON6/+WR/pkrWbjCxAvqKjIR
	TmX7jYmYk9SIg==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, July 20, 2012 3:48 PM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
Blake';
> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> ...
> > I just saw that my patch removed 2 functions more than your's, mine
> > also removes cache_stat_ok() and is_nondir_lstat().
> > Intention? Used where?
> 
> Hah!  I should have temporarily defined-away "inline" to be sure I'd
removed
> all of them -- then gcc warns about each defined-but-not-used function.
I've
> just done that.  Those two in remove.c are the only ones in src/.
> 
> As penance, I'll do this one for you, too.

;-) Thanks!

Is anyone looking into my other patches too?





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 13:54:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 09:54:14 2012
Received: from localhost ([127.0.0.1]:52132 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsDeo-0006Te-1N
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:54:14 -0400
Received: from mx.meyering.net ([88.168.87.75]:42835)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsDel-0006TW-CM
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:54:12 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 69053606B9;
	Fri, 20 Jul 2012 15:47:52 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002301cd667d$20607570$61216050$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 15:39:45 +0200")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
	<002301cd667d$20607570$61216050$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 15:47:52 +0200
Message-ID: <87pq7qa6if.fsf@HIDDEN>
Lines: 12
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
...
> I just saw that my patch removed 2 functions more than your's, mine also
> removes cache_stat_ok() and is_nondir_lstat().
> Intention? Used where?

Hah!  I should have temporarily defined-away "inline" to be sure I'd
removed all of them -- then gcc warns about each defined-but-not-used
function.  I've just done that.  Those two in remove.c are the only
ones in src/.

As penance, I'll do this one for you, too.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 13:46:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 09:46:17 2012
Received: from localhost ([127.0.0.1]:52114 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsDX6-0006Ia-Io
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:46:16 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:57834)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsDX3-0006IS-L7
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:46:15 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0M8FxW-1To0ki1vSk-00vxOf; Fri, 20 Jul 2012 15:39:47 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>	<4EEB4AC0.30401@HIDDEN>	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>	<4EEB9235.9090902@HIDDEN>	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>	<4EEBE1C9.20807@HIDDEN>	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>	<4EEE6800.2030409@HIDDEN>	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>	<4EEF7447.2060801@HIDDEN>	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>	<87sjkdaoz2.fsf@HIDDEN>
	<4EF2090E.5090108@HIDDEN>	<4EF2287C.8040009@HIDDEN>	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>	<4EF2F52E.1040804@HIDDEN>	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>	<4FEA5878.6010407@HIDDEN>	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
In-Reply-To: <87d33qbogx.fsf@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 15:39:45 +0200
Message-ID: <002301cd667d$20607570$61216050$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cACsYwXpQKalAKeAkIRybUCiCtC5Jc5IAqQ
Content-Language: de
X-Provags-ID: V02:K0:Spyn5Q9L0JvcpfJQqWwrBc/Fq2sD2YokjXdv0Sg+l3L
	5E3m94oWzNqFSj9Jq/sZcXDaxFCixSKXWPrNbbfWBCSm1aPLBw
	p2mWtClTitbdFOVaszf0E3QSennwD2GXLRviF/+qJNXXxp7/Rv
	QMGsAh7VyAaqtqfALCpk+7EY5RYpL29u3FQBrTPpgCuysStuTH
	Utxjsk7+ttdoSkiecX7W6h4oPujH5nsAWYpogPNwyTOe5281GT
	ay2TLZtdZjlOpgq2twO0yehIO/NKXsb8dfsMCvLZRcTwloNrnd
	pJ8MmAt9Yj0UPt/i7J+RASZCpaMLEiwQxdu9Eq8MA4/atfYlwO
	5RUktwup0lhI7z4CkzGSegXFPIF0OxorZDYxBpb8INVfshdreT
	MfNIMbzLi3y7A==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, July 20, 2012 2:35 PM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
Blake';
> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> ...
> > I've disable a bit of apparently dead code in src/remove.c
> ...
> > /usr/local/bin/diff -EBbu ./src/remove.c.orig ./src/remove.c
> > --- ./src/remove.c.orig	2012-05-01 15:55:08 -0500
> > +++ ./src/remove.c	2012-06-18 10:06:04 -0500
> > @@ -88,6 +88,7 @@
> >    return st;
> >  }
> >
> > +#ifndef __TANDEM /* not used anywhere */
> >  /* Return true if *ST has been statted.  */
> >  static inline bool
> >  cache_statted (struct stat *st)
> > @@ -101,6 +102,7 @@
> >  {
> >    return (0 <= st->st_size);
> >  }
> > +#endif /* !__TANDEM */
> >
> >  /* Return 1 if FILE is an unwritable non-symlink,
> >     0 if it is writable or some other type of file,
> > @@ -311,6 +313,7 @@
> >    return RM_OK;
> >  }
> >
> > +#ifndef __TANDEM
> >  /* Return true if FILENAME is a directory (and not a symlink to a
directory).
> >     Otherwise, including the case in which lstat fails, return false.
> >     *ST is FILENAME's tstatus.
> > @@ -340,6 +343,7 @@
> >    errno = saved_errno;
> >    return is_non_dir;
> >  }
> > +#endif /* !__TANDEM */
> >
> >  /* When a function like unlink, rmdir, or fstatat fails with an errno
> >     value of ERRNUM, return true if the specified file system object
> 
> Thanks.  I've simply removed those unused functions
> and wrote a commit log entry for you.
> 
> I'll wait for an ACK from you before pushing this,
> since you're listed as the author:
> 
> 
> From 033b669f50e3ef4de7ba5598c0b036069bd56778 Mon Sep 17 00:00:00
> 2001
> From: Joachim Schmitz <jojo@HIDDEN>
> Date: Fri, 20 Jul 2012 14:32:53 +0200
> Subject: [PATCH] maint: rm: remove unused static-inlined functions
> 
> * src/remove.c (cache_statted, is_dir_lstat): Remove unused
> static-inlined functions.
> Copyright-paperwork-exempt: Yes
> ---
>  src/remove.c | 22 ----------------------
>  1 file changed, 22 deletions(-)
> 
> diff --git a/src/remove.c b/src/remove.c
> index f44a982..42f2063 100644
> --- a/src/remove.c
> +++ b/src/remove.c
> @@ -88,13 +88,6 @@ cache_stat_init (struct stat *st)
>    return st;
>  }
> 
> -/* Return true if *ST has been statted.  */
> -static inline bool
> -cache_statted (struct stat *st)
> -{
> -  return (st->st_size != -1);
> -}
> -
>  /* Return true if *ST has been statted successfully.  */
>  static inline bool
>  cache_stat_ok (struct stat *st)
> @@ -311,21 +304,6 @@ prompt (FTS const *fts, FTSENT const *ent, bool
is_dir,
>    return RM_OK;
>  }
> 
> -/* Return true if FILENAME is a directory (and not a symlink to a
directory).
> -   Otherwise, including the case in which lstat fails, return false.
> -   *ST is FILENAME's tstatus.
> -   Do not modify errno.  */
> -static inline bool
> -is_dir_lstat (int fd_cwd, char const *filename, struct stat *st)
> -{
> -  int saved_errno = errno;
> -  bool is_dir =
> -    (cache_fstatat (fd_cwd, filename, st, AT_SYMLINK_NOFOLLOW) == 0
> -     && S_ISDIR (st->st_mode));
> -  errno = saved_errno;
> -  return is_dir;
> -}
> -
>  /* Return true if FILENAME is a non-directory.
>     Otherwise, including the case in which lstat fails, return false.
>     *ST is FILENAME's tstatus.
> --
> 1.7.11.2.249.g31c7954

I just saw that my patch removed 2 functions more than your's, mine also
removes cache_stat_ok() and is_nondir_lstat().
Intention? Used where?

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 13:20:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 09:20:16 2012
Received: from localhost ([127.0.0.1]:52081 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsD7v-0005iX-Qv
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:20:16 -0400
Received: from mx.meyering.net ([88.168.87.75]:42743)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsD7s-0005iP-Q1
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:20:14 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DBE1160169;
	Fri, 20 Jul 2012 15:13:53 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <001f01cd6677$06d64720$1482d560$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 20 Jul 2012 14:56:05 +0200")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
	<001f01cd6677$06d64720$1482d560$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 15:13:53 +0200
Message-ID: <871uk6bmni.fsf@HIDDEN>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:

>> From: Jim Meyering [mailto:jim@HIDDEN]
>> Sent: Friday, July 20, 2012 2:35 PM
>> To: Joachim Schmitz
>> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
> Blake';
>> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
>> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>>
>> Joachim Schmitz wrote:
>> ...
>> > I've disable a bit of apparently dead code in src/remove.c
> ...
>> Thanks.  I've simply removed those unused functions and wrote a commit log
>> entry for you.
>>
>> I'll wait for an ACK from you before pushing this, since you're listed as
> the
>> author:
>
> ACK ;-)

Thanks.
I also removed your name from THANKS.in (otherwise a syntax-check rule
would ding me).  That sounds odd only when you don't realize that
commit authors are not listed there because we generate those names
automatically from git.

For more explanation, see the comments in THANKS.in.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 13:02:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 09:02:33 2012
Received: from localhost ([127.0.0.1]:52077 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsCqn-0005L3-6o
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:02:33 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:54461)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SsCqj-0005Ku-BO
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 09:02:30 -0400
Received: from DualCore (dsdf-4db5d819.pool.mediaWays.net [77.181.216.25])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0Lj7Eo-1TQzs03eT0-00chro; Fri, 20 Jul 2012 14:56:07 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>	<4EEB4AC0.30401@HIDDEN>	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>	<4EEB9235.9090902@HIDDEN>	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>	<4EEBE1C9.20807@HIDDEN>	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>	<4EEE6800.2030409@HIDDEN>	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>	<4EEF7447.2060801@HIDDEN>	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>	<87sjkdaoz2.fsf@HIDDEN>
	<4EF2090E.5090108@HIDDEN>	<4EF2287C.8040009@HIDDEN>	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>	<4EF2F52E.1040804@HIDDEN>	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>	<4FEA5878.6010407@HIDDEN>	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
	<87d33qbogx.fsf@HIDDEN>
In-Reply-To: <87d33qbogx.fsf@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 20 Jul 2012 14:56:05 +0200
Message-ID: <001f01cd6677$06d64720$1482d560$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cACsYwXpQKalAKeAkIRybUCiCtC5Jc5FBYQ
Content-Language: de
X-Provags-ID: V02:K0:jT7qdXTiRby0qBLarPd+/LafzgreqM0EHTDXAmNdK6B
	p0HDOqQqU/gT5c06fh5PlDoleYau8eb8XxHU6G+7oPCumY/6NA
	s/bnSVOW+CCv5TJtuYgz8M5LfN1KsTYJCUAnQOUVo6+fYxVJ+w
	OJdzpGpt6timOBBFN1j1gckXmJ0crutA20AGFIJCqXWymGFX6y
	IdEmzk+/5kMJaXO4B5ed0xVCClDmzqQ0lLZbwenbgHjkRxACiQ
	xA+BfhHurIMHHD2bo5Zur09My8xjLjR+w1Ju22RctvUhdJd+N8
	aDlgxi2xa+u+0OxFPYwFwSRCfaTM84QpmGCgr0t0o1HX+LG20q
	VumVvhr4ibVXZjjI9JIW7qetq3psX5XeUTLWG/9vF5nLYCpwOi
	O/+twpnp+0hgQ==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, July 20, 2012 2:35 PM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric
Blake';
> 'Schmitz, Joachim'; nagendra.vs@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> ...
> > I've disable a bit of apparently dead code in src/remove.c
...
> Thanks.  I've simply removed those unused functions and wrote a commit log
> entry for you.
> 
> I'll wait for an ACK from you before pushing this, since you're listed as
the
> author:

ACK ;-)

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 20 Jul 2012 12:41:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 20 08:41:01 2012
Received: from localhost ([127.0.0.1]:52056 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SsCVx-0004pU-7M
	for submit <at> debbugs.gnu.org; Fri, 20 Jul 2012 08:41:01 -0400
Received: from mx.meyering.net ([88.168.87.75]:42640)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>) id 1SsCVt-0004pL-If
	for 10305 <at> debbugs.gnu.org; Fri, 20 Jul 2012 08:40:59 -0400
Received: from rho.meyering.net (rho.meyering.net [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id E0A65600E3;
	Fri, 20 Jul 2012 14:34:38 +0200 (CEST)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <001501cd65d7$766d9700$6348c500$@schmitz-digital.de> (Joachim
	Schmitz's message of "Thu, 19 Jul 2012 19:53:53 +0200")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
	<001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
Date: Fri, 20 Jul 2012 14:34:38 +0200
Message-ID: <87d33qbogx.fsf@HIDDEN>
Lines: 101
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 'Paul Eggert' <eggert@HIDDEN>, bug-gnulib@HIDDEN, nagendra.vs@HIDDEN,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
...
> I've disable a bit of apparently dead code in src/remove.c
...
> /usr/local/bin/diff -EBbu ./src/remove.c.orig ./src/remove.c
> --- ./src/remove.c.orig	2012-05-01 15:55:08 -0500
> +++ ./src/remove.c	2012-06-18 10:06:04 -0500
> @@ -88,6 +88,7 @@
>    return st;
>  }
>
> +#ifndef __TANDEM /* not used anywhere */
>  /* Return true if *ST has been statted.  */
>  static inline bool
>  cache_statted (struct stat *st)
> @@ -101,6 +102,7 @@
>  {
>    return (0 <= st->st_size);
>  }
> +#endif /* !__TANDEM */
>
>  /* Return 1 if FILE is an unwritable non-symlink,
>     0 if it is writable or some other type of file,
> @@ -311,6 +313,7 @@
>    return RM_OK;
>  }
>
> +#ifndef __TANDEM
>  /* Return true if FILENAME is a directory (and not a symlink to a directory).
>     Otherwise, including the case in which lstat fails, return false.
>     *ST is FILENAME's tstatus.
> @@ -340,6 +343,7 @@
>    errno = saved_errno;
>    return is_non_dir;
>  }
> +#endif /* !__TANDEM */
>
>  /* When a function like unlink, rmdir, or fstatat fails with an errno
>     value of ERRNUM, return true if the specified file system object

Thanks.  I've simply removed those unused functions
and wrote a commit log entry for you.

I'll wait for an ACK from you before pushing this,
since you're listed as the author:


From 033b669f50e3ef4de7ba5598c0b036069bd56778 Mon Sep 17 00:00:00 2001
From: Joachim Schmitz <jojo@HIDDEN>
Date: Fri, 20 Jul 2012 14:32:53 +0200
Subject: [PATCH] maint: rm: remove unused static-inlined functions

* src/remove.c (cache_statted, is_dir_lstat): Remove unused
static-inlined functions.
Copyright-paperwork-exempt: Yes
---
 src/remove.c | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/src/remove.c b/src/remove.c
index f44a982..42f2063 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -88,13 +88,6 @@ cache_stat_init (struct stat *st)
   return st;
 }

-/* Return true if *ST has been statted.  */
-static inline bool
-cache_statted (struct stat *st)
-{
-  return (st->st_size != -1);
-}
-
 /* Return true if *ST has been statted successfully.  */
 static inline bool
 cache_stat_ok (struct stat *st)
@@ -311,21 +304,6 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
   return RM_OK;
 }

-/* Return true if FILENAME is a directory (and not a symlink to a directory).
-   Otherwise, including the case in which lstat fails, return false.
-   *ST is FILENAME's tstatus.
-   Do not modify errno.  */
-static inline bool
-is_dir_lstat (int fd_cwd, char const *filename, struct stat *st)
-{
-  int saved_errno = errno;
-  bool is_dir =
-    (cache_fstatat (fd_cwd, filename, st, AT_SYMLINK_NOFOLLOW) == 0
-     && S_ISDIR (st->st_mode));
-  errno = saved_errno;
-  return is_dir;
-}
-
 /* Return true if FILENAME is a non-directory.
    Otherwise, including the case in which lstat fails, return false.
    *ST is FILENAME's tstatus.
--
1.7.11.2.249.g31c7954




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Jul 2012 18:00:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 19 14:00:36 2012
Received: from localhost ([127.0.0.1]:51149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Srv1f-0003yF-LQ
	for submit <at> debbugs.gnu.org; Thu, 19 Jul 2012 14:00:36 -0400
Received: from moutng.kundenserver.de ([212.227.17.8]:64357)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1Srv1b-0003y6-SV
	for 10305 <at> debbugs.gnu.org; Thu, 19 Jul 2012 14:00:33 -0400
Received: from DualCore (dsdf-4db50908.pool.mediaWays.net [77.181.9.8])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MMpSB-1Sw3WH210h-0080jj; Thu, 19 Jul 2012 19:53:55 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN> 
In-Reply-To: 
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 19 Jul 2012 19:53:53 +0200
Message-ID: <001501cd65d7$766d9700$6348c500$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0016_01CD65E8.39FB4900"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cAA1maGRAKxjBelApqUAp6W/TCAMIAMtviw
Content-Language: de
X-Provags-ID: V02:K0:nndoceKZBk6Q4izBPbWAVdrzzFcPfz/a4EPq9PoqCez
	Twv805RtKGq5NSOnFf5/khD58qaEoe9FRIYHyDtql49EZd2gXb
	XVlm2MoTfmigJDxX61S3f3lfll95xjY+RFIO9/DIiQx0smbBhH
	gbxQIqRGe+pUD95ZPK6hfZWpSQmhV4d9hHet8Hbn15lFdXitDN
	M7shzEp4bgbW7hopXEnjTrFGvrbZH1jfo3GbNj74n20FeiX0U/
	M9bCvCUL4lXF5TUMFN3RVMRplBAl7OXmRb2Wp6/3ED0XPfKiLa
	BSIj+KqoxNIBpKsCvvRUiWP2m4/RF0N3doqf1dEIuOkZdPMVzx
	FZ+bbDvRUp16e7IFgwBF5bXJGITyIX7Bfp3lb/vXCry/dJ92dk
	lx1tBtMJB4uAA==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: bug-gnulib@HIDDEN, nagendra.vs@HIDDEN, 'Jim Meyering' <jim@HIDDEN>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

This is a multipart message in MIME format.

------=_NextPart_000_0016_01CD65E8.39FB4900
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> Sent: Wednesday, June 27, 2012 9:25 AM
> To: 'Paul Eggert'
> Cc: '10305 <at> debbugs.gnu.org'; 'bug-gnulib@HIDDEN'; 'Eric Blake'; 'Jim
> Meyering'
> Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> > From: Paul Eggert [mailto:eggert@HIDDEN]
> > Sent: Wednesday, June 27, 2012 2:49 AM
> > To: Joachim Schmitz
> > Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim
> Meyering'
> > Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> >
> > On 06/26/2012 09:38 AM, Joachim Schmitz wrote:
> >
> > > Let me know what you think and where/how you'd do it differently.
> >
> > The changes mostly look good.  The trivial ones we've incorporated
> > already.  I have some comments on the nontrivial ones (please see =
below).

> > Here are some comments about that patch:

> > > --- ./gnu/dirfd.c.orig	2011-03-12 03:14:28.000000000 -0600
> > > +++ ./gnu/dirfd.c	2012-06-25 02:55:09.000000000 -0500
> > > ...
> > > +#ifdef __TANDEM
> > > +# include <unistd.h> /* for _gl_fnum2dt(), needed in C99 mode */
> > > +#endif
> >
> > Shouldn't that be "_gl_fnum2fd"?
>=20
> Yes, of course, stupid typo.
>=20
> > More important, doesn't the declaration of _gl_fnum2fd belong better
> > in dirent.h, not unistd.h?  Among other things, that would mean the
> > above change can be omitted.
>
> My attempts to integrate this into coreutils-8.17 seem to indicate =
that this
> function and a couple more are used elsewhere too Looks like there =
closedir.o
> needs _gl_ungerister_fnum(), dirfd.c needs _gl_fnum2ds() and opendir.c =
needs
> _gl_register_fnum().

Furthermore that function needs access to fnum2fdmap, which is local to =
fchdir.c
=20
> > >  int
> > >  dirfd (DIR *dir_p)
> > >  {
> > >    int fd =3D DIR_TO_FD (dir_p);
> > >    if (fd =3D=3D -1)
> > >      errno =3D ENOTSUP;
> > > +#ifdef __TANDEM
> > > +  fd =3D _gl_fnum2fd(fd);
> > > +#endif
> >
> > This might be cleaner if DIR_TO_FD invoked _gl_fnum2fd directly.
> > That way, dirfd.c could be left alone.  (Or perhaps not; I don't
> > understand the code that well.)
>=20
> Won't that make that macro too complicated?

I believe it would. Prove me wrong ;-)

> > > +  char fnum;        /* 'y' or 'n', actually a bool */
> >
> > Why not use 1 and 0?  That's far more typical for boolean values, =
and
> > generates better code.

Done, revealed a bad bug in our code, fixed now too.

> Maybe we could also make it a short and place fnum right there? That =
would
> change the implementation quite a bit though, but might make it leaner =
too.
> And the comment
> /* FIXME - add a DIR* member to make dirfd possible on mingw?  */ =
Indicates
> that there is a change pending for a similar purpose on a different =
platform...

Ok now...

After quite a few iterations and with integrating the things you already =
fixed for the next releases of gnulib, coreuitls and tar, we finally got =
it running fine for coreutils-8.15. Doing the equivalent changes (not =
100% identical, the coreutils resp. gnulib code had changed and =
reshuffled quite a bit) lead us into an endless recursion (well as =
endless as the stack could grow without aborting). After quite some =
effort in debugging, Nagendra finally found the culprit: in 8.15 =
configure checks for several functions to be declared without a macro, =
one of them is getcwd(), and then puts a=20
#define HAVE_RAW_DECL_GETCWD=20
into config.h. Coreutils-8.17 doesn't have that check anymore, hence =
doesn't set that define and then in getcwd.c enters that endless =
recursion loop: getcwd(), openat(), rpl_open(), get_name(), getcwd() =
....

Our (temp.?) fix is to add an "|| __TANDEM" to lib/getcwd.c, line 138.

Find the entire patch we use attached. Some more comments on these:

We had to hop thru several loops to get getmntent() implemented for =
NonStop, you may or may not be interested in the details. It is very =
system specific. Part of the stuff is outside this patch in our own =
GNUlib-like library (called floss, Freeware Look for Open System =
Services). Maybe eventually this gets added to our system libs, who =
knows...

The patch to lib/i-ring.h is needed for the fts-functions to recur =
deeper than 4 levels, at least on NonStop. It is not really fully =
understood why that is (not by me at least), but that change cured the =
symptom ;-). Probably doesn't need to be quit as big...

The patch to lib/readutmp.h is ugly but needed, at least for now, ignore =
it, unless you have a better idea. We don't have utmp and friends at =
all. This is a bit work in progress, probably falls into the same =
category as getmntent().

The patches reg. NO_UID and NO_GID might be better done someplace else, =
or not at all, I'm sure whether they are worth the effort.

I've disable a bit of apparently dead code in src/remove.c

I'm not sure what's wrong with  src/stat.c, but our compiler throws up =
on the original code. Might well be a bug in our compiler?
Same for src/system.h, I can't get it thru the compiler without that =
hack, but haven't been able to find out why.

The patch in src/su.c is not really needed, we can't use this su anyway, =
as our authentication works differently. But the DEFAULT_USER being =
"root" might be worth getting added to root-uid.h, possibly?

In src/uptime.c it gets pretty system specific (but not as deeply as =
getmntent), don't know whether you're interested in this, but I included =
it here anyway.

I've tried to fix some tests, split/filter and touch/not-owner. Some =
more tests are failing for no good reason, but a) I haven't yet found =
why they fail nor how to fix it and b) never check for error conditions =
you can't handle, so I just don't care about these test too much ;-)

As mentioned further above some patches are taken what you already did =
to coreutils, gnulib and tar.

I've removed a few hunks out of the patch, this may result in warnings =
by patch about an offset, but I guess you wouldn't apply them unaltered =
anyway.

Wherever you see room for improvement or have more questions, we're =
open, just let Nagendra and me know (and yes, schmitz@HIDDEN and =
jojo@HIDDEN is the same person, me, just in different roles, =
business and private, but feel free to pick your choice)

Bye, Jojo

------=_NextPart_000_0016_01CD65E8.39FB4900
Content-Type: application/octet-stream;
	name="coreutils-8.17-nonstop.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="coreutils-8.17-nonstop.diff"

/usr/local/bin/diff -EBbu ./configure.orig ./configure=0A=
--- ./configure.orig	2012-05-10 12:17:46 -0500=0A=
+++ ./configure	2012-07-04 02:55:44 -0500=0A=
@@ -13219,6 +13219,9 @@=0A=
 #ifdef HAVE_NETINET_IN_H=0A=
 #include <netinet/in.h>=0A=
 #endif=0A=
+#ifdef __TANDEM=0A=
+# include <netinet/in6.h>=0A=
+#endif=0A=
 #ifdef HAVE_WINSOCK2_H=0A=
 #include <winsock2.h>=0A=
 #endif=0A=
@@ -26496,7 +26499,7 @@=0A=
 else=0A=
 =0A=
       dirfd_save_CFLAGS=3D$CFLAGS=0A=
-      for ac_expr in d_fd dd_fd; do=0A=
+      for ac_expr in d_fd dd_fd dd1; do # __TANDEM=0A=
 =0A=
         CFLAGS=3D"$CFLAGS -DDIR_FD_MEMBER_NAME=3D$ac_expr"=0A=
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext=0A=
@@ -39341,6 +39344,9 @@=0A=
 #ifdef __cplusplus=0A=
 extern "C"=0A=
 #endif=0A=
+#ifdef __TANDEM=0A=
+# define getmntent floss_getmntent=0A=
+#endif=0A=
 char getmntent ();=0A=
 int=0A=
 main ()=0A=
@@ -39382,10 +39388,10 @@=0A=
 =0A=
 fi=0A=
 =0A=
-for ac_func in getmntent=0A=
+for ac_func in getmntent floss_getmntent # __TANDEM=0A=
 do :=0A=
-  ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"=0A=
-if test "x$ac_cv_func_getmntent" =3D xyes; then :=0A=
+  ac_fn_c_check_func "$LINENO" "$ac_func" "ac_cv_func_$ac_func"=0A=
+if test "x$ac_cv_func_$ac_func" =3D xyes; then :=0A=
   cat >>confdefs.h <<_ACEOF=0A=
 #define HAVE_GETMNTENT 1=0A=
 _ACEOF=0A=
@@ -39470,7 +39476,7 @@=0A=
   fi=0A=
 fi=0A=
 =0A=
-if test $ac_cv_func_getmntent =3D yes; then=0A=
+if test $ac_cv_func_getmntent =3D yes || test =
$ac_cv_func_floss_getmntent =3D yes; then # __TANDEM=0A=
 =0A=
   # This system has the getmntent function.=0A=
   # Determine whether it's the one-argument variant or the two-argument =
one.=0A=
@@ -39488,7 +39494,13 @@=0A=
 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */=0A=
 #include <stdio.h>=0A=
 =0A=
-#include <mntent.h>=0A=
+#ifdef __TANDEM=0A=
+# define _FLOSS_USE_MNTENT=0A=
+# include <floss.h(floss_mntent)>=0A=
+# define MOUNTED "/dev/null"=0A=
+#else=0A=
+# include <mntent.h>=0A=
+#endif=0A=
 #if !defined MOUNTED=0A=
 # if defined _PATH_MOUNTED      /* GNU libc  */=0A=
 #  define MOUNTED _PATH_MOUNTED=0A=
@@ -62398,6 +62410,7 @@=0A=
 =0A=
 #if (defined BOOT_TIME                              \=0A=
      || (defined CTL_KERN && defined KERN_BOOTTIME) \=0A=
+     || defined __TANDEM \=0A=
      || HAVE_OS_H)=0A=
 /* your system *does* have the infrastructure to determine boot time */=0A=
 #else=0A=
/usr/local/bin/diff -EBbu ./lib/alloca.in.h.orig ./lib/alloca.in.h=0A=
--- ./lib/alloca.in.h.orig	2012-02-11 03:53:07 -0600=0A=
+++ ./lib/alloca.in.h	2012-07-04 01:53:34 -0500=0A=
@@ -44,6 +44,13 @@=0A=
 #  define alloca _alloca=0A=
 # elif defined __DECC && defined __VMS=0A=
 #  define alloca __ALLOCA=0A=
+# elif defined __TANDEM  && defined _TNS_E_TARGET=0A=
+#  ifdef  __cplusplus=0A=
+extern "C"=0A=
+#  endif=0A=
+void *_alloca (unsigned short);=0A=
+#  pragma intrinsic (_alloca)=0A=
+#  define alloca _alloca=0A=
 # else=0A=
 #  include <stddef.h>=0A=
 #  ifdef  __cplusplus=0A=
/usr/local/bin/diff -EBbu ./lib/closedir.c.orig ./lib/closedir.c=0A=
--- ./lib/closedir.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/closedir.c	2012-06-26 16:33:45 -0500=0A=
@@ -41,6 +41,9 @@=0A=
 {=0A=
 # if REPLACE_FCHDIR=0A=
   int fd =3D dirfd (dirp);=0A=
+#  ifdef __TANDEM=0A=
+  short fnum =3D DIR_TO_FD(dirp);=0A=
+#  endif=0A=
 # endif=0A=
   int retval;=0A=
 =0A=
@@ -61,7 +64,14 @@=0A=
 =0A=
 #if REPLACE_FCHDIR=0A=
   if (retval >=3D 0)=0A=
+# ifdef __TANDEM=0A=
+    {=0A=
+      close (fd);=0A=
+      _gl_unregister_fnum (fnum);=0A=
+    }=0A=
+# else=0A=
     _gl_unregister_fd (fd);=0A=
+# endif=0A=
 #endif=0A=
   return retval;=0A=
 }=0A=
/usr/local/bin/diff -EBbu ./lib/dirfd.c.orig ./lib/dirfd.c=0A=
--- ./lib/dirfd.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/dirfd.c	2012-06-30 09:34:46 -0500=0A=
@@ -22,10 +22,18 @@=0A=
 #include <dirent.h>=0A=
 #include <errno.h>=0A=
 =0A=
+#ifdef __TANDEM=0A=
+# include <unistd.h> /* for _gl_fnum2fd(), needed in C99 mode */=0A=
+#endif=0A=
+=0A=
 int=0A=
 dirfd (DIR *dir_p)=0A=
 {=0A=
+#ifdef __TANDEM=0A=
+  int fd =3D _gl_fnum2fd(DIR_TO_FD (dir_p));=0A=
+#else=0A=
   int fd =3D DIR_TO_FD (dir_p);=0A=
+#endif=0A=
   if (fd =3D=3D -1)=0A=
     errno =3D ENOTSUP;=0A=
   return fd;=0A=
/usr/local/bin/diff -EBbu ./lib/euidaccess.c.orig ./lib/euidaccess.c=0A=
--- ./lib/euidaccess.c.orig	2012-01-06 03:14:31 -0600=0A=
+++ ./lib/euidaccess.c	2012-06-30 09:36:03 -0500=0A=
@@ -30,6 +30,8 @@=0A=
 #include <sys/stat.h>=0A=
 #include <unistd.h>=0A=
 =0A=
+#include "root-uid.h"=0A=
+=0A=
 #if HAVE_LIBGEN_H=0A=
 # include <libgen.h>=0A=
 #endif=0A=
@@ -140,7 +146,7 @@=0A=
 =0A=
   /* The super-user can read and write any file, and execute any file=0A=
      that anyone can execute.  */=0A=
-  if (euid =3D=3D 0 && ((mode & X_OK) =3D=3D 0=0A=
+  if (euid =3D=3D ROOT_UID && ((mode & X_OK) =3D=3D 0=0A=
                     || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))=0A=
     return 0;=0A=
 =0A=
/usr/local/bin/diff -EBbu ./lib/fchdir.c.orig ./lib/fchdir.c=0A=
--- ./lib/fchdir.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/fchdir.c	2012-07-05 11:23:09 -0500=0A=
@@ -53,6 +53,11 @@=0A=
 } dir_info_t;=0A=
 static dir_info_t *dirs;=0A=
 static size_t dirs_allocated;=0A=
+#ifdef __TANDEM=0A=
+# define NOFD        (-1)=0A=
+static int *fnum2fdmap;=0A=
+static size_t fds_allocated;=0A=
+#endif=0A=
 =0A=
 /* Try to ensure dirs has enough room for a slot at index fd; free any=0A=
    contents already in that slot.  Return false and set errno to=0A=
@@ -84,6 +89,35 @@=0A=
   return true;=0A=
 }=0A=
 =0A=
+#ifdef __TANDEM=0A=
+static bool=0A=
+ensure_fd_slot (short fnum)=0A=
+{=0A=
+  if (fnum < fds_allocated)=0A=
+     fnum2fdmap[fnum] =3D NOFD;=0A=
+  else=0A=
+  {=0A=
+      size_t new_allocated;=0A=
+      int *new;=0A=
+=0A=
+      new_allocated =3D 2 * fds_allocated + 1;=0A=
+      if (new_allocated <=3D fnum)=0A=
+        new_allocated =3D fnum + 1;=0A=
+      new =3D=0A=
+        (fnum2fdmap !=3D NULL=0A=
+         ? realloc (fnum2fdmap, new_allocated * sizeof *new)=0A=
+         : malloc (new_allocated * sizeof *new));=0A=
+      if (new =3D=3D NULL)=0A=
+        return false;=0A=
+      memset (new + fds_allocated, NOFD,=0A=
+              (new_allocated - fds_allocated) * sizeof *new);=0A=
+      fnum2fdmap =3D new;=0A=
+      fds_allocated =3D new_allocated;=0A=
+  }=0A=
+  return true;=0A=
+}=0A=
+#endif=0A=
+=0A=
 /* Return an absolute name of DIR in malloc'd storage.  */=0A=
 static char *=0A=
 get_name (char const *dir)=0A=
@@ -134,7 +168,11 @@=0A=
 =0A=
   assert (0 <=3D fd);=0A=
   if (REPLACE_OPEN_DIRECTORY=0A=
+#ifdef __TANDEM /* check on the directory itself, not on a 'dummy' fd */=0A=
+      || (stat (filename, &statbuf) =3D=3D 0 && S_ISDIR =
(statbuf.st_mode)))=0A=
+#else=0A=
       || (fstat (fd, &statbuf) =3D=3D 0 && S_ISDIR (statbuf.st_mode)))=0A=
+#endif=0A=
     {=0A=
       if (!ensure_dirs_slot (fd)=0A=
           || (dirs[fd].name =3D get_name (filename)) =3D=3D NULL)=0A=
@@ -197,6 +235,31 @@=0A=
   return NULL;=0A=
 }=0A=
 =0A=
+#ifdef __TANDEM=0A=
+short _gl_register_fnum (int fd, short fnum)=0A=
+{=0A=
+  if (!ensure_fd_slot (fnum))=0A=
+    {=0A=
+      int saved_errno =3D errno;=0A=
+      close (fd);=0A=
+      errno =3D saved_errno;=0A=
+      return -1;=0A=
+    }=0A=
+  fnum2fdmap[fnum] =3D fd;=0A=
+  return fnum;=0A=
+}=0A=
+=0A=
+void _gl_unregister_fnum (short fnum)=0A=
+{=0A=
+  if (fnum >=3D 0 && fnum < fds_allocated)=0A=
+    fnum2fdmap[fnum] =3D NOFD;=0A=
+}=0A=
+=0A=
+int _gl_fnum2fd (int fnum)=0A=
+{=0A=
+  return fnum2fdmap[fnum];=0A=
+}=0A=
+#endif=0A=
 =0A=
 /* Implement fchdir() in terms of chdir().  */=0A=
 =0A=
/usr/local/bin/diff -EBbu ./lib/getaddrinfo.c.orig ./lib/getaddrinfo.c=0A=
--- ./lib/getaddrinfo.c.orig	2012-02-11 03:53:08 -0600=0A=
+++ ./lib/getaddrinfo.c	2012-06-30 05:48:58 -0500=0A=
@@ -26,6 +26,9 @@=0A=
 #if HAVE_NETINET_IN_H=0A=
 # include <netinet/in.h>=0A=
 #endif=0A=
+#ifdef __TANDEM=0A=
+# include <netinet/in6.h>=0A=
+#endif=0A=
 =0A=
 /* Get inet_ntop.  */=0A=
 #include <arpa/inet.h>=0A=
/usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c=0A=
--- ./lib/getcwd.c.orig	2012-01-06 03:14:31 -0600=0A=
+++ ./lib/getcwd.c	2012-07-19 11:34:01 -0500=0A=
@@ -135,7 +135,7 @@=0A=
   size_t allocated =3D size;=0A=
   size_t used;=0A=
 =0A=
-#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD=0A=
+#if (HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || __TANDEM=0A=
   /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and=0A=
      this is much slower than the system getcwd (at least on=0A=
      GNU/Linux).  So trust the system getcwd's results unless they=0A=
/usr/local/bin/diff -EBbu ./lib/getugroups.c.orig ./lib/getugroups.c=0A=
--- ./lib/getugroups.c.orig	2012-01-06 03:14:31 -0600=0A=
+++ ./lib/getugroups.c	2012-07-06 02:32:34 -0500=0A=
@@ -109,7 +109,11 @@=0A=
         }=0A=
     }=0A=
 =0A=
+#ifdef __TANDEM /* we return ENOENT at end of list */=0A=
+  if (errno !=3D 0 && errno !=3D ENOENT)=0A=
+#else=0A=
   if (errno !=3D 0)=0A=
+#endif=0A=
     count =3D -1;=0A=
 =0A=
  done:=0A=
/usr/local/bin/diff -EBbu ./lib/i-ring.h.orig ./lib/i-ring.h=0A=
--- ./lib/i-ring.h.orig	2012-07-05 11:21:38 -0500=0A=
+++ ./lib/i-ring.h	2012-07-05 11:21:06 -0500=0A=
@@ -17,7 +17,11 @@=0A=
 #include <stdbool.h>=0A=
 #include "verify.h"=0A=
 =0A=
+#ifdef __TANDEM /* Hack?! */=0A=
+enum { I_RING_SIZE =3D 512 };=0A=
+#else=0A=
 enum { I_RING_SIZE =3D 4 };=0A=
+#endif=0A=
 verify (1 <=3D I_RING_SIZE);=0A=
 =0A=
 /* When ir_empty is true, the ring is empty.=0A=
/usr/local/bin/diff -EBbu ./lib/mountlist.c.orig ./lib/mountlist.c=0A=
--- ./lib/mountlist.c.orig	2012-01-06 03:14:31 -0600=0A=
+++ ./lib/mountlist.c	2012-06-18 10:05:59 -0500=0A=
@@ -57,7 +57,13 @@=0A=
 #endif /* MOUNTED_GETFSSTAT */=0A=
 =0A=
 #ifdef MOUNTED_GETMNTENT1       /* 4.3BSD, SunOS, HP-UX, Dynix, Irix.  =
*/=0A=
+# ifdef __TANDEM=0A=
+#  define _FLOSS_USE_MNTENT=0A=
+#  include <floss.h(floss_mntent)>=0A=
+#  define MOUNTED "/dev/null"=0A=
+# else=0A=
 # include <mntent.h>=0A=
+# endif=0A=
 # if !defined MOUNTED=0A=
 #  if defined _PATH_MOUNTED     /* GNU libc  */=0A=
 #   define MOUNTED _PATH_MOUNTED=0A=
/usr/local/bin/diff -EBbu ./lib/open.c.orig ./lib/open.c=0A=
--- ./lib/open.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/open.c	2012-07-01 07:43:08 -0500=0A=
@@ -116,6 +116,13 @@=0A=
 #endif=0A=
 =0A=
   fd =3D orig_open (filename, flags, mode);=0A=
+#ifdef __TANDEM=0A=
+  /* On NonStop open(2) can open an OSS directory, but not /G & /E=0A=
+     directory, hence we do a dummy open here and override fstat() in=0A=
+     fchdir.c to hide the fact that we have a dummy. */=0A=
+  if (fd < 0 && errno =3D=3D EISDIR)=0A=
+     fd =3D open ("/dev/null", flags, mode);=0A=
+#endif=0A=
 =0A=
 #if REPLACE_FCHDIR=0A=
   /* Implementing fchdir and fdopendir requires the ability to open a=0A=
/usr/local/bin/diff -EBbu ./lib/opendir.c.orig ./lib/opendir.c=0A=
--- ./lib/opendir.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/opendir.c	2012-07-01 07:29:25 -0500=0A=
@@ -27,6 +27,9 @@=0A=
 /* Override opendir(), to keep track of the open file descriptors.=0A=
    Needed because there is a function dirfd().  */=0A=
 =0A=
+# ifdef __TANDEM=0A=
+#  include <fcntl.h> /* for open() and O_RDONLY */=0A=
+# endif=0A=
 #else=0A=
 =0A=
 # include <stdlib.h>=0A=
@@ -51,6 +54,17 @@=0A=
   if (dirp =3D=3D NULL)=0A=
     return NULL;=0A=
 =0A=
+# ifdef __TANDEM=0A=
+  /* On NonStop a opendir will not associate a fd with a open directory=0A=
+     So open the same directory using open(2) & get a valid fd. */ =0A=
+  int fd =3D open(dir_name, O_RDONLY);=0A=
+  if (fd < 0)=0A=
+    {=0A=
+      /* Clean up before exit */=0A=
+      closedir(dirp);=0A=
+      return NULL;=0A=
+    }=0A=
+# endif=0A=
 #else=0A=
 =0A=
   char dir_name_mask[MAX_PATH + 1 + 1 + 1];=0A=
@@ -133,11 +147,19 @@=0A=
 =0A=
 #if REPLACE_FCHDIR=0A=
   {=0A=
+# ifdef __TANDEM=0A=
+    /* rpl_open would have already registered the fd, just map the fnum =
& fd. */=0A=
+    if (0 <=3D fd && _gl_register_fnum (fd, DIR_TO_FD(dirp)) !=3D =
DIR_TO_FD(dirp))=0A=
+# else=0A=
     int fd =3D dirfd (dirp);=0A=
     if (0 <=3D fd && _gl_register_fd (fd, dir_name) !=3D fd)=0A=
+# endif=0A=
       {=0A=
         int saved_errno =3D errno;=0A=
         closedir (dirp);=0A=
+# ifdef __TANDEM=0A=
+        close(fd);=0A=
+# endif=0A=
         errno =3D saved_errno;=0A=
         return NULL;=0A=
       }=0A=
/usr/local/bin/diff -EBbu ./lib/readutmp.h.orig ./lib/readutmp.h=0A=
--- ./lib/readutmp.h.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/readutmp.h	2012-06-18 10:05:59 -0500=0A=
@@ -143,7 +143,11 @@=0A=
 =0A=
 typedef struct UTMP_STRUCT_NAME STRUCT_UTMP;=0A=
 =0A=
+#ifdef __TANDEM /* ToDo ?!? */=0A=
+enum { UT_USER_SIZE };=0A=
+#else=0A=
 enum { UT_USER_SIZE =3D sizeof UT_USER ((STRUCT_UTMP *) 0) };=0A=
+#endif=0A=
 =0A=
 # if !defined UTMP_FILE && defined _PATH_UTMP=0A=
 #  define UTMP_FILE _PATH_UTMP=0A=
/usr/local/bin/diff -EBbu ./lib/regcomp.c.orig ./lib/regcomp.c=0A=
--- ./lib/regcomp.c.orig	2012-04-04 07:07:01 -0500=0A=
+++ ./lib/regcomp.c	2012-06-27 03:13:17 -0500=0A=
@@ -899,8 +899,10 @@=0A=
 		       !=3D 0);=0A=
 #else=0A=
   codeset_name =3D nl_langinfo (CODESET);=0A=
-  if (strcasecmp (codeset_name, "UTF-8") =3D=3D 0=0A=
-      || strcasecmp (codeset_name, "UTF8") =3D=3D 0)=0A=
+  if ((codeset_name[0] =3D=3D 'U' || codeset_name[0] =3D=3D 'u')=0A=
+      && (codeset_name[1] =3D=3D 'T' || codeset_name[1] =3D=3D 't')=0A=
+      && (codeset_name[2] =3D=3D 'F' || codeset_name[2] =3D=3D 'f')=0A=
+      && strcmp (codeset_name + 3 + (codeset_name[3] =3D=3D '-'), "8") =
=3D=3D 0)=0A=
     dfa->is_utf8 =3D 1;=0A=
 =0A=
   /* We check exhaustively in the loop below if this charset is a=0A=
/usr/local/bin/diff -EBbu ./lib/root-uid.h.orig ./lib/root-uid.h=0A=
--- ./lib/root-uid.h.orig	2012-06-29 02:34:54 -0500=0A=
+++ ./lib/root-uid.h	2012-06-29 02:34:54 -0500=0A=
@@ -0,0 +1,27 @@=0A=
+/* The user ID that always has appropriate privileges in the POSIX =
sense.=0A=
+   Copyright 2012 Free Software Foundation, Inc.=0A=
+   This program is free software: you can redistribute it and/or modify=0A=
+   it under the terms of the GNU General Public License as published by=0A=
+   the Free Software Foundation; either version 3 of the License, or=0A=
+   (at your option) any later version.=0A=
+=0A=
+   This program is distributed in the hope that it will be useful,=0A=
+   but WITHOUT ANY WARRANTY; without even the implied warranty of=0A=
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the=0A=
+   GNU General Public License for more details.=0A=
+=0A=
+   You should have received a copy of the GNU General Public License=0A=
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.=0A=
+=0A=
+   Written by Paul Eggert.  */=0A=
+=0A=
+#ifndef ROOT_UID_H_=0A=
+#define ROOT_UID_H_=0A=
+/* The user ID that always has appropriate privileges in the POSIX =
sense. */=0A=
+#ifdef __TANDEM=0A=
+# define ROOT_UID 65535=0A=
+#else=0A=
+# define ROOT_UID 0=0A=
+#endif=0A=
+=0A=
+#endif =0A=
/usr/local/bin/diff -EBbu ./lib/unistd.in.h.orig ./lib/unistd.in.h=0A=
--- ./lib/unistd.in.h.orig	2012-05-04 04:04:48 -0500=0A=
+++ ./lib/unistd.in.h	2012-07-01 07:31:21 -0500=0A=
@@ -473,6 +473,13 @@=0A=
 _GL_EXTERN_C void _gl_unregister_fd (int fd);=0A=
 _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);=0A=
 _GL_EXTERN_C const char *_gl_directory_name (int fd);=0A=
+#ifdef __TANDEM=0A=
+_GL_EXTERN_C short _gl_register_fnum (int fd, short fnum)=0A=
+     _GL_ARG_NONNULL ((2));=0A=
+_GL_EXTERN_C int _gl_fnum2fd (int fd)=0A=
+     _GL_ARG_NONNULL ((1));=0A=
+_GL_EXTERN_C void _gl_unregister_fnum(short fnum);=0A=
+#endif=0A=
 =0A=
 # else=0A=
 #  if !@HAVE_DECL_FCHDIR@=0A=
/usr/local/bin/diff -EBbu ./lib/write-any-file.c.orig =
./lib/write-any-file.c=0A=
--- ./lib/write-any-file.c.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./lib/write-any-file.c	2012-06-30 06:02:17 -0500=0A=
@@ -21,6 +21,7 @@=0A=
 =0A=
 #include "write-any-file.h"=0A=
 #include "priv-set.h"=0A=
+#include "root-uid.h"=0A=
 =0A=
 #include <unistd.h>=0A=
 =0A=
@@ -40,7 +41,7 @@=0A=
       can =3D (priv_set_ismember (PRIV_FILE_DAC_WRITE) =3D=3D 1);=0A=
 #else=0A=
       /* In traditional Unix, only root can unlink directories.  */=0A=
-      can =3D (geteuid () =3D=3D 0);=0A=
+      can =3D (geteuid () =3D=3D ROOT_UID);=0A=
 #endif=0A=
       can_write =3D can;=0A=
       initialized =3D true;=0A=
/usr/local/bin/diff -EBbu ./m4/dirfd.m4.orig ./m4/dirfd.m4=0A=
--- ./m4/dirfd.m4.orig	2012-01-06 01:20:50 -0600=0A=
+++ ./m4/dirfd.m4	2012-01-06 01:20:50 -0600=0A=
@@ -51,7 +51,7 @@=0A=
                  [gl_cv_sys_dir_fd_member_name],=0A=
     [=0A=
       dirfd_save_CFLAGS=3D$CFLAGS=0A=
-      for ac_expr in d_fd dd_fd; do=0A=
+      for ac_expr in d_fd dd_fd dd1; do # __TANDEM=0A=
 =0A=
         CFLAGS=3D"$CFLAGS -DDIR_FD_MEMBER_NAME=3D$ac_expr"=0A=
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[=0A=
/usr/local/bin/diff -EBbu ./src/copy.c.orig ./src/copy.c=0A=
--- ./src/copy.c.orig	2012-05-08 03:34:30 -0500=0A=
+++ ./src/copy.c	2012-07-01 07:35:16 -0500=0A=
@@ -51,6 +51,7 @@=0A=
 #include "ignore-value.h"=0A=
 #include "ioblksize.h"=0A=
 #include "quote.h"=0A=
+#include "root-uid.h"=0A=
 #include "same.h"=0A=
 #include "savedir.h"=0A=
 #include "stat-size.h"=0A=
@@ -1127,7 +1132,7 @@=0A=
     {=0A=
       bool access_changed =3D false;=0A=
 =0A=
-      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D 0)=0A=
+      if (!(sb.st_mode & S_IWUSR) && geteuid () !=3D ROOT_UID)=0A=
         access_changed =3D fchmod_or_lchmod (dest_desc, dst_name, 0600) =
=3D=3D 0;=0A=
 =0A=
       if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x)=0A=
@@ -2703,7 +2708,7 @@=0A=
     priv_freeset (pset);=0A=
   }=0A=
 #else=0A=
-  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =3D=3D 0);=0A=
+  x->chown_privileges =3D x->owner_privileges =3D (geteuid () =3D=3D =
ROOT_UID);=0A=
 #endif=0A=
 }=0A=
 =0A=
/usr/local/bin/diff -EBbu ./src/groups.c.orig ./src/groups.c=0A=
--- ./src/groups.c.orig	2012-04-29 06:45:30 -0500=0A=
+++ ./src/groups.c	2012-06-18 10:06:02 -0500=0A=
@@ -96,8 +96,13 @@=0A=
   if (optind =3D=3D argc)=0A=
     {=0A=
       /* No arguments.  Divulge the details of the current process. */=0A=
+#ifdef __TANDEM=0A=
+      uid_t NO_UID =3D 0x80000000;=0A=
+      gid_t NO_GID =3D 0x80000000;=0A=
+#else=0A=
       uid_t NO_UID =3D -1;=0A=
       gid_t NO_GID =3D -1;=0A=
+#endif=0A=
 =0A=
       errno =3D 0;=0A=
       ruid =3D getuid ();=0A=
/usr/local/bin/diff -EBbu ./src/hostid.c.orig ./src/hostid.c=0A=
--- ./src/hostid.c.orig	2012-04-29 06:31:00 -0500=0A=
+++ ./src/hostid.c	2012-06-18 10:06:02 -0500=0A=
@@ -22,6 +22,10 @@=0A=
 #include <stdio.h>=0A=
 #include <sys/types.h>=0A=
 =0A=
+#ifdef __TANDEM /* netdb.h errnously declares it only for =
_GUARDIAN_SOCKETS */=0A=
+unsigned long gethostid(void);=0A=
+#endif=0A=
+=0A=
 #include "system.h"=0A=
 #include "long-options.h"=0A=
 #include "error.h"=0A=
/usr/local/bin/diff -EBbu ./src/id.c.orig ./src/id.c=0A=
--- ./src/id.c.orig	2012-05-02 03:31:47 -0500=0A=
+++ ./src/id.c	2012-06-18 10:21:13 -0500=0A=
@@ -212,8 +216,13 @@=0A=
       /* POSIX says identification functions (getuid, getgid, and=0A=
          others) cannot fail, but they can fail under GNU/Hurd and a=0A=
          few other systems.  Test for failure by checking errno.  */=0A=
+#ifdef __TANDEM=0A=
+      uid_t NO_UID =3D 0x80000000;=0A=
+      gid_t NO_GID =3D 0x80000000;=0A=
+#else=0A=
       uid_t NO_UID =3D -1;=0A=
       gid_t NO_GID =3D -1;=0A=
+#endif=0A=
 =0A=
       if (just_user ? !use_real=0A=
           : !just_group && !just_group_list && !just_context)=0A=
/usr/local/bin/diff -EBbu ./src/install.c.orig ./src/install.c=0A=
--- ./src/install.c.orig	2012-05-02 03:31:47 -0500=0A=
+++ ./src/install.c	2012-06-18 10:21:56 -0500=0A=
@@ -199,7 +203,11 @@=0A=
     {=0A=
       errno =3D 0;=0A=
       uid_t ruid =3D getuid ();=0A=
+#ifdef __TANDEM=0A=
+      if ((ruid =3D=3D (uid_t) 0x80000000 && errno) || dest_sb.st_uid =
!=3D ruid)=0A=
+#else=0A=
       if ((ruid =3D=3D (uid_t) -1 && errno) || dest_sb.st_uid !=3D ruid)=0A=
+#endif=0A=
         return true;=0A=
     }=0A=
   else if (dest_sb.st_uid !=3D owner_id)=0A=
@@ -209,7 +217,11 @@=0A=
     {=0A=
       errno =3D 0;=0A=
       gid_t rgid =3D getgid ();=0A=
+#ifdef __TANDEM=0A=
+      if ((rgid =3D=3D (uid_t) 0x80000000 && errno) || dest_sb.st_gid =
!=3D rgid)=0A=
+#else=0A=
       if ((rgid =3D=3D (uid_t) -1 && errno) || dest_sb.st_gid !=3D rgid)=0A=
+#endif=0A=
         return true;=0A=
     }=0A=
   else if (dest_sb.st_gid !=3D group_id)=0A=
/usr/local/bin/diff -EBbu ./src/remove.c.orig ./src/remove.c=0A=
--- ./src/remove.c.orig	2012-05-01 15:55:08 -0500=0A=
+++ ./src/remove.c	2012-06-18 10:06:04 -0500=0A=
@@ -88,6 +88,7 @@=0A=
   return st;=0A=
 }=0A=
 =0A=
+#ifndef __TANDEM /* not used anywhere */=0A=
 /* Return true if *ST has been statted.  */=0A=
 static inline bool=0A=
 cache_statted (struct stat *st)=0A=
@@ -101,6 +102,7 @@=0A=
 {=0A=
   return (0 <=3D st->st_size);=0A=
 }=0A=
+#endif /* !__TANDEM */=0A=
 =0A=
 /* Return 1 if FILE is an unwritable non-symlink,=0A=
    0 if it is writable or some other type of file,=0A=
@@ -311,6 +313,7 @@=0A=
   return RM_OK;=0A=
 }=0A=
 =0A=
+#ifndef __TANDEM=0A=
 /* Return true if FILENAME is a directory (and not a symlink to a =
directory).=0A=
    Otherwise, including the case in which lstat fails, return false.=0A=
    *ST is FILENAME's tstatus.=0A=
@@ -340,6 +343,7 @@=0A=
   errno =3D saved_errno;=0A=
   return is_non_dir;=0A=
 }=0A=
+#endif /* !__TANDEM */=0A=
 =0A=
 /* When a function like unlink, rmdir, or fstatat fails with an errno=0A=
    value of ERRNUM, return true if the specified file system object=0A=
/usr/local/bin/diff -EBbu ./src/stat.c.orig ./src/stat.c=0A=
--- ./src/stat.c.orig	2012-05-10 08:15:59 -0500=0A=
+++ ./src/stat.c	2012-06-18 10:06:06 -0500=0A=
@@ -713,9 +717,15 @@=0A=
         uintmax_t fsid =3D statfsbuf->f_fsid;=0A=
 #else=0A=
         typedef unsigned int fsid_word;=0A=
+# ifdef __TANDEM=0A=
+        verify (alignof (STRUCT_STATVFS) % 4 =3D=3D 0);=0A=
+        verify (offsetof (STRUCT_STATVFS, f_fsid) % 4 =3D=3D 0);=0A=
+        verify (sizeof statfsbuf->f_fsid % 4 =3D=3D 0);=0A=
+# else=0A=
         verify (alignof (STRUCT_STATVFS) % alignof (fsid_word) =3D=3D =
0);=0A=
         verify (offsetof (STRUCT_STATVFS, f_fsid) % alignof (fsid_word) =
=3D=3D 0);=0A=
         verify (sizeof statfsbuf->f_fsid % alignof (fsid_word) =3D=3D =
0);=0A=
+# endif=0A=
         fsid_word const *p =3D (fsid_word *) &statfsbuf->f_fsid;=0A=
 =0A=
         /* Assume a little-endian word order, as that is compatible=0A=
/usr/local/bin/diff -EBbu ./src/su.c.orig ./src/su.c=0A=
--- ./src/su.c.orig	2012-05-04 04:02:43 -0500=0A=
+++ ./src/su.c	2012-06-30 06:55:57 -0500=0A=
@@ -55,6 +55,7 @@=0A=
 =0A=
 #include "system.h"=0A=
 #include "getpass.h"=0A=
+#include "root-uid.h"=0A=
 =0A=
 #if HAVE_SYSLOG_H && HAVE_SYSLOG=0A=
 # include <syslog.h>=0A=
@@ -109,7 +114,11 @@=0A=
 #define DEFAULT_SHELL "/bin/sh"=0A=
 =0A=
 /* The user to become if none is specified.  */=0A=
-#define DEFAULT_USER "root"=0A=
+#ifdef __TANDEM=0A=
+# define DEFAULT_USER "SUPER.SUPER"=0A=
+#else=0A=
+# define DEFAULT_USER "root"=0A=
+#endif=0A=
 =0A=
 char *crypt (char const *key, char const *salt);=0A=
 =0A=
@@ -162,7 +171,7 @@=0A=
   const char *new_user, *old_user, *tty;=0A=
 =0A=
 # ifndef SYSLOG_NON_ROOT=0A=
-  if (pw->pw_uid)=0A=
+  if (pw->pw_uid !=3D ROOT_UID)=0A=
     return;=0A=
 # endif=0A=
   new_user =3D pw->pw_name;=0A=
@@ -175,7 +184,11 @@=0A=
          Resort to getpwuid.  */=0A=
       errno =3D 0;=0A=
       uid_t ruid =3D getuid ();=0A=
+#ifdef __TANDEM=0A=
+      uid_t NO_UID =3D 0x80000000;=0A=
+#else=0A=
       uid_t NO_UID =3D -1;=0A=
+#endif=0A=
       struct passwd *pwd =3D (ruid =3D=3D NO_UID && errno ? NULL : =
getpwuid (ruid));=0A=
       old_user =3D (pwd ? pwd->pw_name : "");=0A=
     }=0A=
@@ -223,7 +236,7 @@=0A=
 #endif=0A=
     correct =3D pw->pw_passwd;=0A=
 =0A=
-  if (getuid () =3D=3D 0 || !correct || correct[0] =3D=3D '\0')=0A=
+  if (getuid () =3D=3D ROOT_UID || !correct || correct[0] =3D=3D '\0')=0A=
     return true;=0A=
 =0A=
   unencrypted =3D getpass (_("Password:"));=0A=
@@ -492,7 +505,7 @@=0A=
 =0A=
   if (!shell && !change_environment)=0A=
     shell =3D getenv ("SHELL");=0A=
-  if (shell && getuid () !=3D 0 && restricted_shell (pw->pw_shell))=0A=
+  if (shell && getuid () !=3D ROOT_UID && restricted_shell =
(pw->pw_shell))=0A=
     {=0A=
       /* The user being su'd to has a nonstandard shell, and so is=0A=
          probably a uucp account or has restricted access.  Don't=0A=
/usr/local/bin/diff -EBbu ./src/system.h.orig ./src/system.h=0A=
--- ./src/system.h.orig	2012-05-10 03:24:16 -0500=0A=
+++ ./src/system.h	2012-06-30 06:05:03 -0500=0A=
@@ -626,3 +626,7 @@=0A=
 #ifndef ARRAY_CARDINALITY=0A=
 # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))=0A=
 #endif=0A=
+=0A=
+#ifdef __TANDEM /* Hack!?! */=0A=
+# undef putchar=0A=
+#endif=0A=
/usr/local/bin/diff -EBbu ./src/test.c.orig ./src/test.c=0A=
--- ./src/test.c.orig	2012-05-10 02:14:30 -0500=0A=
+++ ./src/test.c	2012-06-18 10:06:07 -0500=0A=
@@ -425,7 +425,11 @@=0A=
           return false;=0A=
         errno =3D 0;=0A=
         uid_t euid =3D geteuid ();=0A=
+#ifdef __TANDEM=0A=
+        uid_t NO_UID =3D 0x80000000;=0A=
+#else=0A=
         uid_t NO_UID =3D -1;=0A=
+#endif=0A=
         return ! (euid =3D=3D NO_UID && errno) && euid =3D=3D =
stat_buf.st_uid;=0A=
       }=0A=
 =0A=
@@ -436,7 +440,11 @@=0A=
           return false;=0A=
         errno =3D 0;=0A=
         gid_t egid =3D getegid ();=0A=
+#ifdef __TANDEM=0A=
+        gid_t NO_GID =3D 0x80000000;=0A=
+#else=0A=
         gid_t NO_GID =3D -1;=0A=
+#endif=0A=
         return ! (egid =3D=3D NO_GID && errno) && egid =3D=3D =
stat_buf.st_gid;=0A=
       }=0A=
 =0A=
/usr/local/bin/diff -EBbu ./src/uptime.c.orig ./src/uptime.c=0A=
--- ./src/uptime.c.orig	2012-05-01 15:55:08 -0500=0A=
+++ ./src/uptime.c	2012-06-18 10:06:08 -0500=0A=
 # include <OS.h>=0A=
 #endif=0A=
 =0A=
+#ifdef __TANDEM=0A=
+# include <cextdecs.h(JULIANTIMESTAMP,INTERPRETINTERVAL)>=0A=
+#endif=0A=
+=0A=
 #include "c-strtod.h"=0A=
 #include "error.h"=0A=
 #include "long-options.h"=0A=
@@ -50,15 +54,28 @@=0A=
 print_uptime (size_t n, const STRUCT_UTMP *this)=0A=
 {=0A=
   size_t entries =3D 0;=0A=
-  time_t boot_time =3D 0;=0A=
   time_t time_now;=0A=
-  time_t uptime =3D 0;=0A=
   long int updays;=0A=
-  int uphours;=0A=
-  int upmins;=0A=
   struct tm *tmn;=0A=
   double avg[3];=0A=
   int loads;=0A=
+#ifdef __TANDEM=0A=
+  long long uptime;=0A=
+  short uphours, upmins;=0A=
+=0A=
+  uptime =3D JULIANTIMESTAMP(3);=0A=
+  if ( (updays =3D INTERPRETINTERVAL(uptime, &uphours, &upmins)) < 0) {=0A=
+        printf("ret =3D %x\n", updays);=0A=
+        error (EXIT_FAILURE, errno, _("couldn't get boot time"));=0A=
+  }=0A=
+=0A=
+  time_now =3D time (NULL);=0A=
+#else /* !__TANDEM */=0A=
+  time_t boot_time =3D 0;=0A=
+  time_t uptime =3D 0;=0A=
+  int uphours;=0A=
+  int upmins;=0A=
+  int upmins;=0A=
 #ifdef HAVE_PROC_UPTIME=0A=
   FILE *fp;=0A=
 =0A=
@@ -128,6 +145,7 @@=0A=
   updays =3D uptime / 86400;=0A=
   uphours =3D (uptime - (updays * 86400)) / 3600;=0A=
   upmins =3D (uptime - (updays * 86400) - (uphours * 3600)) / 60;=0A=
+#endif /* !__TANDEM */=0A=
   tmn =3D localtime (&time_now);=0A=
   /* procps' version of uptime also prints the seconds field, but=0A=
      previous versions of coreutils don't. */=0A=
/usr/local/bin/diff -EBbu ./src/whoami.c.orig ./src/whoami.c=0A=
--- ./src/whoami.c.orig	2012-04-29 06:31:00 -0500=0A=
+++ ./src/whoami.c	2012-06-18 10:27:34 -0500=0A=
@@ -59,7 +63,11 @@=0A=
 {=0A=
   struct passwd *pw;=0A=
   uid_t uid;=0A=
+#ifdef __TANDEM=0A=
+  uid_t NO_UID =3D 0x80000000;=0A=
+#else=0A=
   uid_t NO_UID =3D -1;=0A=
+#endif=0A=
 =0A=
   initialize_main (&argc, &argv);=0A=
   set_program_name (argv[0]);=0A=
/usr/local/bin/diff -EBbu ./tests/split/filter.orig ./tests/split/filter=0A=
--- ./tests/split/filter.orig	2012-01-27 04:34:45 -0600=0A=
+++ ./tests/split/filter	2012-07-06 09:11:27 -0500=0A=
@@ -52,6 +52,8 @@=0A=
 =0A=
 # Ensure that endless input is ignored when all filters finish=0A=
 timeout 10 yes | split --filter=3D"head -c1 >/dev/null" -n r/1 || =
fail=3D1=0A=
-timeout 10 split --filter=3D"head -c1 >/dev/null" -n 1 /dev/zero || =
fail=3D1=0A=
+# __TANDEM no /dev/zere here=0A=
+timeout 10 split --filter=3D"head -c1 >/dev/null" -n 1 /dev/null || =
fail=3D1=0A=
+#timeout 10 split --filter=3D"head -c1 >/dev/null" -n 1 /dev/zero || =
fail=3D1=0A=
 =0A=
 Exit $fail=0A=
/usr/local/bin/diff -EBbu ./tests/touch/not-owner.orig =
./tests/touch/not-owner=0A=
--- ./tests/touch/not-owner.orig	2012-02-03 03:22:06 -0600=0A=
+++ ./tests/touch/not-owner	2012-07-06 09:08:54 -0500=0A=
@@ -34,7 +34,9 @@=0A=
 # Before fileutils-4.1, we'd get the following misleading=0A=
 # diagnostic instead of '...: Permission denied'.=0A=
 # touch: creating '/': Is a directory=0A=
-touch / > out 2>&1 && fail=3D1=0A=
+# __TANDEM=0A=
+touch -c / > out 2>&1 && fail=3D1=0A=
+#touch / > out 2>&1 && fail=3D1=0A=
 =0A=
 # On SunOS4, EPERM is 'Not owner'.=0A=
 # On some *BSD systems it's 'Operation not permitted'.=0A=
@@ -45,6 +47,9 @@=0A=
   cat > exp <<EOF=0A=
 touch: setting times of '/': $msg=0A=
 EOF=0A=
+# __TANDEM=0A=
+#touch: permission denied '/': $msg=0A=
+#touch: setting times of '/': $msg=0A=
 =0A=
   cmp out exp > /dev/null 2>&1 && { match=3D1; break; }=0A=
 done=0A=

------=_NextPart_000_0016_01CD65E8.39FB4900--





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 27 Jun 2012 07:29:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 27 03:29:56 2012
Received: from localhost ([127.0.0.1]:59451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SjmhI-0005Hj-3d
	for submit <at> debbugs.gnu.org; Wed, 27 Jun 2012 03:29:56 -0400
Received: from moutng.kundenserver.de ([212.227.126.186]:64946)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SjmhG-0005Hc-4L
	for 10305 <at> debbugs.gnu.org; Wed, 27 Jun 2012 03:29:55 -0400
Received: from DualCore (dsdf-4db557c8.pool.mediaWays.net [77.181.87.200])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0M2HkO-1Ru0vG2fDA-00sb2n; Wed, 27 Jun 2012 09:25:31 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<4FEA5878.6010407@HIDDEN>
In-Reply-To: <4FEA5878.6010407@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Wed, 27 Jun 2012 09:25:22 +0200
Message-ID: <007401cd5436$04278b40$0c76a1c0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4AlvA1cAA1maGRAKxjBelApqUAp6W/TCAMA==
Content-Language: de
X-Provags-ID: V02:K0:K7o3oTO9FpmlBO5cqo4VF7/TkKQOlmrL2Zi6oP4O20m
	4RahR3zRi+AJfd07QvHM2GOiyyxcokCQs4UcS5f1T8LhVBDnJK
	hZ1E50Jvlf6Ikslg143Lh22A8wd1AZrAv/VapQ4X1w9LFBjl2R
	ZvAZFIcJclnNst0mcX9sscdMRYQimbrJPTVisaHlgdFS/5ZCuh
	oizlxwNd9K91Vj8AyBQ1AEt3/CILBknxyOJevcKD2Q0yoO3OIc
	cL/KsWG0qdtGAsndBtgDTsJoFRziD2gpEx1gSKTqT8I7rr1fFv
	aBPrV2IHamQMBoLEm9gXuiw09WH15SIb6LwBXmP5gY2MUYjvz4
	cNGz1e0EedgJ9iNw9W5A8Lu+37/PX4++441Us/RcBXEPizYTmZ
	eSMi6Lgq1Gukg==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Wednesday, June 27, 2012 2:49 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim =
Meyering'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 06/26/2012 09:38 AM, Joachim Schmitz wrote:
>=20
> > Let me know what you think and where/how you'd do it differently.
>=20
> The changes mostly look good.  The trivial ones we've incorporated =
already.  I
> have some comments on the nontrivial ones (please see below).
> But before we get into it too much further, are you and your company =
willing to
> assign copyright to your nontrival changes to the FSF?
> If so, I can send you more info about how to do that.

I'd need to check, will pursue this in a different email.
=20
> Here are some comments about that patch:
>=20
>=20
> > --- ./configure.orig	2011-03-12 03:50:18.000000000 -0600
> > +++ ./configure	2012-06-26 06:49:17.000000000 -0500
> For future versions of this patch there's no need to show differences =
in
> automatically-generated files like 'configure'.

That change then needs to go into m4/dirfd.m4, right?

> > --- ./gnu/argp-help.c.orig	2011-03-12 03:14:26.000000000 -0600
> > +++ ./gnu/argp-help.c	2011-06-16 02:01:23.000000000 -0500
>=20
> This one Bruno just now fixed in a different way:
> =
http://git.savannah.gnu.org/gitweb/?p=3Dgnulib.git;a=3Dcommitdiff;h=3D245=
7d7ca685
> 6f84502b09fa4690f6f4187de050f

Fine by me
=20
> > --- ./gnu/regex.c.orig	2011-03-12 03:14:32.000000000 -0600
> > +++ ./gnu/regex.c	2011-06-17 04:07:16.000000000 -0500
>=20
> This one we also fixed in a different way:
> =
http://git.savannah.gnu.org/gitweb/?p=3Dgnulib.git;a=3Dcommitdiff;h=3Dd49=
03bb0efa
> c5e399b785c71367d8cda3fb539ab

Fine too.
=20
> > --- ./gnu/dirfd.c.orig	2011-03-12 03:14:28.000000000 -0600
> > +++ ./gnu/dirfd.c	2012-06-25 02:55:09.000000000 -0500
> > ...
> > +#ifdef __TANDEM
> > +# include <unistd.h> /* for _gl_fnum2dt(), needed in C99 mode */
> > +#endif
>=20
> Shouldn't that be "_gl_fnum2fd"?

Yes, of course, stupid typo.
=20
> More important, doesn't the declaration of _gl_fnum2fd belong better =
in
> dirent.h, not unistd.h?  Among other things, that would mean the above =
change
> can be omitted.

My attempts to integrate this into coreutils-8.17 seem to indicate that =
this function and a couple more are used elsewhere too
Looks like there closedir.o needs _gl_ungerister_fnum(), dirfd.c needs =
_gl_fnum2ds() and opendir.c needs _gl_register_fnum().

> >  int
> >  dirfd (DIR *dir_p)
> >  {
> >    int fd =3D DIR_TO_FD (dir_p);
> >    if (fd =3D=3D -1)
> >      errno =3D ENOTSUP;
> > +#ifdef __TANDEM
> > +  fd =3D _gl_fnum2fd(fd);
> > +#endif
>=20
> This might be cleaner if DIR_TO_FD invoked _gl_fnum2fd directly.
> That way, dirfd.c could be left alone.  (Or perhaps not; I don't =
understand the
> code that well.)

Won't that make that macro too complicated?
=20
> > +# define NOFNUM      -1
>=20
> What's this for?  I don't see it used anywhere.

Indeed, scratch it.
=20
> > +# define NOFD        -1
>=20
> Body needs to be parenthesized.

Point taken.

> > +  char fnum;        /* 'y' or 'n', actually a bool */
>=20
> Why not use 1 and 0?  That's far more typical for boolean values, and
> generates better code.

True. But the corresponding member in dir_info_t should remain a char =
(or signed char?), to save space, shouldn't it?

Maybe we could also make it a short and place fnum right there? That =
would change the implementation quite a bit though, but might make it =
leaner too. And the comment
/* FIXME - add a DIR* member to make dirfd possible on mingw?  */
Indicates that there is a change pending for a similar purpose on a =
different platform...

> > +#ifdef __TANDEM
> > +      || (stat (filename, &statbuf) =3D=3D 0 && S_ISDIR
> > +(statbuf.st_mode)))=20
>> +#else
> >        || (fstat (fd, &statbuf) =3D=3D 0 && S_ISDIR =
(statbuf.st_mode)))
> > +#endif
>
> fstat doesn't work on Tandem?  I must be missing something here.

This is a special case for those "dummy directories" from the patch =
chunk below.
And yes, that warrants a comment in the above patch chunk ;-)
=20
> >    fd =3D orig_open (filename, flags, mode);
> > +#ifdef __TANDEM
> > +	/* On NonStop open(2) can open an OSS directory, but not /G & /E
> > +	 * directory, hence we do a dummy open here and override fstat() =
in
> > +	 * fchdir.c to hide the fact that we have a dummy.
> > +	 */
> > +  if (fd < 0 && errno =3D=3D EISDIR)
> > +     fd =3D open ("/dev/null", flags, mode);=20
> > +#endif
>=20
> If 'flags' contains O_WRONLY or O_RDWR, this will misbehave on an OSS
> directory, since open will fail with errno =3D=3D EISDIR but we don't =
want to replace
> it with /dev/null.  So the fallback needs to be conditioned on the =
file being
> opened read-only.

These cases are handeld furter above in the (existing) code:

  if (flags & (O_CREAT | O_WRONLY | O_RDWR))
    {
      size_t len =3D strlen (filename);
      if (len > 0 && filename[len - 1] =3D=3D '/')
        {
          errno =3D EISDIR;
          return -1;
        }
    }
#endif

  fd =3D orig_open (filename, flags, mode);
#ifdef __TANDEM
        /* On NonStop open(2) can open an OSS directory, but not /G & /E
         * directory, hence we do a dummy open here and override fstat() =
in
         * fchdir.c to hide the fact that we have a dummy.
         */
  if (fd < 0 && errno =3D=3D EISDIR)
     fd =3D open ("/dev/null", flags, mode);
#endif

> > --- ./gnu/unlinkdir.c.orig	2011-03-12 03:14:34.000000000 -0600
> > +++ ./gnu/unlinkdir.c	2012-06-26 08:46:41.000000000 -0500
> > ...
> > --- ./src/extract.c.orig	2010-11-27 04:33:22.000000000 -0600
> > +++ ./src/extract.c	2011-06-16 01:55:46.000000000 -0500
>=20
> I just now fixed this in a different way in gnulib and tar master.

Good. Where does that ROOT_UID get set?

> > /usr/local/bin/diff -EBbu ./tests/genfile.c.orig ./tests/genfile.c
> > --- ./tests/genfile.c.orig	2010-10-24 13:06:45.000000000 -0500
> > +++ ./tests/genfile.c	2011-06-16 01:55:46.000000000 -0500
> > @@ -610,9 +610,17 @@
> >        else if (strcmp (p, "size") =3D=3D 0)
> >  	printf ("%s", umaxtostr (st.st_size, buf));
> >        else if (strcmp (p, "blksize") =3D=3D 0)
> > +#ifdef __TANDEM
> > +	printf ("*****Nothing to print on NonStop for st_blksize****\n");
> > +#else
> >  	printf ("%s", umaxtostr (st.st_blksize, buf));
> > +#endif
> >        else if (strcmp (p, "blocks") =3D=3D 0)
> > +#ifdef __TANDEM
> > +	printf ("*****Nothing to print on NonStop for st_blocks****\n");
> > +#else
> >  	printf ("%s", umaxtostr (st.st_blocks, buf));
> > +#endif
> >        else if (strcmp (p, "atime") =3D=3D 0)
> >  	printf ("%lu", (unsigned long) st.st_atime);
> >        else if (strcmp (p, "atimeH") =3D=3D 0)
>=20
> I assume st_blksize and st_blocks are garbage on Tandem?
> Is there any harm in printing the garbage?

No, we don't have those struct members at all. Instead of #ifdef =
__TANDEM it should probably better be #if HAVE_STAT_ST_BLOCKS and #if =
HAVE_STRUCT_STAT_ST_BLKSIZE or some such and remain silent if not, maybe =
like this:

      else if (strcmp (p, "blksize") =3D=3D 0)
#if HAVE_STRUCT_STAT_ST_BLKSIZE
        printf ("%s", umaxtostr (st.st_blksize, buf));
#endif
      else if (strcmp (p, "blocks") =3D=3D 0)
#if HAVE_STRUCT_STAT_ST_BLOCKS
        printf ("%s", umaxtostr (st.st_blocks, buf));
#endif

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 27 Jun 2012 00:53:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 26 20:53:03 2012
Received: from localhost ([127.0.0.1]:59260 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SjgVC-0004uV-MR
	for submit <at> debbugs.gnu.org; Tue, 26 Jun 2012 20:53:03 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:42142)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1SjgV9-0004u5-CL
	for 10305 <at> debbugs.gnu.org; Tue, 26 Jun 2012 20:53:01 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 471D439E800B;
	Tue, 26 Jun 2012 17:48:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id LV8JSI0KI0KR; Tue, 26 Jun 2012 17:48:53 -0700 (PDT)
Received: from [192.168.1.10] (pool-108-23-119-2.lsanca.fios.verizon.net
	[108.23.119.2])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A49CF39E8007;
	Tue, 26 Jun 2012 17:48:53 -0700 (PDT)
Message-ID: <4FEA5878.6010407@HIDDEN>
Date: Tue, 26 Jun 2012 17:48:56 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:13.0) Gecko/20120615 Thunderbird/13.0.1
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@cs .ucla.ed u>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
In-Reply-To: <006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

On 06/26/2012 09:38 AM, Joachim Schmitz wrote:

> Let me know what you think and where/how you'd do it differently.

The changes mostly look good.  The trivial ones we've incorporated
already.  I have some comments on the nontrivial ones (please see below).
But before we get into it too much further, are you and your company
willing to assign copyright to your nontrival changes to the FSF?
If so, I can send you more info about how to do that.

Here are some comments about that patch:


> --- ./configure.orig	2011-03-12 03:50:18.000000000 -0600
> +++ ./configure	2012-06-26 06:49:17.000000000 -0500

For future versions of this patch there's no need to show differences in
automatically-generated files like 'configure'.

> --- ./gnu/argp-help.c.orig	2011-03-12 03:14:26.000000000 -0600
> +++ ./gnu/argp-help.c	2011-06-16 02:01:23.000000000 -0500

This one Bruno just now fixed in a different way:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=2457d7ca6856f84502b09fa4690f6f4187de050f

> --- ./gnu/regex.c.orig	2011-03-12 03:14:32.000000000 -0600
> +++ ./gnu/regex.c	2011-06-17 04:07:16.000000000 -0500

This one we also fixed in a different way:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=d4903bb0efac5e399b785c71367d8cda3fb539ab

> --- ./gnu/dirfd.c.orig	2011-03-12 03:14:28.000000000 -0600
> +++ ./gnu/dirfd.c	2012-06-25 02:55:09.000000000 -0500
> ...
> +#ifdef __TANDEM
> +# include <unistd.h> /* for _gl_fnum2dt(), needed in C99 mode */
> +#endif

Shouldn't that be "_gl_fnum2fd"?

More important, doesn't the declaration of _gl_fnum2fd belong
better in dirent.h, not unistd.h?  Among other things, that would
mean the above change can be omitted.

>  int
>  dirfd (DIR *dir_p)
>  {
>    int fd = DIR_TO_FD (dir_p);
>    if (fd == -1)
>      errno = ENOTSUP;
> +#ifdef __TANDEM
> +  fd = _gl_fnum2fd(fd);
> +#endif

This might be cleaner if DIR_TO_FD invoked _gl_fnum2fd directly.
That way, dirfd.c could be left alone.  (Or perhaps not; I don't
understand the code that well.)

> +# define NOFNUM      -1

What's this for?  I don't see it used anywhere.

> +# define NOFD        -1

Body needs to be parenthesized.

> +  char fnum;        /* 'y' or 'n', actually a bool */

Why not use 1 and 0?  That's far more typical for boolean values,
and generates better code.

> +#ifdef __TANDEM
> +      || (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)))
> +#else
>        || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)))
> +#endif

fstat doesn't work on Tandem?  I must be missing something here.

>    fd = orig_open (filename, flags, mode);
> +#ifdef __TANDEM
> +	/* On NonStop open(2) can open an OSS directory, but not /G & /E
> +	 * directory, hence we do a dummy open here and override fstat() in 
> +	 * fchdir.c to hide the fact that we have a dummy.
> +	 */ 
> +  if (fd < 0 && errno == EISDIR)
> +     fd = open ("/dev/null", flags, mode);
> +#endif

If 'flags' contains O_WRONLY or O_RDWR, this will misbehave
on an OSS directory, since open will fail with errno == EISDIR
but we don't want to replace it with /dev/null.  So the fallback
needs to be conditioned on the file being opened read-only.

> --- ./gnu/unlinkdir.c.orig	2011-03-12 03:14:34.000000000 -0600
> +++ ./gnu/unlinkdir.c	2012-06-26 08:46:41.000000000 -0500
> ...
> --- ./src/extract.c.orig	2010-11-27 04:33:22.000000000 -0600
> +++ ./src/extract.c	2011-06-16 01:55:46.000000000 -0500

I just now fixed this in a different way in gnulib and tar master.

> /usr/local/bin/diff -EBbu ./tests/genfile.c.orig ./tests/genfile.c
> --- ./tests/genfile.c.orig	2010-10-24 13:06:45.000000000 -0500
> +++ ./tests/genfile.c	2011-06-16 01:55:46.000000000 -0500
> @@ -610,9 +610,17 @@
>        else if (strcmp (p, "size") == 0)
>  	printf ("%s", umaxtostr (st.st_size, buf));
>        else if (strcmp (p, "blksize") == 0)
> +#ifdef __TANDEM
> +	printf ("*****Nothing to print on NonStop for st_blksize****\n");
> +#else
>  	printf ("%s", umaxtostr (st.st_blksize, buf));
> +#endif
>        else if (strcmp (p, "blocks") == 0)
> +#ifdef __TANDEM
> +	printf ("*****Nothing to print on NonStop for st_blocks****\n");
> +#else
>  	printf ("%s", umaxtostr (st.st_blocks, buf));
> +#endif
>        else if (strcmp (p, "atime") == 0)
>  	printf ("%lu", (unsigned long) st.st_atime);
>        else if (strcmp (p, "atimeH") == 0)

I assume st_blksize and st_blocks are garbage on Tandem?
Is there any harm in printing the garbage?




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 26 Jun 2012 22:01:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 26 18:01:29 2012
Received: from localhost ([127.0.0.1]:59146 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SjdpB-0000GH-5w
	for submit <at> debbugs.gnu.org; Tue, 26 Jun 2012 18:01:29 -0400
Received: from mo-p00-ob.rzone.de ([81.169.146.160]:29729)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <bruno@HIDDEN>) id 1Sjdp8-0000G9-NX
	for 10305 <at> debbugs.gnu.org; Tue, 26 Jun 2012 18:01:28 -0400
X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDNRbvY44zMkpA==
X-RZG-CLASS-ID: mo00
Received: from linuix.haible.de
	(dslb-088-068-070-142.pools.arcor-ip.net [88.68.70.142])
	by smtp.strato.de (josoe mo69) (RZmta 29.19 DYNA|AUTH)
	with ESMTPA id e01f5eo5QJoa6O ; Tue, 26 Jun 2012 23:57:18 +0200 (CEST)
From: Bruno Haible <bruno@HIDDEN>
To: Paul Eggert <eggert@HIDDEN>
Bcc: bruno@HIDDEN
Subject: Re: strcasecmp in regex
Date: Tue, 26 Jun 2012 23:59:41 +0200
Message-ID: <1372548.0ANvcaFOM5@linuix>
User-Agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )
In-Reply-To: <4FE9F7EB.1090902@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<8713282.teIaTtIDVg@linuix> <4FE9F7EB.1090902@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>,
	Joachim Schmitz <jojo@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Hi Paul,

> Shouldn't regex be avoiding strcasecmp entirely?
> That is, couldn't there be a weird locale that considers
> the lower-case equivalent of "U" to be "uu", or something
> weird like that?

In such a locale, strcasecmp would not consider "U" and "uu" as
being equivalent; only mbscasecmp would do this.

But you're right: for comparing results of nl_langinfo (CODESET),
one should not use a locale dependent comparison. You wouldn't
want "ISO-8859-9" and "iso-8859-9" to be considered as different,
just because the locale is Turkish.

> For this particular case c-strcase seems overkill, so how
> about the following further patch?
> 
> diff --git a/lib/regcomp.c b/lib/regcomp.c
> index 7eb003b..6d5525a 100644
> --- a/lib/regcomp.c
> +++ b/lib/regcomp.c
> @@ -899,8 +899,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
>  		       != 0);
>  #else
>    codeset_name = nl_langinfo (CODESET);
> -  if (strcasecmp (codeset_name, "UTF-8") == 0
> -      || strcasecmp (codeset_name, "UTF8") == 0)
> +  if ((codeset_name[0] == 'U' || codeset_name[0] == 'u')
> +      && (codeset_name[1] == 'T' || codeset_name[1] == 't')
> +      && (codeset_name[2] == 'F' || codeset_name[2] == 'f')
> +      && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0)
>      dfa->is_utf8 = 1;
>  
>    /* We check exhaustively in the loop below if this charset is a
> diff --git a/modules/regex b/modules/regex
> index 5371bab..cfc5d07 100644
> --- a/modules/regex
> +++ b/modules/regex
> @@ -26,7 +26,6 @@ mbsinit         [test $ac_use_included_regex = yes]
>  nl_langinfo     [test $ac_use_included_regex = yes]
>  stdbool         [test $ac_use_included_regex = yes]
>  stdint          [test $ac_use_included_regex = yes]
> -strcase         [test $ac_use_included_regex = yes]
>  wchar           [test $ac_use_included_regex = yes]
>  wcrtomb         [test $ac_use_included_regex = yes]
>  wctype-h        [test $ac_use_included_regex = yes]

Looks right to me. Please add to this the removal of <strings.h> from
regex_internal.h, since I had already committed the #include <strings.h>.

Bruno





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 26 Jun 2012 18:01:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 26 14:01:07 2012
Received: from localhost ([127.0.0.1]:58873 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Sja4X-0002Nn-Tg
	for submit <at> debbugs.gnu.org; Tue, 26 Jun 2012 14:01:06 -0400
Received: from smtp.cs.ucla.edu ([131.179.128.62]:51738)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1Sja4V-0002Nf-8b
	for 10305 <at> debbugs.gnu.org; Tue, 26 Jun 2012 14:01:04 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 9F7CAA60018;
	Tue, 26 Jun 2012 10:57:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 1NTmZHFrztgd; Tue, 26 Jun 2012 10:57:00 -0700 (PDT)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DC1CCA60005;
	Tue, 26 Jun 2012 10:56:59 -0700 (PDT)
Message-ID: <4FE9F7EB.1090902@HIDDEN>
Date: Tue, 26 Jun 2012 10:56:59 -0700
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: Bruno Haible <bruno@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4F126B95.4060901@HIDDEN>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
	<8713282.teIaTtIDVg@linuix>
In-Reply-To: <8713282.teIaTtIDVg@linuix>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>,
	Joachim Schmitz <jojo@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Shouldn't regex be avoiding strcasecmp entirely?
That is, couldn't there be a weird locale that considers
the lower-case equivalent of "U" to be "uu", or something
weird like that?

For this particular case c-strcase seems overkill, so how
about the following further patch?

diff --git a/lib/regcomp.c b/lib/regcomp.c
index 7eb003b..6d5525a 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -899,8 +899,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
 		       != 0);
 #else
   codeset_name = nl_langinfo (CODESET);
-  if (strcasecmp (codeset_name, "UTF-8") == 0
-      || strcasecmp (codeset_name, "UTF8") == 0)
+  if ((codeset_name[0] == 'U' || codeset_name[0] == 'u')
+      && (codeset_name[1] == 'T' || codeset_name[1] == 't')
+      && (codeset_name[2] == 'F' || codeset_name[2] == 'f')
+      && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0)
     dfa->is_utf8 = 1;
 
   /* We check exhaustively in the loop below if this charset is a
diff --git a/modules/regex b/modules/regex
index 5371bab..cfc5d07 100644
--- a/modules/regex
+++ b/modules/regex
@@ -26,7 +26,6 @@ mbsinit         [test $ac_use_included_regex = yes]
 nl_langinfo     [test $ac_use_included_regex = yes]
 stdbool         [test $ac_use_included_regex = yes]
 stdint          [test $ac_use_included_regex = yes]
-strcase         [test $ac_use_included_regex = yes]
 wchar           [test $ac_use_included_regex = yes]
 wcrtomb         [test $ac_use_included_regex = yes]
 wctype-h        [test $ac_use_included_regex = yes]




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 26 Jun 2012 17:50:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 26 13:50:14 2012
Received: from localhost ([127.0.0.1]:58867 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SjZu1-00028j-C7
	for submit <at> debbugs.gnu.org; Tue, 26 Jun 2012 13:50:14 -0400
Received: from mo-p00-ob.rzone.de ([81.169.146.160]:26347)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <bruno@HIDDEN>) id 1SjZty-00028a-2z
	for 10305 <at> debbugs.gnu.org; Tue, 26 Jun 2012 13:50:11 -0400
X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDNRbvY44zMkpA==
X-RZG-CLASS-ID: mo00
Received: from linuix.haible.de
	(dslb-088-068-070-142.pools.arcor-ip.net [88.68.70.142])
	by smtp.strato.de (josoe mo94) (RZmta 29.19 DYNA|AUTH)
	with ESMTPA id 5026f3o5QHAAvj ; Tue, 26 Jun 2012 19:46:04 +0200 (CEST)
From: Bruno Haible <bruno@HIDDEN>
To: bug-gnulib@HIDDEN
Bcc: bruno@HIDDEN
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Tue, 26 Jun 2012 19:48:27 +0200
Message-ID: <8713282.teIaTtIDVg@linuix>
User-Agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )
In-Reply-To: <006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<4F126B95.4060901@HIDDEN>
	<006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>,
	'Eric Blake' <eblake@HIDDEN>, 'Jim Meyering' <jim@HIDDEN>,
	'Paul Eggert' <eggert@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Joachim Schmitz wrote:
> Also 2 small fixes for C99

Thanks for these. Indeed, the 'argp' and 'regex' modules use strcasecmp()
and should therefore depend 'strcase' (already done) and include <strings.h>
(done through patch below).


2012-06-26  Bruno Haible  <bruno@HIDDEN>

	argp, regex: Ensure strcasecmp gets declared.
	* lib/argp-help.c: Include <strings.h>.
	* lib/regex_internal.h: Likewise.
	Reported and suggested by Joachim Schmitz <jojo@HIDDEN>.

--- lib/argp-help.c.orig	Tue Jun 26 19:44:50 2012
+++ lib/argp-help.c	Tue Jun 26 19:42:04 2012
@@ -29,6 +29,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <assert.h>
 #include <stdarg.h>
 #include <ctype.h>
--- lib/regex_internal.h.orig	Tue Jun 26 19:44:50 2012
+++ lib/regex_internal.h	Tue Jun 26 19:42:56 2012
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include <langinfo.h>
 #ifndef _LIBC





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 26 Jun 2012 16:43:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 26 12:43:02 2012
Received: from localhost ([127.0.0.1]:58811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1SjYqz-0000e0-Kz
	for submit <at> debbugs.gnu.org; Tue, 26 Jun 2012 12:43:01 -0400
Received: from moutng.kundenserver.de ([212.227.17.10]:62070)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1SjYqv-0000dZ-2x
	for 10305 <at> debbugs.gnu.org; Tue, 26 Jun 2012 12:42:58 -0400
Received: from DualCore (dsdf-4db5d3dc.pool.mediaWays.net [77.181.211.220])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0MRybG-1SHQ663rZq-00SdI0; Tue, 26 Jun 2012 18:38:41 +0200
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@HIDDEN>
In-Reply-To: <4F126B95.4060901@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Tue, 26 Jun 2012 18:38:33 +0200
Message-ID: <006a01cd53ba$20b0c2d0$62124870$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_006B_01CD53CA.E440BEC0"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwH+2w5eAQGnVk0Cb7pV+gIvBJFxAj0WexwCbwaH8wKJIqXJAvy/AIQBJ3MPYgG7MJDhAU6D9HgCmjll8wHm/rCGAnK3wOgCVjj1uAE8HVXkAicQkeUB2+sKxwGbh2ykAZk2QGcBQolP+AJbwNXAAmMePy6XAk2BwA==
Content-Language: de
X-Provags-ID: V02:K0:UhlXSpoQeRBCzz9E9RTqAcyPV1oYj9Py28iEgz4nqe9
	2FgRYmEXZ8pXYknngp2F3YV019pDz2uc0Gok2lB5vGurNo1Liq
	blduB4ukG423e/cvO6K7QLGaWEHcUUMXMB+QH0SylpNLDcIMyy
	icG6tuHtXtKcJHI6tOuW3bS8hnxiST0jpsGch6/vYJHm7CE+/3
	hU9xI3fLJve6QzV94JIjZf9d1LZ/DexSrS2yG0VGbHjkYvBmFz
	2n+LBWINQBhWCKrGcJ5VmRaTtTG1lfptoGmUdYPL6BznjWjwyO
	T1vevEqo8wTRlcs0/n9TyOzm+AIYh8mVkL7oK33PAMMj4ytIGY
	Jo0PUSzBtj5MCflhH6cH+bY8NYn1lF+X3hdnO6IAmQHjujXtgw
	TEhDiHo7Sd2lw==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

This is a multipart message in MIME format.

------=_NextPart_000_006B_01CD53CA.E440BEC0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Sunday, January 15, 2012 7:01 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim =
Meyering'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 01/14/2012 08:27 AM, Joachim Schmitz wrote:
> >> Oh well, it was a bit of a stab in the dark anyway.
> >> > I guess we'll have to do Eric's suggestion to wrap opendir
> >> > <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10305#68>.
> >> > That should work around the problem, and in some sense it's nicer
> >> > anyway because it causes dirfd to work in the usual way (as =
required in the
> next POSIX).
> > Any progress on this?
>=20
> Not be me, alas.  Is it something you can work on?

It's been a while but we now have something working.=20
Attached the patch that made it work for us with tar-1.26, I'll try the =
equivalent on coreutils-8.17 later this week.

We need an extended check in configure, small additions to dirfd.c, =
open.c, unistd.in.h and a somewhat larger addition to fchdir.c. Also 2 =
small fixes for C99 and 2 more, one for gnulib and one for tar, to cope =
with HP NotStop's superuser having UID 65530 rather than 0. And one fix =
for tar's test suite on HP NonStop

Let me know what you think and where/how you'd do it differently.

Bye, Jojo

------=_NextPart_000_006B_01CD53CA.E440BEC0
Content-Type: application/octet-stream;
	name="gnulib.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="gnulib.diff"

/usr/local/bin/diff -EBbu ./configure.orig ./configure
--- ./configure.orig	2011-03-12 03:50:18.000000000 -0600
+++ ./configure	2012-06-26 06:49:17.000000000 -0500
@@ -26352,7 +26352,7 @@
 else
=20
         dirfd_save_CFLAGS=3D$CFLAGS
-        for ac_expr in d_fd dd_fd; do
+        for ac_expr in d_fd dd_fd dd1; do
=20
           CFLAGS=3D"$CFLAGS -DDIR_FD_MEMBER_NAME=3D$ac_expr"
           cat >conftest.$ac_ext <<_ACEOF
/usr/local/bin/diff -EBbu ./gnu/argp-help.c.orig ./gnu/argp-help.c
--- ./gnu/argp-help.c.orig	2011-03-12 03:14:26.000000000 -0600
+++ ./gnu/argp-help.c	2011-06-16 02:01:23.000000000 -0500
@@ -52,6 +52,8 @@
 #include "argp-fmtstream.h"
 #include "argp-namefrob.h"
=20
+# include <strings.h> /* for strcasecmp(), needed in C99 mode */

 #ifndef SIZE_MAX
 # define SIZE_MAX ((size_t) -1)
 #endif
/usr/local/bin/diff -EBbu ./gnu/dirfd.c.orig ./gnu/dirfd.c
--- ./gnu/dirfd.c.orig	2011-03-12 03:14:28.000000000 -0600
+++ ./gnu/dirfd.c	2012-06-25 02:55:09.000000000 -0500
@@ -24,11 +24,18 @@
 #include <dirent.h>
 #include <errno.h>
=20
+#ifdef __TANDEM
+# include <unistd.h> /* for _gl_fnum2dt(), needed in C99 mode */
+#endif
+
 int
 dirfd (DIR *dir_p)
 {
   int fd =3D DIR_TO_FD (dir_p);
   if (fd =3D=3D -1)
     errno =3D ENOTSUP;
+#ifdef __TANDEM
+  fd =3D _gl_fnum2fd(fd);
+#endif
   return fd;
 }
/usr/local/bin/diff -EBbu ./gnu/fchdir.c.orig ./gnu/fchdir.c
--- ./gnu/fchdir.c.orig	2011-03-12 03:14:28.000000000 -0600
+++ ./gnu/fchdir.c	2012-06-26 09:18:07.000000000 -0500
@@ -44,6 +44,13 @@
 # endif
 #endif
=20
+#ifdef __TANDEM
+# define BOOL_NOFNUM 'n'
+# define BOOL_FNUM   'y'
+# define NOFNUM      -1
+# define NOFD        -1
+#endif
+
 /* This replacement assumes that a directory is not renamed while =
opened
    through a file descriptor.
=20
@@ -57,10 +64,17 @@
 typedef struct
 {
   char *name;       /* Absolute name of the directory, or NULL.  */
+#ifdef __TANDEM
+  char fnum;        /* 'y' or 'n', actually a bool */
+#endif
   /* FIXME - add a DIR* member to make dirfd possible on mingw?  */
 } dir_info_t;
 static dir_info_t *dirs;
 static size_t dirs_allocated;
+#ifdef __TANDEM
+static int *fnum2fdmap;
+static size_t fds_allocated;
+#endif
=20
 /* Try to ensure dirs has enough room for a slot at index fd; free any
    contents already in that slot.  Return false and set errno to
@@ -89,8 +103,40 @@
       dirs =3D new_dirs;
       dirs_allocated =3D new_allocated;
     }
+#ifdef __TANDEM
+  dirs[fd].fnum =3D BOOL_NOFNUM;
+#endif
+  return true;
+}
+
+#ifdef __TANDEM
+static bool
+ensure_fd_slot (short fnum)
+{
+  if (fnum < fds_allocated)
+     fnum2fdmap[fnum] =3D NOFD;
+  else
+  {
+      size_t new_allocated;
+      int *new;
+
+      new_allocated =3D 2 * fds_allocated + 1;
+      if (new_allocated <=3D fnum)
+        new_allocated =3D fnum + 1;
+      new =3D
+        (fnum2fdmap !=3D NULL
+         ? realloc (fnum2fdmap, new_allocated * sizeof *new)
+         : malloc (new_allocated * sizeof *new));
+      if (new =3D=3D NULL)
+        return false;
+      memset (new + fds_allocated, NOFD,
+              (new_allocated - fds_allocated) * sizeof *new);
+      fnum2fdmap =3D new;
+      fds_allocated =3D new_allocated;
+  } =20
   return true;
 }
+#endif
=20
 /* Return the canonical name of DIR in malloc'd storage.  */
 static char *
@@ -137,6 +184,9 @@
     {
       free (dirs[fd].name);
       dirs[fd].name =3D NULL;
+#ifdef __TANDEM
+      dirs[fd].fnum =3D BOOL_NOFNUM;
+#endif
     }
 }
=20
@@ -152,7 +202,11 @@
=20
   assert (0 <=3D fd);
   if (REPLACE_OPEN_DIRECTORY
+#ifdef __TANDEM
+      || (stat (filename, &statbuf) =3D=3D 0 && S_ISDIR =
(statbuf.st_mode)))
+#else
       || (fstat (fd, &statbuf) =3D=3D 0 && S_ISDIR (statbuf.st_mode)))
+#endif
     {
       if (!ensure_dirs_slot (fd)
           || (dirs[fd].name =3D get_name (filename)) =3D=3D NULL)
@@ -162,6 +216,9 @@
           errno =3D saved_errno;
           return -1;
         }
+#ifdef __TANDEM
+      dirs[fd].fnum =3D BOOL_NOFNUM;
+#endif
     }
   return fd;
 }
@@ -186,12 +243,18 @@
           errno =3D saved_errno;
           newfd =3D -1;
         }
+#ifdef __TANDEM
+      dirs[newfd].fnum =3D BOOL_NOFNUM;
+#endif
     }
   else if (newfd < dirs_allocated)
     {
       /* Duplicated a non-directory; ensure newfd is cleared.  */
       free (dirs[newfd].name);
       dirs[newfd].name =3D NULL;
+#ifdef __TANDEM
+      dirs[newfd].fnum =3D BOOL_NOFNUM;
+#endif
     }
   return newfd;
 }
@@ -215,7 +278,7 @@
   return NULL;
 }
=20
-#if REPLACE_OPEN_DIRECTORY
+#if __TANDEM || REPLACE_OPEN_DIRECTORY
 /* Return stat information about FD in STATBUF.  Needed when
    rpl_open() used a dummy file to work around an open() that can't
    normally visit directories.  */
@@ -237,10 +300,20 @@
 #undef closedir
 {
   int fd =3D dirfd (dp);
+#ifdef __TANDEM
+  short fnum =3D DIR_TO_FD(dp);
+#endif
   int retval =3D closedir (dp);
=20
   if (retval >=3D 0)
+#ifdef __TANDEM
+  {
+    close (fd);
+    _gl_unregister_fnum (fnum);
+  }
+#else
     _gl_unregister_fd (fd);
+#endif
   return retval;
 }
=20
@@ -253,11 +326,28 @@
   dp =3D opendir (filename);
   if (dp !=3D NULL)
     {
+#ifdef __TANDEM
+      /* On NonStop a opendir will not associate a fd with a open =
directory
+       * So open the same directory using open(2) & get a valid fd.
+       */=20
+      int fd =3D open(filename, O_RDONLY);
+      if (fd < 0)
+        {
+          /* Clean up to before exit */
+          closedir(dp);
+          return NULL;
+      }
+      if (0 <=3D fd && _gl_register_fnum (fd, DIR_TO_FD (dp)) !=3D =
DIR_TO_FD(dp))
+#else
       int fd =3D dirfd (dp);
       if (0 <=3D fd && _gl_register_fd (fd, filename) !=3D fd)
+#endif
         {
           int saved_errno =3D errno;
           closedir (dp);
+#ifdef __TANDEM
+          close(fd);
+#endif
           errno =3D saved_errno;
           return NULL;
         }
@@ -278,6 +368,35 @@
   return newfd;
 }
=20
+#ifdef __TANDEM
+short _gl_register_fnum (int fd, short fnum)
+{
+  if (!ensure_fd_slot (fnum))
+    {
+      int saved_errno =3D errno;
+      close (fd);
+      errno =3D saved_errno;
+      return -1;
+    }
+  fnum2fdmap[fnum] =3D fd;
+  dirs[fd].fnum =3D BOOL_FNUM;
+  return fnum;
+}
+=20
+void _gl_unregister_fnum(short fnum)
+{
+  if (fnum >=3D 0 && fnum < fds_allocated)
+    fnum2fdmap[fnum] =3D NOFD;
+}
+
+int _gl_fnum2fd (int fnum_or_fd)
+{
+  int ret;
+  (dirs[fnum_or_fd].fnum =3D=3D BOOL_NOFNUM)? (ret =3D fnum_or_fd) : =
(ret =3D fnum2fdmap[fnum_or_fd]);
+  return ret;
+}
+#endif
+
=20
 /* Implement fchdir() in terms of chdir().  */
=20
/usr/local/bin/diff -EBbu ./gnu/open.c.orig ./gnu/open.c
--- ./gnu/open.c.orig	2011-03-12 03:14:31.000000000 -0600
+++ ./gnu/open.c	2012-06-26 08:25:35.000000000 -0500
@@ -104,6 +104,14 @@
 #endif
=20
   fd =3D orig_open (filename, flags, mode);
+#ifdef __TANDEM
+	/* On NonStop open(2) can open an OSS directory, but not /G & /E
+	 * directory, hence we do a dummy open here and override fstat() in=20
+	 * fchdir.c to hide the fact that we have a dummy.
+	 */=20
+  if (fd < 0 && errno =3D=3D EISDIR)
+     fd =3D open ("/dev/null", flags, mode);
+#endif
=20
 #if REPLACE_FCHDIR
   /* Implementing fchdir and fdopendir requires the ability to open a
/usr/local/bin/diff -EBbu ./gnu/regex.c.orig ./gnu/regex.c
--- ./gnu/regex.c.orig	2011-03-12 03:14:32.000000000 -0600
+++ ./gnu/regex.c	2011-06-17 04:07:16.000000000 -0500
@@ -26,6 +26,8 @@
 # error "This is C code, use a C compiler"
 #endif
=20
+#include <strings.h> /* for strcasecmp(), needed in C99 mode */
+
 #ifdef _LIBC
 /* We have to keep the namespace clean.  */
 # define regfree(preg) __regfree (preg)
/usr/local/bin/diff -EBbu ./gnu/unistd.in.h.orig ./gnu/unistd.in.h
--- ./gnu/unistd.in.h.orig	2011-03-12 03:14:34.000000000 -0600
+++ ./gnu/unistd.in.h	2012-06-26 09:19:21.000000000 -0500
@@ -438,6 +438,13 @@
 _GL_EXTERN_C void _gl_unregister_fd (int fd);
 _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
 _GL_EXTERN_C const char *_gl_directory_name (int fd);
+#ifdef __TANDEM
+_GL_EXTERN_C short _gl_register_fnum (int fd, short fnum)
+     _GL_ARG_NONNULL ((2));
+_GL_EXTERN_C int _gl_fnum2fd (int fnum_or_fd)
+     _GL_ARG_NONNULL ((1));
+_GL_EXTERN_C void _gl_unregister_fnum(short fnum);
+#endif
=20
 # else
 #  if !@HAVE_DECL_FCHDIR@
/usr/local/bin/diff -EBbu ./gnu/unlinkdir.c.orig ./gnu/unlinkdir.c
--- ./gnu/unlinkdir.c.orig	2011-03-12 03:14:34.000000000 -0600
+++ ./gnu/unlinkdir.c	2012-06-26 08:46:41.000000000 -0500
@@ -45,8 +45,12 @@
       cannot =3D (priv_set_ismember (PRIV_SYS_LINKDIR) =3D=3D 0);
 # else
       /* In traditional Unix, only root can unlink directories.  */
+#  ifdef __TANDEM /* super user's UID is 65535 here */
+      cannot =3D (geteuid () !=3D 65535);
+#  else
       cannot =3D (geteuid () !=3D 0);
+#  endif
 # endif
       initialized =3D true;
     }
/usr/local/bin/diff -EBbu ./src/extract.c.orig ./src/extract.c
--- ./src/extract.c.orig	2010-11-27 04:33:22.000000000 -0600
+++ ./src/extract.c	2011-06-16 01:55:46.000000000 -0500
@@ -150,7 +150,11 @@
 void
 extr_init (void)
 {
+#ifdef __TANDEM
+  we_are_root =3D geteuid () =3D=3D 65535;
+#else
   we_are_root =3D geteuid () =3D=3D 0;
+#endif
   same_permissions_option +=3D we_are_root;
   same_owner_option +=3D we_are_root;
=20
/usr/local/bin/diff -EBbu ./tests/genfile.c.orig ./tests/genfile.c
--- ./tests/genfile.c.orig	2010-10-24 13:06:45.000000000 -0500
+++ ./tests/genfile.c	2011-06-16 01:55:46.000000000 -0500
@@ -610,9 +610,17 @@
       else if (strcmp (p, "size") =3D=3D 0)
 	printf ("%s", umaxtostr (st.st_size, buf));
       else if (strcmp (p, "blksize") =3D=3D 0)
+#ifdef __TANDEM
+	printf ("*****Nothing to print on NonStop for st_blksize****\n");
+#else
 	printf ("%s", umaxtostr (st.st_blksize, buf));
+#endif
       else if (strcmp (p, "blocks") =3D=3D 0)
+#ifdef __TANDEM
+	printf ("*****Nothing to print on NonStop for st_blocks****\n");
+#else
 	printf ("%s", umaxtostr (st.st_blocks, buf));
+#endif
       else if (strcmp (p, "atime") =3D=3D 0)
 	printf ("%lu", (unsigned long) st.st_atime);
       else if (strcmp (p, "atimeH") =3D=3D 0)

------=_NextPart_000_006B_01CD53CA.E440BEC0--





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.
Added tag(s) notabug. Request was from Jim Meyering <jim@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Jim Meyering <jim@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 29 Jan 2012 14:30:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 29 09:30:44 2012
Received: from localhost ([127.0.0.1]:43208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RrVmF-0007Yt-5B
	for submit <at> debbugs.gnu.org; Sun, 29 Jan 2012 09:30:43 -0500
Received: from mx.meyering.net ([88.168.87.75]:45400)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jim@HIDDEN>)
	id 1RrVmA-0007Yf-1J; Sun, 29 Jan 2012 09:30:40 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id B22AD600DF;
	Sun, 29 Jan 2012 15:30:32 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <4EF22AEB.8000809@HIDDEN> (Eric Blake's message of "Wed, 21
	Dec 2011 11:52:27 -0700")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN> <4EF22AEB.8000809@HIDDEN>
Date: Sun, 29 Jan 2012 15:30:32 +0100
Message-ID: <87fweyr37b.fsf@HIDDEN>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>,
	Paul Eggert <eggert@HIDDEN>, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

severity 10305 wishlist
tags 10305 + notabug
thanks

Eric Blake wrote:
> On 12/21/2011 11:42 AM, Paul Eggert wrote:
>> On 12/21/11 08:27, Eric Blake wrote:
>>> maybe we should wrap opendir() so that the gnulib rpl_opendir()
>>> always opens a directory at the same time
>>
>> That sounds a bit drastic, but it may be necessary.
>>
>> How about this idea instead?  Use the following patch,
>> so that fts_build does not assume that dirfd works.
>>
>> POSIX does not require dirfd to work,
>
> Actually, the next version of POSIX _will_ require dirfd to work, so we
> may have to go with wrapping rpl_opendir anyways:
>
> http://austingroupbugs.net/view.php?id=391
>
> But you are correct that older systems do not meet the future POSIX
> wording, so if your hack works, it's certainly simpler for the short term.

It is clear that this is not really a bug in coreutils,
but more an opportunity to (through gnulib) make fts, and thus rm
portable to this aspect of NonStop.

Marked as notabug and wishlist.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 15 Jan 2012 14:25:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 15 09:25:40 2012
Received: from localhost ([127.0.0.1]:58039 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RmR1T-00076a-Po
	for submit <at> debbugs.gnu.org; Sun, 15 Jan 2012 09:25:30 -0500
Received: from moutng.kundenserver.de ([212.227.17.10]:60185)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1RmR1F-00076G-FM
	for 10305 <at> debbugs.gnu.org; Sun, 15 Jan 2012 09:25:25 -0500
Received: from DualCore (dsdf-4db55882.pool.mediaWays.net [77.181.88.130])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0LlLtL-1SMKBP1uNT-00bHf4; Sun, 15 Jan 2012 15:24:04 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
	<4F126B95.4060901@HIDDEN>
In-Reply-To: <4F126B95.4060901@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Sun, 15 Jan 2012 15:24:00 +0100
Message-ID: <005801ccd391$53c83490$fb589db0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwH+2w5eAQGnVk0Cb7pV+gIvBJFxAj0WexwCbwaH8wKJIqXJAvy/AIQBJ3MPYgG7MJDhAU6D9HgCmjll8wHm/rCGAnK3wOgCVjj1uAE8HVXkAicQkeUB2+sKxwGbh2ykAZk2QGcBQolP+AJbwNXAAmMePy6WAf+c0A==
Content-Language: de
X-Provags-ID: V02:K0:1aDYO0k53ZlLu6O0X6AeWQNr7XNjsDQvZNnO86b9pNU
	9KmEFJuHs3lDGDWBHEWKbEEWuXlAZOZ8UtfArimLQQiKAMEc2p
	+/jEaA9vFv38XSWwsTHDajERWhaozVrj6l32tR0LtmXtOTkTv7
	4xxOhZTCcX3qL0FAAAEXKwaNLleW4ogGorymhjczcaBTXWZyE5
	6mzg4dgvLri8gAVt1evlmlWAH0Tix1fV5470GN4IKv0j/IhjKy
	9iaUXK1zN0MeKyrIYYOuR6UpOpIJdmcGpNtoSW06odIv+ylTrw
	NTNrewgbtUvS0DQjpAbITw/7zFR1tT3kB+UJIiqCdMGvCuRNFO
	NW8iKghsdEfbwtAqOkcsAnoOiX9ba5VtqiyWUgd4q5uU+q/x9d
	kF8YDPto1wIyA==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Sunday, January 15, 2012 7:01 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN; 'Eric Blake'; 'Jim =
Meyering'
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 01/14/2012 08:27 AM, Joachim Schmitz wrote:
> >> Oh well, it was a bit of a stab in the dark anyway.
> >> > I guess we'll have to do Eric's suggestion to wrap opendir
> >> > <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10305#68>.
> >> > That should work around the problem, and in some sense it's nicer
> >> > anyway because it causes dirfd to work in the usual way (as =
required in the
> next POSIX).
> > Any progress on this?
>=20
> Not be me, alas.  Is it something you can work on?

I'm afraid I cannot, wouldn't even know where to start.
I'd be willing to test though.

Bye, Jojo=20





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 15 Jan 2012 06:01:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 15 01:01:47 2012
Received: from localhost ([127.0.0.1]:57830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RmJA2-0002wd-2a
	for submit <at> debbugs.gnu.org; Sun, 15 Jan 2012 01:01:47 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:40999)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <eggert@HIDDEN>) id 1RmJ9z-0002wW-9E
	for 10305 <at> debbugs.gnu.org; Sun, 15 Jan 2012 01:01:44 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 17019A60008;
	Sat, 14 Jan 2012 22:00:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id JlCzCwvgsHPE; Sat, 14 Jan 2012 22:00:55 -0800 (PST)
Received: from [192.168.1.5] (ip70-178-244-53.ks.ks.cox.net [70.178.244.53])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id AFBDF39E8008;
	Sat, 14 Jan 2012 22:00:54 -0800 (PST)
Message-ID: <4F126B95.4060901@HIDDEN>
Date: Sat, 14 Jan 2012 22:00:53 -0800
From: Paul Eggert <eggert@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
	<005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
In-Reply-To: <005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Eric Blake' <eblake@HIDDEN>, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

On 01/14/2012 08:27 AM, Joachim Schmitz wrote:
>> Oh well, it was a bit of a stab in the dark anyway.
>> > I guess we'll have to do Eric's suggestion to wrap opendir
>> > <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10305#68>.
>> > That should work around the problem, and in some sense it's nicer anyway
>> > because it causes dirfd to work in the usual way (as required in the next POSIX).
> Any progress on this?

Not be me, alas.  Is it something you can work on?




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 14 Jan 2012 16:28:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 14 11:28:57 2012
Received: from localhost ([127.0.0.1]:57502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rm6TQ-0000ZJ-Rf
	for submit <at> debbugs.gnu.org; Sat, 14 Jan 2012 11:28:57 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:64865)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <jojo@HIDDEN>) id 1Rm6TO-0000ZB-MO
	for 10305 <at> debbugs.gnu.org; Sat, 14 Jan 2012 11:28:55 -0500
Received: from DualCore (dsdf-4db5fb92.pool.mediaWays.net [77.181.251.146])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0MSmkD-1SDM7p3pFF-00SSE9; Sat, 14 Jan 2012 17:28:01 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
	<4EF2F52E.1040804@HIDDEN>
In-Reply-To: <4EF2F52E.1040804@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Sat, 14 Jan 2012 17:27:58 +0100
Message-ID: <005b01ccd2d9$7ad16060$70742120$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKQBmTZAZwFCiU/4lhxELbA=
Content-Language: de
X-Provags-ID: V02:K0:kp5PoNLnKhjjUubpyNH2zlcRcjtcFe0p/JM3pdLVhyO
	XxBXxsUAsNj5Wd1ymK12Pfx3jSW2/4vQAB66AOPegKdDsvZQjH
	4rZQeOXVkg8rWPlrWhrHsJM5VPjlX8j02EUEIo/dPIUz0U6UDM
	WDq+6TyYTQoZo2yfIaci1O7dFmQCa60lpbsx5Xfca9xyFaKH95
	hNRIw7IKFKR5JzrinQoaXcDWItLnPSKEU6vOdTJ14n2wGBQBmV
	I8g/MVX7vPhvHa6MS/neP7deUC/KNNcq5jP9nIDXFDiwFJX40X
	keX/T2IuqszKfgkN+QXTsf5wSLORXb3/x/t+ks3KPCE740qOHD
	HXXXidn/TapjgYA+j8qKvUzkhaDxJ3opc7gbJpqK2EJvT5us/+
	EjL50U4/xvWQQ==
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Thursday, December 22, 2011 10:15 AM
> To: Joachim Schmitz
> Cc: 'Eric Blake'; 'Jim Meyering'; 10305 <at> debbugs.gnu.org; =
bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/21/11 23:54, Joachim Schmitz wrote:
> > The code path you modified is not touched at all.
>=20
> Oh well, it was a bit of a stab in the dark anyway.
> I guess we'll have to do Eric's suggestion to wrap opendir
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10305#68>.
> That should work around the problem, and in some sense it's nicer =
anyway
> because it causes dirfd to work in the usual way (as required in the =
next POSIX).

Any progress on this?

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 22 Dec 2011 09:17:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 22 04:17:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdemO-0001S7-S2
	for submit <at> debbugs.gnu.org; Thu, 22 Dec 2011 04:17:37 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RdemM-0001Rz-7S
	for 10305 <at> debbugs.gnu.org; Thu, 22 Dec 2011 04:17:35 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 6A074A60007;
	Thu, 22 Dec 2011 01:15:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id SgWKTws+yWRC; Thu, 22 Dec 2011 01:15:23 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 37363A60004;
	Thu, 22 Dec 2011 01:15:23 -0800 (PST)
Message-ID: <4EF2F52E.1040804@HIDDEN>
Date: Thu, 22 Dec 2011 01:15:26 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
	<002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
In-Reply-To: <002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 12/21/11 23:54, Joachim Schmitz wrote:
> The code path you modified is not touched at all.

Oh well, it was a bit of a stab in the dark anyway.
I guess we'll have to do Eric's suggestion to wrap opendir
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10305#68>.
That should work around the problem, and in some sense
it's nicer anyway because it causes dirfd to work in
the usual way (as required in the next POSIX).




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 22 Dec 2011 08:43:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 22 03:43:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdeFV-0000g8-4S
	for submit <at> debbugs.gnu.org; Thu, 22 Dec 2011 03:43:37 -0500
Received: from moutng.kundenserver.de ([212.227.17.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RdeFT-0000g0-5x
	for 10305 <at> debbugs.gnu.org; Thu, 22 Dec 2011 03:43:36 -0500
Received: from DualCore (dsdf-4db52245.pool.mediaWays.net [77.181.34.69])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MIPbr-1Rgf1S1qcJ-004CFS; Thu, 22 Dec 2011 09:41:21 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Eric Blake'" <eblake@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<005e01ccc003$b6b56d80$24204880$@schmitz-digital.de>
	<4EF21821.7090407@HIDDEN>
In-Reply-To: <4EF21821.7090407@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 22 Dec 2011 09:41:17 +0100
Message-ID: <003601ccc085$7985d8a0$6c9189e0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAc8t0RYAvqMnSZYG2+aw
Content-Language: de
X-Provags-ID: V02:K0:qJx+oUpN1Ur2RbgUIJUC8NmF/7X+aluIJ7RZMz7geTu
	sJaZvhJspbOdM80T78m2w9eXpu2BHUrvnC3DndhTzUyvQyuKqp
	QQ2nckV4JqK8tEngayCkK1ulGekGcsUgbEUq9HYBhz9qOcatt5
	bn2qG9UlVCOr4wpeAkkHZxtTvOK9406DUWYNXtsRyb0J+8ElHE
	hE/WbIrsN9T+thPDhAy58N3hfIpBw/9jycj8cQc7wEWgLMgiMN
	6kZ+ySHVFH8HnhX8dOMqwc95s2kHF45XahYj1h3YQ7ucLQUVWe
	vZQfkNGn8BxcOmKasF3VvUTt7AwA5aXETMMFGARaKGneN39Nw7
	ZjaIjf1JC/2/bQ3uMlvD8qiy/SkY71iAKp/BWTsrgPf46yulmq
	73FtmGPsOdheA==
X-Spam-Score: -3.2 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN, 'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.2 (---)

> From: Eric Blake [mailto:eblake@HIDDEN]
> Sent: Wednesday, December 21, 2011 6:32 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; 10305 <at> debbugs.gnu.org; 'Paul Eggert'; bug-
> gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/21/2011 10:12 AM, Joachim Schmitz wrote:
> >>> Write a small test program that opens say four directories, to get
> >>> one
> >>> DIR* pointer for each.  Then print a table of the DIR member =
values.
> >>> Maybe you'll see a pattern, i.e., how to derive an FD number from
> >>> those dd1,2,3 fields.
> >
> > Yes, indeed, thanks for that idea (should have been mine):
> > It got to be dd1, only it is not an fd but something called fnum and
> > these a) start counting with 1 rather than 0 and b) have 1 and 2 =
being
> > root and CPD, followed by 3,4 and 5 being stdin, stdout, stderr... =
it
> > seems fnum -3 =3D=3D fd
>=20
> Yay - we can implement dirfd() in terms of dd1-3.
>=20
> Please try this on coreutils:
>=20
> ./configure gl_cv_sys_dir_fd_member_name=3D'dd1-3'

I tried something to a similar effect, I manually changed config.h =
accordingly (see other email of mine) and rebuilt dirfd.o, rebuilt =
libcoreutils.a, relinked rm:
Didn't work :-(

In case it matters: I'm using=20
./configure --prefix=3D/usr/local =
--enable-install-program=3Darch,hostname --without-gmp CFLAGS=3D"-O0 -g"

Another attempt with adding gl_cv_sys_dir_fd_member_name=3D'dd1-3':
Unfortunatly it doesn't help

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 22 Dec 2011 07:57:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 22 02:57:13 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RddWb-000858-IB
	for submit <at> debbugs.gnu.org; Thu, 22 Dec 2011 02:57:13 -0500
Received: from moutng.kundenserver.de ([212.227.126.186])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RddWZ-000851-Gn
	for 10305 <at> debbugs.gnu.org; Thu, 22 Dec 2011 02:57:12 -0500
Received: from DualCore (dsdf-4db52245.pool.mediaWays.net [77.181.34.69])
	by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis)
	id 0MAeNv-1RWjbh0BfH-00BpJN; Thu, 22 Dec 2011 08:54:54 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>,
	"'Eric Blake'" <eblake@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
In-Reply-To: <4EF2287C.8040009@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 22 Dec 2011 08:54:50 +0100
Message-ID: <002f01ccc07e$fc03edf0$f40bc9d0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHAZuHbKSWDmkOwA==
Content-Language: de
X-Provags-ID: V02:K0:YYmhhxZ3C+RuF3vkqVPQ1W1ma8ocFGMzHkPDcJQq2bL
	3sHaI66r1texOaGEZ5+Nh7QSFfbYMmt16bt36XULmyBDxSnMYK
	+5keaZZLtOMErGYIVz7ZcqehIexD7OEBPk93FfWP9i/rvwsZJn
	hOS3z9oIHxDe/JrfgfCIdeaUjXi+1ELXniIVKYN/HXOqVlpQgW
	bcy40zWgCyMHxuyWxkHWocFDXXvaX3qtVyjbzFWjHBxvQv3boX
	T8M7yG402H4WDyuPN2dmMTRkABDXaFYzDZmeuEivVHuXzX2zpu
	WCeAgEFAS0Ah4D2vmKq7hOwgbsZGEDm8RdC27jOkwk4wkWOd/E
	i2Vky5RQygeUtNZv9vy4rNrYMCp8FXrgsE8pndsu3cF09JtrGL
	56kfdDNE8ozKg==
X-Spam-Score: -3.2 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.2 (---)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Wednesday, December 21, 2011 7:42 PM
> To: Eric Blake
> Cc: Jim Meyering; 10305 <at> debbugs.gnu.org; Joachim Schmitz; bug-
> gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/21/11 08:27, Eric Blake wrote:
> > maybe we should wrap opendir() so that the gnulib rpl_opendir() =
always
> > opens a directory at the same time
>=20
> That sounds a bit drastic, but it may be necessary.
>=20
> How about this idea instead?  Use the following patch, so that =
fts_build does not
> assume that dirfd works.
>=20
> POSIX does not require dirfd to work, and NonStop is within its rights =
to not
> support dirfd, and in this particular case I think the code will work =
without it
> (albeit less reliably in the presence of very large file trees).
>=20
> Joachim, does this patch fix "rm" for you?  If not, what problems does =
it run
> into?  (I have not audited the code for all uses of dirfd, just for =
this one.)

And this seems to be the problem, dirfd() gets called 3 times:

1st time=20
12 dirfd() dirfd.c:28 0x7002dbe2=09
11 rpl_opendir() opendir.c:136 0x70065000=09
10 opendir_safer() opendir-safer.c:33 0x70054450=09
9 fd_clone_opendir() fdopendir.c:159 0x70032650=09
8 fdopendir_with_dup() fdopendir.c:119 0x70032000=09
7 fdopendir() fdopendir.c:68 0x700319d0=09
6 opendirat() fts.c:310 0x70033a30=09
5 fts_build() fts.c:1305 0x7003dcf0=09
4 fts_read() fts.c:902 0x70039b10=09
3 rm() remove.c:598 0x7001ad10=09
2 main() rm.c:343 0x70015910=09
1 _MAIN() ATOM.$RLSE.T8432H03.CPLMAINC:50 0x70012d40=09
2nd time=20
11 dirfd() dirfd.c:28 0x7002dbe2=09
10 opendir_safer() opendir-safer.c:37 0x700544d0=09
9 fd_clone_opendir() fdopendir.c:159 0x70032650=09
8 fdopendir_with_dup() fdopendir.c:119 0x70032000=09
7 fdopendir() fdopendir.c:68 0x700319d0=09
6 opendirat() fts.c:310 0x70033a30=09
5 fts_build() fts.c:1305 0x7003dcf0=09
4 fts_read() fts.c:902 0x70039b10=09
3 rm() remove.c:598 0x7001ad10=09
2 main() rm.c:343 0x70015910=09
1 _MAIN() ATOM.$RLSE.T8432H03.CPLMAINC:50 0x70012d40=09

3rd time:
7 dirfd() dirfd.c:28 0x7002dbe2=09
6 rpl_closedir() closedir.c:43 0x7002da90=09
5 fts_build() fts.c:1397 0x7003e7d0=09
4 fts_read() fts.c:902 0x70039b10=09
3 rm() remove.c:598 0x7001ad10=09
2 main() rm.c:343 0x70015910=09
1 _MAIN() ATOM.$RLSE.T8432H03.CPLMAINC:50 0x70012d40=09

The code path you modified is not touched at all.

> diff --git a/lib/fts.c b/lib/fts.c
> index ccd1980..4dc6809 100644
> --- a/lib/fts.c
> +++ b/lib/fts.c
> @@ -1283,7 +1283,7 @@ fts_build (register FTS *sp, int type)
>          FTSENT *cur =3D sp->fts_cur;
>          bool continue_readdir =3D !!cur->fts_dirp;
>=20
> -        /* When cur->fts_dirp is non-NULL, that means we should
> +        /* If cur->fts_dirp is non-NULL and dirfd is supported,
>             continue calling readdir on that existing DIR* pointer
>             rather than opening a new one.  */
>          if (continue_readdir)
> @@ -1292,16 +1292,20 @@ fts_build (register FTS *sp, int type)
>              dir_fd =3D dirfd (dp);
>              if (dir_fd < 0)
>                {
> +                int dirfd_errno =3D errno;
>                  closedir_and_clear (cur->fts_dirp);
>                  if (type =3D=3D BREAD)
>                    {
>                      cur->fts_info =3D FTS_DNR;
>                      cur->fts_errno =3D errno;
>                    }
> -                return NULL;
> +                if (dirfd_errno !=3D ENOTSUP)
> +                  return NULL;
> +                continue_readdir =3D false;
>                }
>            }
> -        else
> +
> +        if (! continue_readdir)
>            {
>              /* Open the directory for reading.  If this fails, we're =
done.
>                 If being called from fts_read, set the fts_info field. =
*/





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 19:39:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 14:39:23 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdS0V-0007Yk-17
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 14:39:23 -0500
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1RdS0P-0007YZ-R7
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 14:39:18 -0500
Received: from int-mx09.intmail.prod.int.phx2.redhat.com
	(int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBLJb4Gs012441
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 21 Dec 2011 14:37:06 -0500
Received: from [10.3.113.42] (ovpn-113-42.phx2.redhat.com [10.3.113.42])
	by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id pBLIqSdZ030601; Wed, 21 Dec 2011 13:52:28 -0500
Message-ID: <4EF22AEB.8000809@HIDDEN>
Date: Wed, 21 Dec 2011 11:52:27 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Paul Eggert <eggert@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<4EF2287C.8040009@HIDDEN>
In-Reply-To: <4EF2287C.8040009@HIDDEN>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigA63CCF4862CDA8AC778FEB3B"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
X-Spam-Score: -10.3 (----------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>,
	bug-gnulib@HIDDEN, Jim Meyering <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.3 (----------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigA63CCF4862CDA8AC778FEB3B
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 12/21/2011 11:42 AM, Paul Eggert wrote:
> On 12/21/11 08:27, Eric Blake wrote:
>> maybe we should wrap opendir() so that the gnulib rpl_opendir()
>> always opens a directory at the same time
>=20
> That sounds a bit drastic, but it may be necessary.
>=20
> How about this idea instead?  Use the following patch,
> so that fts_build does not assume that dirfd works.
>=20
> POSIX does not require dirfd to work,

Actually, the next version of POSIX _will_ require dirfd to work, so we
may have to go with wrapping rpl_opendir anyways:

http://austingroupbugs.net/view.php?id=3D391

But you are correct that older systems do not meet the future POSIX
wording, so if your hack works, it's certainly simpler for the short term=
=2E

--=20
Eric Blake   eblake@HIDDEN    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigA63CCF4862CDA8AC778FEB3B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO8irsAAoJEKeha0olJ0NqXxAH/1a4cSoxFun4L4Z91TD3c9pc
EGzJMfd39AzMdXmHlbqYuxkgkFo+V8gE3ap8bp89dLTVCMVlb6I5KM5vkzK2fNMM
2SfrTg61MaZl0eGkd4qvCREUpfx0B5oRB3pPBdMPZ8KLaI70bD57IXSHkAG6dFpT
lPMAirTVU8YQDkZtGL1BMhRofEhJIgg+s6ad8/v91aUUlmgZ/8hXZ4Dmm6E5LJ8F
F8efOOndq57zVCrEw4Jl4qXMdl14Y5BhhwwxF/xJ7PQQ7puNqmDGhR8QtX+WMD6/
wR9qnFROG6kyMIVXs/qYxx8SnVcFLgOy935mPlvQbBOcQHWoBwCb4XppWlm2CX8=
=Vy3z
-----END PGP SIGNATURE-----

--------------enigA63CCF4862CDA8AC778FEB3B--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 19:03:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 14:03:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdRRx-0006jF-1z
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 14:03:37 -0500
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1RdRRv-0006j8-DH
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 14:03:36 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBLJ15wM030728
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 21 Dec 2011 14:01:28 -0500
Received: from [10.3.113.42] (ovpn-113-42.phx2.redhat.com [10.3.113.42])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id pBLHWIG5025007; Wed, 21 Dec 2011 12:32:18 -0500
Message-ID: <4EF21821.7090407@HIDDEN>
Date: Wed, 21 Dec 2011 10:32:17 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
	<005e01ccc003$b6b56d80$24204880$@schmitz-digital.de>
In-Reply-To: <005e01ccc003$b6b56d80$24204880$@schmitz-digital.de>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig006962F59AE650FCB0279CD8"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -10.3 (----------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN, 'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.3 (----------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig006962F59AE650FCB0279CD8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 12/21/2011 10:12 AM, Joachim Schmitz wrote:
>>> Write a small test program that opens say four directories, to get on=
e
>>> DIR* pointer for each.  Then print a table of the DIR member values.
>>> Maybe you'll see a pattern, i.e., how to derive an FD number from
>>> those dd1,2,3 fields.
>=20
> Yes, indeed, thanks for that idea (should have been mine):
> It got to be dd1, only it is not an fd but something called fnum and th=
ese a) start counting with 1 rather than 0 and b) have 1 and 2 being root=
 and CPD, followed by 3,4 and 5 being stdin, stdout, stderr... it seems f=
num -3 =3D=3D fd=20

Yay - we can implement dirfd() in terms of dd1-3.

Please try this on coreutils:

=2E/configure gl_cv_sys_dir_fd_member_name=3D'dd1-3'

and if that works, then the solution is this patch to gnulib (along with
enhancing our testsuite to further test our dirfd emulation):

diff --git i/ChangeLog w/ChangeLog
index 749b538..7a6bf4b 100644
--- i/ChangeLog
+++ w/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-21  Eric Blake  <eblake@HIDDEN>
+
+	dirfd: port to HP NonStop
+	* m4/dirfd.m4 (gl_PREREQ_DIRFD): Also probe for NonStop variant.
+	Reported by Joachim Schmitz.
+
 2011-12-14  Alex Nelson  <ajnelson@HIDDEN>  (tiny change)

 	strftime-tests: also test nanoseconds
diff --git i/m4/dirfd.m4 w/m4/dirfd.m4
index ea75e4e..031c337 100644
--- i/m4/dirfd.m4
+++ w/m4/dirfd.m4
@@ -1,4 +1,4 @@
-# serial 22   -*- Autoconf -*-
+# serial 23   -*- Autoconf -*-

 dnl Find out how to get the file descriptor associated with an open DIR*=
=2E

@@ -50,8 +50,10 @@ AC_DEFUN([gl_PREREQ_DIRFD],
   AC_CACHE_CHECK([how to get the file descriptor associated with an
open DIR*],
                  [gl_cv_sys_dir_fd_member_name],
     [
+      # Most systems expose the fd directly, via d_fd or dd_fd
+      # HP NonStop instead has a member dd1, with a value 3 larger than
the fd
       dirfd_save_CFLAGS=3D$CFLAGS
-      for ac_expr in d_fd dd_fd; do
+      for ac_expr in d_fd dd_fd dd1-3; do

         CFLAGS=3D"$CFLAGS -DDIR_FD_MEMBER_NAME=3D$ac_expr"
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[


--=20
Eric Blake   eblake@HIDDEN    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig006962F59AE650FCB0279CD8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO8hgiAAoJEKeha0olJ0NqINgH/RqUsHsUT1g9nxVvMKAGE9Se
4iSjcJHc2LfUcLAc0ap+EXi89yqJma4yVedz6Pue71JGs4rK8r8u6kI1fEvATF+X
2+hxuCeDei4qqwWWjS8IQ7s2xEBxxC0sdQmHRmQzZFNQF1ZAR/WKXo+iV9W2UNNJ
QdaC1DyJ81C8wnfSVuzyRZBaopWZQ3/6vJ+4AO2YUR3Irp9vZpbfgRvm2fB36C/t
BSjm39/F8sW8zqvCNSKQ5azKpXM3Zi6H/lNQ93FTgnfly0ZlftiVe77x7uX2MSmV
95hrNUCh6eW2RpfB3V6T0SboXyaJvUabJr0U7sVrLTwVS0pvLdDcuKCc/2QUJIE=
=+5OR
-----END PGP SIGNATURE-----

--------------enig006962F59AE650FCB0279CD8--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 18:44:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 13:44:18 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdR9G-0005WB-7s
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 13:44:18 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RdR9D-0005W3-8c
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 13:44:16 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 1F138A60002;
	Wed, 21 Dec 2011 10:42:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id wWxuT5qv-uHs; Wed, 21 Dec 2011 10:42:08 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 9052A39E8008;
	Wed, 21 Dec 2011 10:42:08 -0800 (PST)
Message-ID: <4EF2287C.8040009@HIDDEN>
Date: Wed, 21 Dec 2011 10:42:04 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Eric Blake <eblake@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
In-Reply-To: <4EF2090E.5090108@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>,
	bug-gnulib@HIDDEN, Jim Meyering <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.0 (---)

On 12/21/11 08:27, Eric Blake wrote:
> maybe we should wrap opendir() so that the gnulib rpl_opendir()
> always opens a directory at the same time

That sounds a bit drastic, but it may be necessary.

How about this idea instead?  Use the following patch,
so that fts_build does not assume that dirfd works.

POSIX does not require dirfd to work, and NonStop is
within its rights to not support dirfd, and in this particular
case I think the code will work without it (albeit less
reliably in the presence of very large file trees).

Joachim, does this patch fix "rm" for you?  If not, what
problems does it run into?  (I have not audited the code
for all uses of dirfd, just for this one.)

diff --git a/lib/fts.c b/lib/fts.c
index ccd1980..4dc6809 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1283,7 +1283,7 @@ fts_build (register FTS *sp, int type)
         FTSENT *cur = sp->fts_cur;
         bool continue_readdir = !!cur->fts_dirp;
 
-        /* When cur->fts_dirp is non-NULL, that means we should
+        /* If cur->fts_dirp is non-NULL and dirfd is supported,
            continue calling readdir on that existing DIR* pointer
            rather than opening a new one.  */
         if (continue_readdir)
@@ -1292,16 +1292,20 @@ fts_build (register FTS *sp, int type)
             dir_fd = dirfd (dp);
             if (dir_fd < 0)
               {
+                int dirfd_errno = errno;
                 closedir_and_clear (cur->fts_dirp);
                 if (type == BREAD)
                   {
                     cur->fts_info = FTS_DNR;
                     cur->fts_errno = errno;
                   }
-                return NULL;
+                if (dirfd_errno != ENOTSUP)
+                  return NULL;
+                continue_readdir = false;
               }
           }
-        else
+
+        if (! continue_readdir)
           {
             /* Open the directory for reading.  If this fails, we're done.
                If being called from fts_read, set the fts_info field. */




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 17:40:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 12:40:57 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdQ9w-0003Ke-Ta
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 12:40:57 -0500
Received: from moutng.kundenserver.de ([212.227.126.187])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RdQ9u-0003KI-5M
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 12:40:55 -0500
Received: from DualCore (dsdf-4db54664.pool.mediaWays.net [77.181.70.100])
	by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis)
	id 0MLAED-1Rdh6g0aMT-000MAz; Wed, 21 Dec 2011 18:38:43 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Eric Blake'" <eblake@HIDDEN>,
	"'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
In-Reply-To: 
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Wed, 21 Dec 2011 18:38:39 +0100
Message-ID: <006201ccc007$6091be50$21b53af0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHlhpO1YCAAAnTkA==
Content-Language: de
X-Provags-ID: V02:K0:sHNeOOAChMqxwAjJUaE5Hux+0nzxgDg0Ahy/QlZwiKu
	3Q1QgzLqLihjsbXVEJSCTZqKY68wPf2RYpeP/SzR3j7lvVSML+
	vYVrCSZJwyV8SIwgAzLJROspqjWYpz6U7C4vXLjzyFj5xsvB1o
	8HA4dkQ+A+IuMzYxEkZQRoAh6bafOWqDbbKgdf8L0da7G7aPo4
	vNVf6tD9Ypuh8yUPKik88Da4M9AsqdrApJHXZyqfC3BhGjTsKA
	ERC0o+0+LaNz0rx9OV1lmTtsMiFAcx00B6e73Ef2/8v1IJPRDc
	t2fr1lE6FcIs9AJbQI1xQHQTymu33iHu7kKQI/NK30kAAtU2Ef
	sR9R4o6OVvcDvhzKu2YMruFv00NYdibJxQaUjrCa9ZEEsuPuOW
	rx+o9Beq2nNhQ==
X-Spam-Score: -3.2 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.2 (---)

> From: Joachim Schmitz [mailto:jojo@HIDDEN]
> Sent: Wednesday, December 21, 2011 6:12 PM
> To: 'Eric Blake'; 'Jim Meyering'
> Cc: '10305 <at> debbugs.gnu.org'; 'Paul Eggert'; 'bug-gnulib@HIDDEN'
> Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> > From: Eric Blake [mailto:eblake@HIDDEN]
> > Sent: Wednesday, December 21, 2011 5:28 PM
> > To: Jim Meyering
> > Cc: Joachim Schmitz; 10305 <at> debbugs.gnu.org; 'Paul Eggert'; bug-
> > gnulib@HIDDEN
> > Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> >
> > On 12/21/2011 09:06 AM, Jim Meyering wrote:
> > >>
> > >> Where to go now?
> > >>
> > >> Resorting to wild guesses, I tried all 3 members of struct DIR as
> > >> DIF_FD_MEMBER_NAME, no change to the EBADF
> > >
> > > Write a small test program that opens say four directories, to get
> > > one
> > > DIR* pointer for each.  Then print a table of the DIR member =
values.
> > > Maybe you'll see a pattern, i.e., how to derive an FD number from
> > > those dd1,2,3 fields.
>=20
> Yes, indeed, thanks for that idea (should have been mine):
> It got to be dd1, only it is not an fd but something called fnum and =
these a) start
> counting with 1 rather than 0 and b) have 1 and 2 being root and CPD, =
followed

CWD I meant

> by 3,4 and 5 being stdin, stdout, stderr... it seems fnum -3 =3D=3D fd
<snip>
>=20
> So let's see whether taking that fnum (AKA "dd1") and subtracting 3 =
makes it a
> proper fd.
> But this is something for tomorrow...

Apparently an over simplistic approach: doesn't work, I still get an =
EBADF.

I tried in config.h:

#ifdef DIR_FD_MEMBER_NAME
# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)=20
#elif defined __TANDEM
# define DIR_TO_FD(Dir_p) (((Dir_p)->dd1) - 3)
#else=20
# define DIR_TO_FD(Dir_p) -1=20
#endif

Didn't work, unfortunately...





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 17:14:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 12:14:53 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdPkj-0002iV-J2
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 12:14:53 -0500
Received: from moutng.kundenserver.de ([212.227.126.186])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RdPkg-0002iN-Lf
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 12:14:52 -0500
Received: from DualCore (dsdf-4db54664.pool.mediaWays.net [77.181.70.100])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0MIh7g-1RfcdZ2p1E-002chS; Wed, 21 Dec 2011 18:12:30 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Eric Blake'" <eblake@HIDDEN>,
	"'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN> <4EF2090E.5090108@HIDDEN>
In-Reply-To: <4EF2090E.5090108@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Wed, 21 Dec 2011 18:12:26 +0100
Message-ID: <005e01ccc003$b6b56d80$24204880$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4ATwdVeQCJxCR5QHb6wrHlhpO1YA=
Content-Language: de
X-Provags-ID: V02:K0:Q2GYBtOADdrnGOOJClUnZjQHUponxFjaD7SHAjVPn55
	c6zkE7884P/nkt61GFBoZrNWfpx509ehsSp79hgNS0T07EgKac
	mAgTYTFI8CZyLR9iWA2D5+vwyqd4icZQwFKve6stUdvqSNIVlI
	gIJMskhYHX7hT8evT8iuw6eOpFqRg8B6Nw9ocD1lc/8Bxa1NU9
	Hoe4aJQ8IBLqCPMHBtlvJlohqYOciWYMyKXkJIBdfI8bPmWMnY
	rAuct6cilz0ZCs0Im1izEFYgFPMgKrUW6nzUyCQTl4+dEYgLh1
	ptTnjYQY241oUsAT60XkaxaZfDKwQB01as4+QgXkGcKl1qlAkO
	X4+93B8FTXTfhv2YKMbaqdLsrnHsmYt7oq/SUBxwhwRvO/3oBS
	50cFnMntjeS9w==
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

> From: Eric Blake [mailto:eblake@HIDDEN]
> Sent: Wednesday, December 21, 2011 5:28 PM
> To: Jim Meyering
> Cc: Joachim Schmitz; 10305 <at> debbugs.gnu.org; 'Paul Eggert'; bug-
> gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/21/2011 09:06 AM, Jim Meyering wrote:
> >>
> >> Where to go now?
> >>
> >> Resorting to wild guesses, I tried all 3 members of struct DIR as
> >> DIF_FD_MEMBER_NAME, no change to the EBADF
> >
> > Write a small test program that opens say four directories, to get =
one
> > DIR* pointer for each.  Then print a table of the DIR member values.
> > Maybe you'll see a pattern, i.e., how to derive an FD number from
> > those dd1,2,3 fields.

Yes, indeed, thanks for that idea (should have been mine):
It got to be dd1, only it is not an fd but something called fnum and =
these a) start counting with 1 rather than 0 and b) have 1 and 2 being =
root and CPD, followed by 3,4 and 5 being stdin, stdout, stderr... it =
seems fnum -3 =3D=3D fd=20

> If the NonStop opendir() does not open a directory fd under the hood, =
then
> maybe we should wrap opendir() so that the gnulib rpl_opendir() always =
opens
> a directory at the same time; at which point the gnulib rpl_dirfd =
merely returns
> that directory fd.

Sounds good, but, to be honest, You lost me here ...

> Also, does NonStop have anything like Linux' /proc/self/fd

No, unfortunatly

> or lsof, for reverse
> engineering which fds a process has open and on what files?  Is there =
an

Hmm... not lsof, but other methods to find out who has which file open =
and which file is opened by whom.
Reveals , when testing with rm, that my theory from above seems correct, =
that dir gets fnum=3D7, the value  I see in struct DIR's member dd1, see =
below.

> equivalent to strace functionality for tracking all syscalls made by =
libc?

Not that I'd know of.

So let's see whether taking that fnum (AKA "dd1") and subtracting 3 =
makes it a proper fd.
But this is something for tomorrow...

Bye, Jojo


PS: one of these commands is 'pstate' and here's the output (somewhat =
verbose, the relevant part at the end)
$ pstate 728694845
  PSTATE - T0705AAF (H01) (03MAY2008)
(C)1981 Tandem (C)2004 Hewlett Packard Development Company, L.P.
PSTATE for Guardian T06 on December 21, 2011 10:55:28.02 (LCT)
 Target process: pin 720 in cpu 1, \HPITUG.$:1:720:20012474
                             OSS Pid:  728694845
      loadfile type: MAYSETBPT,OSSPROCESS,PICELFPRG
      loadfile name: /usr/local/Floss/coreutils-8.14/src/rm
                     \HPITUG.$SAS106.ZYQL0CAL.Z0009JRT

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zossfdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zi18ndll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zicnvdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zutildll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zcrtldll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zosskdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zcredll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zosscdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zsecdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zossedll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zosshdll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zrlddll

      loadfile type: MAYSETBPT,OSSPROCESS,PUBLICLIB,PICELFDLL
      loadfile name: /G/system/zdll012/zinetdll

      loadfile type: OSSPROCESS,IMPLIB,PICELFDLL
      loadfile name: /G/system/sys05/initdll

      loadfile type: OSSPROCESS,IMPLIB,PICELFDLL
      loadfile name: /G/system/sys05/mcpdll

               swap:  \HPITUG.$SAS106.#0
      extended swap:
            segment:  Id: 2046
              Add: x6CA00000 Size: 147456 Max: 2097152
              Flat,Unaliased,KMS Backed

      home terminal:  \HPITUG.$ZPTY.#ZWN0115

  Initial priority was 150, current priority is 150.
  Process Wait State: x0000
    waiting on :

  Process access ID (PAID): ITUGLIB .JOJO    ,   100,4
  Process State: x0009
    INSPECT BREAKPOINT

  Creator proc : , Id: ITUGLIB .JOJO    ,   100,4
  Process Creation Time: December 21, 2011 10:52:52.420787 (LCT)
 Process Execution Time: 0:0:0.001262

  Only the process creator may stop this process.
  No-one has tried to stop this process.

Procedure call trace:
  rpl_opendir + 0x90 (UCr)
  opendir_safer + 0x90 (UCr)
  fd_clone_opendir + 0x3D0 (UCr)
  fdopendir_with_dup + 0x340 (UCr)
  fdopendir + 0xD0 (UCr)
  opendirat + 0x230 (UCr)
  fts_build + 0x7A0 (UCr)
  fts_read + 0xE50 (UCr)
  rm + 0x210 (UCr)
  main + 0x1290 (UCr)
  _MAIN + 0x80 (UCr)

Process memory values and other counters.
    PFS        Current 13624, Size 31384, Max 33554432
    Main Stack Origin  x70000000,  Size 262144, Max 2097152
    Priv Stack Origin  x6DFE0000,  Size 65536, Max 901120
    Heap       Origin  x080CA800,  Size 32768, Max 1609783296
    Globals    Origin  x08000000,  Size 827392
    KMSF Guarantee     0
    Resident memory pages   41
    Messages   Sent 51, Received 2
    $RECEIVE   Current QLength 0
    Page faults        42

 Fnum        Filename                            Type     Styp Lsterr
 ---- --------------------------------------- ----------- ---- ------

    7                                         POSIX dir open        0
      /tmp/foo

    6                                         OSS open              0
      /tmp/foo

    5 \HPITUG.$ZPTY.#ZWN0115                  OSS open              0
      /G/zpty/#zwn0115

    4 \HPITUG.$ZPTY.#ZWN0115                  OSS open              0
      /G/zpty/#zwn0115

    3 \HPITUG.$ZPTY.#ZWN0115                  OSS open              0
      /G/zpty/#zwn0115

    2                                         Current dir           0
      /home/jojo

    1                                         Root dir              0
      /






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 16:30:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 11:30:15 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdP3W-0001jM-Lb
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 11:30:15 -0500
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1RdP3U-0001jD-03
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 11:30:13 -0500
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBLGRx6R012913
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 21 Dec 2011 11:27:59 -0500
Received: from [10.3.113.42] (ovpn-113-42.phx2.redhat.com [10.3.113.42])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id pBLGRwoo005225; Wed, 21 Dec 2011 11:27:59 -0500
Message-ID: <4EF2090E.5090108@HIDDEN>
Date: Wed, 21 Dec 2011 09:27:58 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Jim Meyering <jim@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
	<87sjkdaoz2.fsf@HIDDEN>
In-Reply-To: <87sjkdaoz2.fsf@HIDDEN>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enigFA72178F3CEBBB85589AF73E"
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
X-Spam-Score: -10.3 (----------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, Joachim Schmitz <jojo@HIDDEN>,
	bug-gnulib@HIDDEN, 'Paul Eggert' <eggert@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.3 (----------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigFA72178F3CEBBB85589AF73E
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 12/21/2011 09:06 AM, Jim Meyering wrote:
>>
>> Where to go now?
>>
>> Resorting to wild guesses, I tried all 3 members of struct DIR as
>> DIF_FD_MEMBER_NAME, no change to the EBADF
>=20
> Write a small test program that opens say four directories,
> to get one DIR* pointer for each.  Then print a table of
> the DIR member values.  Maybe you'll see a pattern, i.e.,
> how to derive an FD number from those dd1,2,3 fields.

If the NonStop opendir() does not open a directory fd under the hood,
then maybe we should wrap opendir() so that the gnulib rpl_opendir()
always opens a directory at the same time; at which point the gnulib
rpl_dirfd merely returns that directory fd.

Also, does NonStop have anything like Linux' /proc/self/fd or lsof, for
reverse engineering which fds a process has open and on what files?  Is
there an equivalent to strace functionality for tracking all syscalls
made by libc?

--=20
Eric Blake   eblake@HIDDEN    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigFA72178F3CEBBB85589AF73E
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO8gkOAAoJEKeha0olJ0NqIyQH/isSffQyNTlAmHg2hY3A5E8K
YYGVgAexMySI/m09pB6LTzEs5ibB4159euUtaxJSYlumDJKK07hc6f9KtD7ZtQPZ
jcv3xuMfWvHXg6jCkOfo9jPSe4k5YhZA1zvfbwl3ZDCslGgo/k/AnbKkFtmDdFjV
yPFgHjn0052bteFQd7aDY+N9VLyORiPp4osbsWrcuoSJGnW3trz+dRQ/ipfjZs6V
nPGmY4VYenFXILDAh6wP64uN+8wN1GamAzFnE/klv4hYrFXVwS7aX0GRowT58fC1
or8yHhDTZC7ivaBML6SjezGbTvS3sTNjDWBGgHZ5IYMCjCCJ+VlW0Ba8Pw0kGT4=
=iL6L
-----END PGP SIGNATURE-----

--------------enigFA72178F3CEBBB85589AF73E--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 16:08:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 11:08:50 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdOin-0001ET-Vn
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 11:08:50 -0500
Received: from mx.meyering.net ([88.168.87.75])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1RdOil-0001EL-Ls
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 11:08:48 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 06EB1601AF;
	Wed, 21 Dec 2011 17:06:41 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de> (Joachim
	Schmitz's message of "Wed, 21 Dec 2011 15:15:04 +0100")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
	<003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
Date: Wed, 21 Dec 2011 17:06:41 +0100
Message-ID: <87sjkdaoz2.fsf@HIDDEN>
Lines: 32
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

Joachim Schmitz wrote:
...
> Hmm DIR_TO_FD() is :
> #define DIR_TO_FD(Dir_p) -1
>
> In config.h:
> /* the name of the file descriptor member of DIR */
> /* #undef DIR_FD_MEMBER_NAME */
>
> #ifdef DIR_FD_MEMBER_NAME
> # define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
> #else
> # define DIR_TO_FD(Dir_p) -1
> #endif
>
> So fd_clone_dir() does not return NULL, but has errno set to ENTOSUP.
>
>
> Our "struct DIR" has 2 shorts and one long, with funny names dd1, dd2
> and dd3... looking at their content: nothing looks like a proper fd
> (values 7, 257 and 135067072, respectively)
>
>
> Where to go now?
>
> Resorting to wild guesses, I tried all 3 members of struct DIR as
> DIF_FD_MEMBER_NAME, no change to the EBADF

Write a small test program that opens say four directories,
to get one DIR* pointer for each.  Then print a table of
the DIR member values.  Maybe you'll see a pattern, i.e.,
how to derive an FD number from those dd1,2,3 fields.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 21 Dec 2011 14:17:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 21 09:17:28 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RdMz1-00073s-Pf
	for submit <at> debbugs.gnu.org; Wed, 21 Dec 2011 09:17:27 -0500
Received: from moutng.kundenserver.de ([212.227.126.187])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RdMyz-00073k-7G
	for 10305 <at> debbugs.gnu.org; Wed, 21 Dec 2011 09:17:26 -0500
Received: from DualCore (dsdf-4db54664.pool.mediaWays.net [77.181.70.100])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0LpPm9-1R0TlO44qD-00eiS1; Wed, 21 Dec 2011 15:15:08 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
	<4EEF7447.2060801@HIDDEN>
In-Reply-To: <4EEF7447.2060801@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Wed, 21 Dec 2011 15:15:04 +0100
Message-ID: <003601ccbfea$efed4aa0$cfc7dfe0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIYCcrfA6AJWOPW4lkPdymA=
Content-Language: de
X-Provags-ID: V02:K0:iv5kKP5faKqcBG8yqoa28Ksz3+w4pjKoL8ylIvs88Tm
	VB6CAE//kmDTGIDE4gRunfo8CWHu+PPBCtuhtbCCg1dusGmTFU
	OFyEBlG+4gI6sPC1x1V0ywTvf2gKDTJ9hqQ81hhM+oOWLQUL4y
	ExS6R3QJOXWQsMg41vJyj+YfYvrRD0457WCPkbLwe/WQTDkEsr
	h6n+DJDPCmbf/l167pVaZNuI3VpAgrezZIC21S5UhpxkoxksZu
	zJjKDFPWoROtSeUx9HRgOzCnmot2YR36xe29E1eMAU4e5JlPEx
	3t1WcHE8M3ijWaPNtbRtuMYdKIuwZzed3qhCdDTDogBot94STq
	s/siNM5rKu7D72zA+uUayawpJ11orGCfhNwoJlySui6P0CMQLw
	kmouAkiw6C92w==
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Monday, December 19, 2011 6:29 PM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/19/11 00:11, Joachim Schmitz wrote:
> > So it [opendirat] goes into fdopendir(), fdopendir_with_dup(),
> > rpl_dup(), the real dup() (disguised as dup_nothrow(), with =
success),
> > _gl_register_dup(), nothing but success, no suspicious activity =
against fd.
> >
> > Then it [fdopendir_with_dup] calls close(3) !!!
>=20
> Yes, that's what I'd expect.  fdopendir_with_dup sees that fd is 3 and =
dupfd is 4.
> So it invokes close (3) and then fd_clone_opendir (4, ...) because it =
wants
> fd_clone_opendir to open a file (getting fd 3) and then operate on fd =
3.
>=20
> then close(4) (the fd from the dup())  errno set to ENOTSUP
>=20
> Sorry, you've jumped ahead too fast for me to follow.  As I understand =
it,
> fd_clone_opendir (4, ...) should first try openat_proc_name (..., 4, =
"."), which
> should fail;=20

Yes, it does (try and fail)

> it should then try _gl_directory_name (4), and this should return the
> name "D" of the directory. =20

It does.

> fd_clone_opendir should then invoke opendir ("D"),
> which should then open the directory,=20

it does
> internally get file descriptor 3, and then
> return a nonnull DIR * pointer that is based on file descriptor 3; =
this is the value
> that fd_clone_opendir should return back to fdopendir_with_dup.

It calls dirfd() with that DIR *, that calls  DIR_TO_FD(), which return =
-1 and sets errno to ENOTSUP
Then dirfd() get called again and fails again.
close (3), calls fs_clone_opendir() and as dupfd is 4 but older_dupfd is =
-1, it calls close(4) and sets errno to ENTOSUP (from save_errno)
=20
> So when fdopendir_with_dup later does that close(4), it should be OK.
> since the directory is still open on file descriptor 3.

As I see it we now have fds 3 and 4 closed.

> When you say that errno is set to ENOTSUP, though, that suggests that =
my
> analysis is wrong and fd_clone_opendir returns NULL with errno =3D=3D =
ENOTSUP.
> Can you please investigate why that might be?

Ah, should have read to the end first... OK back a couple steps...

Hmm DIR_TO_FD() is :
#define DIR_TO_FD(Dir_p) -1

In config.h:
/* the name of the file descriptor member of DIR */
/* #undef DIR_FD_MEMBER_NAME */

#ifdef DIR_FD_MEMBER_NAME
# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
#else
# define DIR_TO_FD(Dir_p) -1
#endif

So fd_clone_dir() does not return NULL, but has errno set to ENTOSUP.


Our "struct DIR" has  2 shorts and one long, with funny names dd1, dd2 =
and dd3... looking at their content: nothing looks like a proper fd =
(values 7, 257 and 135067072, respectively)


Where to go now?

Resorting to wild guesses, I tried all 3 members of struct DIR as =
DIF_FD_MEMBER_NAME, no change to the EBADF





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Dec 2011 17:30:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 19 12:30:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rch2q-0001s9-Pc
	for submit <at> debbugs.gnu.org; Mon, 19 Dec 2011 12:30:37 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1Rch2o-0001s0-Bs
	for 10305 <at> debbugs.gnu.org; Mon, 19 Dec 2011 12:30:35 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 9F73AA60003;
	Mon, 19 Dec 2011 09:28:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id j4xiOomOYqK5; Mon, 19 Dec 2011 09:28:39 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1FDA4A60002;
	Mon, 19 Dec 2011 09:28:39 -0800 (PST)
Message-ID: <4EEF7447.2060801@HIDDEN>
Date: Mon, 19 Dec 2011 09:28:39 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
	<002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
In-Reply-To: <002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 12/19/11 00:11, Joachim Schmitz wrote:
> So it [opendirat] goes into fdopendir(), fdopendir_with_dup(), rpl_dup(),
> the real dup() (disguised as dup_nothrow(), with success), _gl_register_dup(),
> nothing but success, no suspicious activity against fd.
> 
> Then it [fdopendir_with_dup] calls close(3) !!!

Yes, that's what I'd expect.  fdopendir_with_dup sees that fd is 3
and dupfd is 4.  So it invokes close (3) and then fd_clone_opendir (4, ...)
because it wants fd_clone_opendir to open a file (getting fd 3) and
then operate on fd 3.

then close(4) (the fd from the dup())  errno set to ENOTSUP

Sorry, you've jumped ahead too fast for me to follow.  As I understand
it, fd_clone_opendir (4, ...) should first try openat_proc_name (..., 4, "."),
which should fail; it should then try _gl_directory_name (4),
and this should return the name "D" of the directory.  fd_clone_opendir
should then invoke opendir ("D"), which should then open the directory,
internally get file descriptor 3, and then return a nonnull DIR *
pointer that is based on file descriptor 3; this is the value that
fd_clone_opendir should return back to fdopendir_with_dup.

So when fdopendir_with_dup later does that close(4), it should be OK.
since the directory is still open on file descriptor 3.

When you say that errno is set to ENOTSUP, though, that suggests
that my analysis is wrong and fd_clone_opendir returns NULL with
errno == ENOTSUP.  Can you please investigate why that might be?

On 12/19/11 05:22, Joachim Schmitz wrote:
> Trying to spot the relevant diff between the two and relating them to the problem I have in coretuils:

I suppose you might try applying the reverse of those patches
to coreutils 8.14 to see whether it fixes the problem.  I don't
hold out much hope for that approach, though.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Dec 2011 13:24:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 19 08:24:06 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RcdCH-0004Pz-Mk
	for submit <at> debbugs.gnu.org; Mon, 19 Dec 2011 08:24:05 -0500
Received: from moutng.kundenserver.de ([212.227.17.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RcdCE-0004Pl-CL
	for 10305 <at> debbugs.gnu.org; Mon, 19 Dec 2011 08:24:03 -0500
Received: from DualCore (dsdf-4db53fc0.pool.mediaWays.net [77.181.63.192])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0MJIbO-1RZs0c2WN8-002rmr; Mon, 19 Dec 2011 14:22:04 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN> 
In-Reply-To: 
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Mon, 19 Dec 2011 14:22:03 +0100
Message-ID: <003a01ccbe51$32df5fb0$989e1f10$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIaWZsO+MIAASuQQ
Content-Language: de
X-Provags-ID: V02:K0:XFscuD9R0EVErKBfmBDD6ofTef9/mCw31HCCy1XRxUw
	lpPkdoe411TmVe8l3K+xUN3p1X/c4MGjLxdeiT3+xsA/DTCQ8h
	oXcTK+1wCvz4pJyxuZHiLxXA/dCikf4gukFrc3HyU7ZMPdMCiM
	jPq+R0qucClNJSFH2vwYFAOxk8FCjzq/nu8d7RBOxnnnl8+z9w
	YBZd8zq+2Fz1rO8ucNvCyeNu3YDxbrH5QXPXXbqbqfh20s0kw6
	tyPuOuSbyORWEcu6K84XscUo0Sh4Va6Tz4k+fVsh0mIyG6h5hN
	D6YTWn68M/7ujW598Tn97zLSuSwkvBdAMbM+XomG0boAastXwE
	e8s4lGUYkb69TjCIFwPkgPwe+XinTXxsZqAI8mcdYq3P+BhTNQ
	nxWq6zUlU/nJA==
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.3 (---)

BTW: Seems I have a similar problem with tar-1.26. Not with tar-1.25 =
though.

Trying to spot the relevant diff between the two and relating them to =
the problem I have in coretuils:

diff -BbENru tar-1.25/gnu/dup2.c tar-1.26/gnu/dup2.c
--- tar-1.25/gnu/dup2.c 2010-05-06 15:18:52.000000000 -0500
+++ tar-1.26/gnu/dup2.c 2011-03-12 03:14:28.000000000 -0600
...
@@ -61,6 +61,10 @@
       errno =3D EBADF;
       return -1;
     }
+# elif !defined __linux__
+  /* On Haiku, dup2 (fd, fd) mistakenly clears FD_CLOEXEC.  */
+  if (fd =3D=3D desired_fd)
+    return fcntl (fd, F_GETFL) =3D=3D -1 ? -1 : fd;
 # endif
   result =3D dup2 (fd, desired_fd);
 # ifdef __linux__
diff -BbENru tar-1.25/gnu/fcntl.c tar-1.26/gnu/fcntl.c
--- tar-1.25/gnu/fcntl.c        2010-05-06 15:18:52.000000000 -0500
+++ tar-1.26/gnu/fcntl.c        2011-03-12 03:14:28.000000000 -0600
...
@@ -189,7 +189,21 @@
           errno =3D EINVAL;
         else
           {
+            /* Haiku alpha 2 loses fd flags on original.  */
+            int flags =3D fcntl (fd, F_GETFD);
+            if (flags < 0)
+              {
+                result =3D -1;
+                break;
+              }
             result =3D fcntl (fd, action, target);
+            if (0 <=3D result && fcntl (fd, F_SETFD, flags) =3D=3D -1)
+              {
+                int saved_errno =3D errno;
+                close (result);
+                result =3D -1;
+                errno =3D saved_errno;
+              }
 # if REPLACE_FCHDIR
             if (0 <=3D result)
               result =3D _gl_register_dup (fd, result);
diff -BbENru tar-1.25/gnu/fdopendir.c tar-1.26/gnu/fdopendir.c
--- tar-1.25/gnu/fdopendir.c    2011-02-04 05:31:35.000000000 -0600
+++ tar-1.26/gnu/fdopendir.c    2011-03-12 03:14:28.000000000 -060
...
@@ -63,7 +67,24 @@
 DIR *
 fdopendir (int fd)
 {
-  return fdopendir_with_dup (fd, -1);
+  DIR *dir =3D fdopendir_with_dup (fd, -1, NULL);
+
+  if (! REPLACE_FCHDIR && ! dir)
+    {
+      int saved_errno =3D errno;
+      if (EXPECTED_ERRNO (saved_errno))
+        {
+          struct saved_cwd cwd;
+          if (save_cwd (&cwd) !=3D 0)
+            openat_save_fail (errno);
+          dir =3D fdopendir_with_dup (fd, -1, &cwd);
+          saved_errno =3D errno;
+          free_cwd (&cwd);
+          errno =3D saved_errno;
+        }
+    }
+
+  return dir;
 }

 /* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known


Etc.pp... so we seem to be looking at the same problem, don't we?





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 19 Dec 2011 08:13:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 19 03:13:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RcYLo-0005Cq-Qj
	for submit <at> debbugs.gnu.org; Mon, 19 Dec 2011 03:13:37 -0500
Received: from moutng.kundenserver.de ([212.227.126.171])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RcYLm-0005Ci-SJ
	for 10305 <at> debbugs.gnu.org; Mon, 19 Dec 2011 03:13:36 -0500
Received: from DualCore (dsdf-4db53fc0.pool.mediaWays.net [77.181.63.192])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0Mc4w6-1RJF3C12og-00JdQw; Mon, 19 Dec 2011 09:11:40 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
	<4EEE6800.2030409@HIDDEN>
In-Reply-To: <4EEE6800.2030409@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Mon, 19 Dec 2011 09:11:39 +0100
Message-ID: <002a01ccbe25$d642ef40$82c8cdc0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eAKaOWXzAeb+sIaWZsO+MA==
Content-Language: de
X-Provags-ID: V02:K0:OzryCkYU6cn+NL4LCt+IVUtvno1p93jUxcTyACcE7Jl
	+LZ99LXAo9i5Dekdj7KAEZ0o3nk6IC92330slxQ0BDoWxldL8U
	zoxSm5SUxIk3Vb2Pz8oSHQVhPaugYQN9zMCzN1o6VYb4jhq1EN
	MrB8rkFl6kTxA/P4fhDiuq4Fb9e9pP5IXVHJGd6XM0y+lGzYSn
	ksz+ONN8GKO0L3EbxZj8N3tuhZEUoC8Tj9fkBiIWkjXf0tSPB7
	X0WUmu5N+rx9esQvvAetlD4rmbKXSDAM13wbRJ0tbHCFnawvSC
	UWkGEMHtwQvXfgEEDIMeQpvNtLmFM0X9wbCdjh8crl7v54CKDW
	MGqLebbsLbiMimCagTAPL2OTK6V4R0gqvYlG/qF/VLh7oaf8k9
	q4zwTin6WTUgw==
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Sunday, December 18, 2011 11:24 PM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/18/11 02:31, Joachim Schmitz wrote:
> > it seems to go wrong in fcntl.c, line 194:
> >
> >             /* Haiku alpha 2 loses fd flags on original.  */
> >             int flags =3D fcntl (fd, F_GETFD);    <=3D=3D
> >             if (flags < 0)
> >               {
> >                 result =3D -1;
> >                 break;
> >               }
> >
> > that fcntl() returns a -1 with errno set to EBADF.
>=20
> What is the value of fd at that point?

3

> Is it actually an invalid file descriptor?

Not sure, and wouldn't know how to tell, it certainly looks valid but =
apparenlty fcntl() thinks otherwise.
It was my suspicion but I couldn't find it.
But see further down...
=20
> > For some reason I can step into that fcntl(), guess it is calling =
the system's
> fcntl here?
>=20
> Yes, that's how it's supposed to work.

OK, I thought so, but weren't sure.

> If you plant a breakpoint on the parent fts_build, and single step =
through that,
> can you find out whether continue_readdir is true?

No it is not

>  If it's true, then please
> investigate why dirfd (fts.c line 1285) returned an invalid file =
descriptor.  If it's
> false, then please investigate why opendirat (..., &dir_fd) (fts.c =
line 1301)
> succeeded but set dir_fd to an invalid file descriptor.

OK, attention, lengthy...:
opendirat() calls openat_safer() which calls openat() which calls =
openat_permissive() which call rpl_open() which calls orig_open() which =
calls open() (which succeeds and returns 3) and _gl_register_fd() (which =
does nothing suspicious to the fd) and finally feeds that into =
fd_safer(). That does nothing but checking whther fd is not between =
STDIN and STDERR (which it is not). Everything looks fine so far, to me =
anyway.
Back in opendirat() and into set_cloexec_flag(), which calls =
rpl_fcntl(F_GETFD)=3D which calls the real fcntl() and successful. It =
calls it again with F_SETFD, this too seems successful.
So it goes into fdopendir(), fdopendir_with_dup(), rpl_dup(), the real =
dup() (disguised as dup_nothrow(), with success), _gl_register_dup(), =
nothing but success, no suspicious activity against fd.

Then it calls close(3) !!! then close(4) (the fd from the dup())  errno =
set to ENOTSUP

Back in fts_build() calling dup_safer(3) (which should be invalid =
meanwhile, as it got closed above!) rpl_fcntl(), calling the real =
fcntl() with errno EBADF and errors out.

So in fdopendir_with_dup() the fd gets closed and hence made invalid?!?

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 18 Dec 2011 22:25:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 18 17:25:54 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RcPB3-0008Gm-Vl
	for submit <at> debbugs.gnu.org; Sun, 18 Dec 2011 17:25:54 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RcPB0-0008Gd-Gx
	for 10305 <at> debbugs.gnu.org; Sun, 18 Dec 2011 17:25:52 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 73DB0A60001;
	Sun, 18 Dec 2011 14:24:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id gSd14b8pwhR1; Sun, 18 Dec 2011 14:24:00 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id F21F739E8011;
	Sun, 18 Dec 2011 14:23:59 -0800 (PST)
Message-ID: <4EEE6800.2030409@HIDDEN>
Date: Sun, 18 Dec 2011 14:24:00 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
	<002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
In-Reply-To: <002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 12/18/11 02:31, Joachim Schmitz wrote:
> it seems to go wrong in fcntl.c, line 194:
> 
>             /* Haiku alpha 2 loses fd flags on original.  */
>             int flags = fcntl (fd, F_GETFD);    <==
>             if (flags < 0)
>               {
>                 result = -1;
>                 break;
>               }
> 
> that fcntl() returns a -1 with errno set to EBADF.

What is the value of fd at that point?
Is it actually an invalid file descriptor?

> For some reason I can step into that fcntl(), guess it is calling the system's fcntl here?

Yes, that's how it's supposed to work.

If you plant a breakpoint on the parent fts_build,
and single step through that, can you find out whether
continue_readdir is true?  If it's true, then please
investigate why dirfd (fts.c line 1285)
returned an invalid file descriptor.  If it's false,
then please investigate why opendirat (..., &dir_fd)
(fts.c line 1301) succeeded but set dir_fd to an
invalid file descriptor.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 18 Dec 2011 10:33:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 18 05:33:29 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RcE3b-0008LO-HU
	for submit <at> debbugs.gnu.org; Sun, 18 Dec 2011 05:33:29 -0500
Received: from moutng.kundenserver.de ([212.227.17.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RcE3Y-0008LF-2F
	for 10305 <at> debbugs.gnu.org; Sun, 18 Dec 2011 05:33:25 -0500
Received: from DualCore (dsdf-4db52ead.pool.mediaWays.net [77.181.46.173])
	by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis)
	id 0M6RPb-1Qnj0i06eJ-00xsRA; Sun, 18 Dec 2011 11:31:31 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
	<4EEBE1C9.20807@HIDDEN>
In-Reply-To: <4EEBE1C9.20807@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Sun, 18 Dec 2011 11:31:20 +0100
Message-ID: <002101ccbd70$2f504bc0$8df0e340$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9iAbswkOEBToP0eJaJYeHg
Content-Language: de
X-Provags-ID: V02:K0:ULNl55ActBWV+W8YuuHAwbkxFY8VVsI/R827KwqxSDG
	71ubSDljvofO9b7+sVf2kBs/GX18Od9CmhCYrb2aT2GAavXSG8
	vQOQDq6M+Des/vFN5b2z/0dFrPEEPpnzt9Fz+4WLC7IDyM+X7K
	qgkwdL4WgX/EAgvd4uI5xAmp7k3MTaJiHl57vta+eBLVaPGgtR
	/VRrO9OBgSY+j2vBB+WnTCRVyD8NX58J55j63u7My3FyKND4YP
	cSyTeYTSzSBytiYaw3ane1MidPBF1NMmGIrtzL0up3LUHAxrMM
	7lro8zUR7TBu0uyclyLlY6whYbpgiIsfLBtF6JyTJZe3oSUCud
	gEEP8RU3ViIKmi5PR4/U7dKnvLy6PJjPjb6rXWNyPglJnCXyEy
	MqgCMqPBowbgQ==
X-Spam-Score: -3.4 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Saturday, December 17, 2011 1:27 AM
> To: Joachim Schmitz
> Cc: 'Eric Blake'; 'Jim Meyering'; 10305 <at> debbugs.gnu.org; =
bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
>=20
> On 12/16/11 13:21, Joachim Schmitz wrote:
> > The standalone version works just fine.
>=20
> That's too bad.  I'm afraid there's no magic here: we need to see what =
system
> calls are being executed by 'rm', and in what order, and what =
arguments they
> are being given, and what their results are, so that we can figure out =
what's
> going wrong.  Since NonStop doesn't have 'truss', I guess you'll need =
to put a
> breakpoint on every system call and see what its arguments are and =
what it
> returns, starting with the system call that opens the directory.  Or, =
you can put
> wrappers around each system call in the source code, and have the =
wrappers
> send diagnostics to stderr.

I did some more debugging: it seems to go wrong in fcntl.c, line 194:

            /* Haiku alpha 2 loses fd flags on original.  */
            int flags =3D fcntl (fd, F_GETFD);    <=3D=3D
            if (flags < 0)
              {
                result =3D -1;
                break;
              }

that fcntl() returns a -1 with errno set to EBADF.
For some reason I can step into that fcntl(), guess it is calling the =
system's fcntl here?

Stack trace:
7 rpl_fcntl() fcntl.c:194
6 dup_safer() dup-safer.c:33
5 fts_build() fts.c:1384
4 fts_read() ftc.c:902
3 rm() remove.c:598
2 main() rm.c:343
1 _MAIN()

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 17 Dec 2011 00:28:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 19:28:29 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rbi8a-0003J7-Hg
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 19:28:29 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1Rbi8X-0003Iq-9J
	for 10305 <at> debbugs.gnu.org; Fri, 16 Dec 2011 19:28:26 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id D9E2239E8012;
	Fri, 16 Dec 2011 16:26:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id uYxWs5ah+6xE; Fri, 16 Dec 2011 16:26:46 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 57EDF39E8010;
	Fri, 16 Dec 2011 16:26:46 -0800 (PST)
Message-ID: <4EEBE1C9.20807@HIDDEN>
Date: Fri, 16 Dec 2011 16:26:49 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
	<009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
In-Reply-To: <009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 12/16/11 13:21, Joachim Schmitz wrote:
> The standalone version works just fine.

That's too bad.  I'm afraid there's no magic here: we need to
see what system calls are being executed by 'rm', and
in what order, and what arguments they are being given, and
what their results are, so that we can figure out what's going
wrong.  Since NonStop doesn't have 'truss', I guess you'll need
to put a breakpoint on every system call and see what its arguments
are and what it returns, starting with the system call that
opens the directory.  Or, you can put wrappers around each
system call in the source code, and have the wrappers send
diagnostics to stderr.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 16 Dec 2011 21:23:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 16:23:50 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbfFt-0005vi-Ov
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 16:23:50 -0500
Received: from moutng.kundenserver.de ([212.227.17.8])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbfFr-0005vY-Lm
	for 10305 <at> debbugs.gnu.org; Fri, 16 Dec 2011 16:23:48 -0500
Received: from DualCore (dsdf-4db51b14.pool.mediaWays.net [77.181.27.20])
	by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis)
	id 0MaXEr-1RHfXV0GCX-00JwLV; Fri, 16 Dec 2011 22:22:08 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
	<4EEB9235.9090902@HIDDEN>
In-Reply-To: <4EEB9235.9090902@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 16 Dec 2011 22:21:58 +0100
Message-ID: <009701ccbc38$bef2dec0$3cd89c40$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipckC/L8AhAEncw9ilp9UZPA=
Content-language: de
X-Provags-ID: V02:K0:6c2UtpLC2disLvU5nR6Q/iItM77EymbyhTTRlfsP1E0
	nqEtxmv/q9I7aHbMsq6vqDw/2G5n9Uqt1I7vX8X+IqOMXxrgeq
	iqb97CRdYHLSnFvBJCKQba39JySUbmwVOoCsrwgXkZA+RdvKB3
	VqnkaQQgGqt8wbIGe0kYeVOyWsFZMz53VaNmS2TwJuGmKDh08z
	iIAIl3pL1JJ1mD8SDO7QrCTh7DSMiy94d7mAIZUJkDoFCgiLff
	4TxPUbrfvlsA6sAm5HIEL28NQmXWXhJSDBQ07P/+ie2BZ/yzd1
	0ZMfZ2QPkA//7hAxmt2TNWCLQKz73Hv0gs9DBz2I36by5tE0HM
	zTvpGU8SDEygoCoaTwZeygjeWsjMBZ9xLD7dPptbqS/ggtXzSf
	Z6ZcL68UeR8GQ==
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.4 (---)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Friday, December 16, 2011 7:47 PM
> To: Joachim Schmitz
> Cc: 'Eric Blake'; 'Jim Meyering'; 10305 <at> debbugs.gnu.org; bug-gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 12/16/11 05:46, Joachim Schmitz wrote:
> > It is not O_NOCTTY or O_NONBLOCK and the others (O_SEARCH,
> > O_DIRECTORY, O_NOFOLLOW, O_NOATIME) don't exist here.
> 
> It could be the FD_CLOEXEC, perhaps.  What does the following do?
> Try it standalone, and also try it compiled and linked against gnulib.
> 
> 
> #include <fcntl.h>
> #include <unistd.h>
> #include <stdio.h>
> 
> int main (void)
> {
>   int fd, r, fd2;
>   fd = open (".", O_RDONLY | O_NOCTTY | O_NONBLOCK);
>   if (fd < 0)
>     return perror ("open"), 1;
>   r = fcntl (fd, F_SETFD, FD_CLOEXEC);
>   if (r < 0)
>     return perror ("F_SETFD"), 1;
>   fd2 = dup (fd);
>   if (fd2 < 0)
>     return perror ("dup"), 1;
>   return 0;
> }

The standalone version works just fine.





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 16 Dec 2011 18:48:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 13:48:57 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Rbcq0-0000EA-L0
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 13:48:57 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1Rbcpy-0000E0-D9
	for 10305 <at> debbugs.gnu.org; Fri, 16 Dec 2011 13:48:55 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 8822239E8011;
	Fri, 16 Dec 2011 10:47:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id l8ST+l2CP7Qg; Fri, 16 Dec 2011 10:47:16 -0800 (PST)
Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net
	[71.189.109.235])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 0B6D139E8010;
	Fri, 16 Dec 2011 10:47:16 -0800 (PST)
Message-ID: <4EEB9235.9090902@HIDDEN>
Date: Fri, 16 Dec 2011 10:47:17 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux i686;
	rv:8.0) Gecko/20111124 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
	<005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
In-Reply-To: <005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, bug-gnulib@HIDDEN, 'Eric Blake' <eblake@HIDDEN>,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.9 (--)

On 12/16/11 05:46, Joachim Schmitz wrote:
> It is not O_NOCTTY or O_NONBLOCK and the others (O_SEARCH, O_DIRECTORY,
> O_NOFOLLOW, O_NOATIME) don't exist here.

It could be the FD_CLOEXEC, perhaps.  What does the following do?
Try it standalone, and also try it compiled and linked against
gnulib.


#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>

int main (void)
{
  int fd, r, fd2;
  fd = open (".", O_RDONLY | O_NOCTTY | O_NONBLOCK);
  if (fd < 0)
    return perror ("open"), 1;
  r = fcntl (fd, F_SETFD, FD_CLOEXEC);
  if (r < 0)
    return perror ("F_SETFD"), 1;
  fd2 = dup (fd);
  if (fd2 < 0)
    return perror ("dup"), 1;
  return 0;
}




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 16 Dec 2011 13:48:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 08:48:42 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbY9Q-0000wx-SJ
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:48:41 -0500
Received: from moutng.kundenserver.de ([212.227.126.187])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbY9O-0000wq-JF
	for 10305 <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:48:39 -0500
Received: from DualCore (dsdf-4db51b14.pool.mediaWays.net [77.181.27.20])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0LyfeV-1QgkUH1VMl-0165gG; Fri, 16 Dec 2011 14:46:50 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Eric Blake'" <eblake@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
	<4EEB4AC0.30401@HIDDEN>
In-Reply-To: <4EEB4AC0.30401@HIDDEN>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 16 Dec 2011 14:46:41 +0100
Message-ID: <005401ccbbf9$25214550$6f63cff0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HAJvBofzAokipcmWv/ZWkA==
Content-language: de
X-Provags-ID: V02:K0:tG8/eqS4SVXlpAX7vP5a2cB7mtVRqCiuls5zimUSPol
	HSbiV4wqmN8eX0GOe3RlKjHWseOYFwHKHtyij2zvToR6nRNviZ
	NkJAigUR8UMX01QipMK5YxPDN5TrJDAMbKUhj5bDOnvC698KZN
	5LQJjxcAhFzFHnLfZjqga5hXjz57KYjKniV5BmxgkoKjA8zrvK
	0Y6AFHRRn9m7RYLMiSH97taWT5j0tBRrtUf+LMayi2Eo+dZF9Q
	3GWhoANGOVP6hErAbdUDCt/J8SiRbyP6M1ztTsvMhE1vzNDNNR
	9eUuoWhyOR66CpQfB0h1umoTLGtmbADjcGMLSktkJoO5HxWuk3
	55IhBevOcr432z7sNpD+Jv942GiJzuWnhjNsDklqfnfILw4Su1
	aCrVWwMKFDhxg==
X-Spam-Score: -3.5 (---)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, eggert@HIDDEN, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.5 (---)

> From: Eric Blake [mailto:eblake@HIDDEN]
> Sent: Friday, December 16, 2011 2:42 PM
> To: Joachim Schmitz
> Cc: 'Jim Meyering'; 10305 <at> debbugs.gnu.org; eggert@HIDDEN; bug-
> gnulib@HIDDEN
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 12/16/2011 06:02 AM, Joachim Schmitz wrote:
> > Hmm, I can dup() an fd for a directory if or had been open()'d
> > O_RDONLY, but not if opened O_WRONLY or O_RDWR, I'll get an EISDIR
> from open() then.
> 
> But you shouldn't be able to open() a directory O_WRONLY or O_RDWR in the
> first place, under POSIX. 

Right.

> Is this a bug in our open() wrapper for permitting a
> bad open() on a directory, which then renders the fd un-dup()able?  Or is
it
> really some other O_* flag causing the issue?

It is not O_NOCTTY or O_NONBLOCK and the others (O_SEARCH, O_DIRECTORY,
O_NOFOLLOW, O_NOATIME) don't exist here.

Bye, Jojo





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at 10305 <at> debbugs.gnu.org:


Received: (at 10305) by debbugs.gnu.org; 16 Dec 2011 13:44:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 08:44:14 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbY57-0000qM-FZ
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:44:14 -0500
Received: from mx1.redhat.com ([209.132.183.28])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eblake@HIDDEN>) id 1RbY54-0000qE-3i
	for 10305 <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:44:10 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBGDgQfO008644
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Fri, 16 Dec 2011 08:42:26 -0500
Received: from [10.3.113.10] ([10.3.113.10])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id pBGDgPIs016333; Fri, 16 Dec 2011 08:42:25 -0500
Message-ID: <4EEB4AC0.30401@HIDDEN>
Date: Fri, 16 Dec 2011 06:42:24 -0700
From: Eric Blake <eblake@HIDDEN>
Organization: Red Hat
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
In-Reply-To: <004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
X-Enigmail-Version: 1.3.4
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature";
	boundary="------------enig6532D7D0F0FBD07BFA8FAC9B"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-Spam-Score: -10.3 (----------)
X-Debbugs-Envelope-To: 10305
Cc: 10305 <at> debbugs.gnu.org, eggert@HIDDEN, bug-gnulib@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -10.3 (----------)

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig6532D7D0F0FBD07BFA8FAC9B
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 12/16/2011 06:02 AM, Joachim Schmitz wrote:
> Hmm, I can dup() an fd for a directory if or had been open()'d O_RDONLY=
, but
> not if opened O_WRONLY or O_RDWR, I'll get an EISDIR from open() then.

But you shouldn't be able to open() a directory O_WRONLY or O_RDWR in
the first place, under POSIX.  Is this a bug in our open() wrapper for
permitting a bad open() on a directory, which then renders the fd
un-dup()able?  Or is it really some other O_* flag causing the issue?

>=20
>> I thought gnulib had pretty good dup* test coverage, but see that no d=
up*
> test
>> uses a directory file descriptor.

Good point, I will look into adding some.

> Any workaround?

We'll probably come up with something, once we can further characterize
what is going on, but I don't have one right now.

--=20
Eric Blake   eblake@HIDDEN    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig6532D7D0F0FBD07BFA8FAC9B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO60rBAAoJEKeha0olJ0NqMbMIAI761Mb0G9gCRgItP3LFlRI8
Td7t+6D8pOkR7nmfO0FRfI58OEe8xrykX2R4PLHZ2hwRzxJXxgaA4CSFEPaJoWIY
csilfg2TzJcZ+mldQ1v2JBV1Ronbir+vOQiWUSml+fbcQHAr6olCXermhSEnRn8G
Fyw79EsVRQpGJSXs3U6jn+lowUaiizFnKBWhAteJ6dM1cCAaeg/MpmJCj3eSXdXP
X+FFgeNpYbG28SDpiCh16NH7OXCTn8lUSGLQHy4TBgT3jEVfDhnYqUN70XB7CO2A
pdIWAn8PTBNqyVUhuE2PCtP9myzXl/57hkeW1vX+99Ou6DB8OjwMwN3AiNXz+i4=
=BlIn
-----END PGP SIGNATURE-----

--------------enig6532D7D0F0FBD07BFA8FAC9B--




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2011 13:16:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 08:16:37 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbXeO-0000CB-8A
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:16:36 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1RbXeL-0000C3-FZ
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:16:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbXcm-0003Qb-Vl
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:14:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:44355)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbXcm-0003QS-U6
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:14:56 -0500
Received: from eggs.gnu.org ([140.186.70.92]:43106)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbXcl-0000TV-3r
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 08:14:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbXck-0003Q7-4z
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 08:14:55 -0500
Received: from mx.meyering.net ([88.168.87.75]:38766)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>)
	id 1RbXcj-0003Pz-Sx; Fri, 16 Dec 2011 08:14:54 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id DC464600D0;
	Fri, 16 Dec 2011 14:14:52 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 16 Dec 2011 14:02:51 +0100")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
	<004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
Date: Fri, 16 Dec 2011 14:14:52 +0100
Message-ID: <87aa6siroz.fsf@HIDDEN>
Lines: 56
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnulib@HIDDEN, 'Paul Eggert' <eggert@HIDDEN>,
	bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Joachim Schmitz wrote:
>> From: Jim Meyering [mailto:jim@HIDDEN]
>> Sent: Friday, December 16, 2011 11:51 AM
>> To: Joachim Schmitz
>> Cc: 'Paul Eggert'; bug-gnulib@HIDDEN; bug-coreutils@HIDDEN
>> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
>>
>> Joachim Schmitz wrote:
>>
>> >> From: Paul Eggert [mailto:eggert@HIDDEN]
>> >> Sent: Thursday, December 15, 2011 7:07 PM
>> >> To: Joachim Schmitz
>> >> Cc: Jim Meyering; bug-coreutils@HIDDEN; bug-gnulib@HIDDEN
>> >> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
>> >>
>> >> On 12/15/11 08:28, Jim Meyering wrote:
> ...
>> > So... it seems we can't dup() an fd for a directory here!
>>
>> Right.
>> Your config.h file suggests you're not using a gnulib dup replacement, so
> I
>> suspect a bug in your system's dup implementation.
>
> Hmm, I can dup() an fd for a directory if or had been open()'d O_RDONLY, but
> not if opened O_WRONLY or O_RDWR, I'll get an EISDIR from open() then.

The FDs in fts.c should all be opened with O_RDONLY (among other flags),
but not O_WRONLY or O_RDWR.  Maybe one of these other flags is what's
making your dup fail:

static inline int
internal_function
diropen (FTS const *sp, char const *dir)
{
  int open_flags = (O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
                    | (ISSET (FTS_PHYSICAL) ? O_NOFOLLOW : 0)
                    | (ISSET (FTS_NOATIME) ? O_NOATIME : 0));

static inline DIR *
internal_function
opendirat (int fd, char const *dir, int extra_flags, int *pdir_fd)
{
  int new_fd = openat (fd, dir,
                       (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK
                        | extra_flags));

>> I thought gnulib had pretty good dup* test coverage, but see that no dup*
> test
>> uses a directory file descriptor.
>
> Any workaround?

For your problem, try removing those other O_* flags.

For the test suite with inadequate coverage: add dirfd-using tests.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2011 13:04:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 08:04:57 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbXT7-0008Nh-5d
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:04:57 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbXT5-0008Na-Mm
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:04:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbXRP-0000cm-5F
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:03:20 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:40477)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbXRP-0000ca-3f
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 08:03:11 -0500
Received: from eggs.gnu.org ([140.186.70.92]:59657)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbXRJ-0006ov-Cd
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 08:03:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbXRH-0000au-LQ
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 08:03:05 -0500
Received: from moutng.kundenserver.de ([212.227.126.186]:49491)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>)
	id 1RbXRH-0000Zl-9S; Fri, 16 Dec 2011 08:03:03 -0500
Received: from DualCore (dsdf-4db51b14.pool.mediaWays.net [77.181.27.20])
	by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis)
	id 0LnHlS-1R5GA93QgY-00hiVR; Fri, 16 Dec 2011 14:03:00 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>	<87ehw5ly1o.fsf@HIDDEN>	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>	<8762hhlryo.fsf@HIDDEN>
	<4EEA373F.7040507@HIDDEN>	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
	<87sjkkiycr.fsf@HIDDEN>
In-Reply-To: <87sjkkiycr.fsf@HIDDEN>
Subject: RE: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 16 Dec 2011 14:02:51 +0100
Message-ID: <004c01ccbbf3$053f8e00$0fbeaa00$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6Ai8EkXECPRZ7HJbnqYuQ
Content-language: de
X-Provags-ID: V02:K0:t18D+j/9Wqx+MbixboRSj3P8Yr9D/1daOgseFxgb0zC
	dFvekeM5EaAf4wMAFgzJM/62Hav+WkpfXc9iRYLJ4B1b5udINM
	rZ8FyvRMSv+cFUMRZhsaYSO7r3ihn8DRkjTKcgST68SOtEXsb+
	2FuGbErxdzP0NLKtzTSV0tOs5O1G1dXI1XR8IPLzmIXna0BXIP
	VpC8cSUF6/hlTzSWydtj1LvqJyAgj2AuEwMio+rPoB/Orwb0Fe
	LXzD2lGZN0yZ+yFKwv3Pvr0dGLUcMBVhHDaiW0JqcHlJsgOfcf
	2uBiacovjgm7kSHdVcaXkwHMfzVdc/B0U06QwA1IOurKj772al
	8oeQIiGJlpEQQ9+JLPZ85do0VUVeydw9DSPedBleGB5aQM9Jqf
	fVayGTARoSU7A==
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.5 (-----)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.5 (-----)

> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Friday, December 16, 2011 11:51 AM
> To: Joachim Schmitz
> Cc: 'Paul Eggert'; bug-gnulib@HIDDEN; bug-coreutils@HIDDEN
> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
> 
> Joachim Schmitz wrote:
> 
> >> From: Paul Eggert [mailto:eggert@HIDDEN]
> >> Sent: Thursday, December 15, 2011 7:07 PM
> >> To: Joachim Schmitz
> >> Cc: Jim Meyering; bug-coreutils@HIDDEN; bug-gnulib@HIDDEN
> >> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
> >>
> >> On 12/15/11 08:28, Jim Meyering wrote:
...
> > So... it seems we can't dup() an fd for a directory here!
> 
> Right.
> Your config.h file suggests you're not using a gnulib dup replacement, so
I
> suspect a bug in your system's dup implementation.

Hmm, I can dup() an fd for a directory if or had been open()'d O_RDONLY, but
not if opened O_WRONLY or O_RDWR, I'll get an EISDIR from open() then.

> I thought gnulib had pretty good dup* test coverage, but see that no dup*
test
> uses a directory file descriptor.

Any workaround?





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2011 10:52:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 05:52:51 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbVPH-0004Yl-PW
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:52:51 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1RbVPE-0004Ya-SQ
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:52:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbVNY-0008Ju-Qr
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:51:14 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:39394)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbVNY-0008Je-PS
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:51:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:49755)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbVNX-0005Dl-OB
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 05:51:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbVNW-0008JM-Q5
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 05:51:03 -0500
Received: from mx.meyering.net ([88.168.87.75]:38407)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>)
	id 1RbVNW-0008J5-Jv; Fri, 16 Dec 2011 05:51:02 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 4006A600E3;
	Fri, 16 Dec 2011 11:51:00 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de> (Joachim
	Schmitz's message of "Fri, 16 Dec 2011 11:28:43 +0100")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
	<004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
Date: Fri, 16 Dec 2011 11:51:00 +0100
Message-ID: <87sjkkiycr.fsf@HIDDEN>
Lines: 57
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN, 'Paul Eggert' <eggert@HIDDEN>,
	bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Joachim Schmitz wrote:

>> From: Paul Eggert [mailto:eggert@HIDDEN]
>> Sent: Thursday, December 15, 2011 7:07 PM
>> To: Joachim Schmitz
>> Cc: Jim Meyering; bug-coreutils@HIDDEN; bug-gnulib@HIDDEN
>> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
>>
>> On 12/15/11 08:28, Jim Meyering wrote:
>> > If you can debug it further to narrow down what/how it is failing,
>> > eventually we'll find the cause.
>>
>> One way to do that might be to put a breakpoint on all the following
> functions,
>> and to let us know what their arguments are when called, and what they
>> return.  You also might try to compile coreutils with debugging turned
> off, so
>> that functions aren't inlined.
>
> I guess you meant turn of optimization rather than debugging?
>
>> diropen
>> fts_build
>> fts_safe_changedir
>> restore_initial_cwd
>> fchdir
>> cwd_advance_fd
>
> OK here we go:
> jojo@\hpitug:/home/jojo/Floss/coreutils-8.14/src $ run -debug -inspect=on
> ./rm -r /tmp/foo
...
> Stepping into fts_build shows that the dup(dir_fd) in line 1385 fails, with
> errno being set to EBADF
>
> * 1375              if (continue_readdir)
> (eInspect 1,840):
> * 1381              else if (nlinks || type == BREAD) {
> (eInspect 1,840):
> * 1382                      if (ISSET(FTS_CWDFD))
> (eInspect 1,840):
> * 1384                          dir_fd = dup (dir_fd);
> (eInspect 1,840):p dir_fd
> $3 = 3
> (eInspect 1,840):next
> * 1385                          if (0 <= dir_fd)
> (eInspect 1,840):p dir_fd
> $4 = -1
...
> So... it seems we can't dup() an fd for a directory here!

Right.
Your config.h file suggests you're not using a gnulib dup replacement,
so I suspect a bug in your system's dup implementation.

I thought gnulib had pretty good dup* test coverage,
but see that no dup* test uses a directory file descriptor.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2011 10:30:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 16 05:30:49 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbV3w-00044u-KF
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:30:49 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbV3t-00044k-Oe
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:30:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbV2G-0004Z2-QO
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:29:11 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:58100)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbV2G-0004Yf-Ck
	for submit <at> debbugs.gnu.org; Fri, 16 Dec 2011 05:29:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37938)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbV2F-0007pU-7s
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 05:29:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbV2D-0004XP-VK
	for bug-coreutils@HIDDEN; Fri, 16 Dec 2011 05:29:03 -0500
Received: from moutng.kundenserver.de ([212.227.17.8]:53414)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>)
	id 1RbV25-0004Tt-Qs; Fri, 16 Dec 2011 05:28:54 -0500
Received: from DualCore (dsdf-4db51b14.pool.mediaWays.net [77.181.27.20])
	by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis)
	id 0Mh2kG-1ROLrv2B4y-00MNUs; Fri, 16 Dec 2011 11:28:51 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Paul Eggert'" <eggert@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN> <4EEA373F.7040507@HIDDEN>
In-Reply-To: <4EEA373F.7040507@HIDDEN>
Subject: RE: coreutils-8.14, "rm -r" fails with EBADF
Date: Fri, 16 Dec 2011 11:28:43 +0100
Message-ID: <004401ccbbdd$7cc73ba0$7655b2e0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlklAf7bDl4BAadWTQJvulX6lwrC1PA=
Content-language: de
X-Provags-ID: V02:K0:krDsxEgB/Q3+C/MtAq+mLOB5rMZ/YrZSwi7QwB/oJnL
	sf//VjIjQRD5gCpWBThZwKxt8HDApnS7a6VJxsYGHRN4eNKiNV
	VGS+3dB5Re5Dz1M6y/rnFXSSaQJOTLq2GACzcO8OBIkW8QCd8N
	0BhFuBatGXcw1g8bPTZQXp7RpYYBhh4A7as3v+/XIdlWniGAdZ
	ge8GXYRdZWSRjjFuvNFGdRc5oct66+p1JVKKUOQao0Ej0EMPEI
	A6Ul2vj3C0fJt6LAE6kB94CGDarQqBeLNj0u2U2C3y/0D4bCZS
	KNl+HkzZr7ekqtH18zkXDZtLoYwyOd70b9fBPrLm9rC89c6U5v
	NVJ3GloyUsz0Zc5i/fTmdTsx4+de3Y12vVlrf7VGE8sPlIfL2V
	cwMlhpfpQC8Lg==
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -5.4 (-----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnulib@HIDDEN, bug-coreutils@HIDDEN,
	'Jim Meyering' <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.4 (-----)

> From: Paul Eggert [mailto:eggert@HIDDEN]
> Sent: Thursday, December 15, 2011 7:07 PM
> To: Joachim Schmitz
> Cc: Jim Meyering; bug-coreutils@HIDDEN; bug-gnulib@HIDDEN
> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 12/15/11 08:28, Jim Meyering wrote:
> > If you can debug it further to narrow down what/how it is failing,
> > eventually we'll find the cause.
> 
> One way to do that might be to put a breakpoint on all the following
functions,
> and to let us know what their arguments are when called, and what they
> return.  You also might try to compile coreutils with debugging turned
off, so
> that functions aren't inlined.

I guess you meant turn of optimization rather than debugging?

> diropen
> fts_build
> fts_safe_changedir
> restore_initial_cwd
> fchdir
> cwd_advance_fd

OK here we go:
jojo@\hpitug:/home/jojo/Floss/coreutils-8.14/src $ run -debug -inspect=on
./rm -r /tmp/foo

TNS/E Native Inspect gdb Debugger [T1237 - 30-Jun-2010 17:53]
Copyright 1998 Free Software Foundation, Inc.
Copyright 2003-2008 Hewlett-Packard Development Company, L.P.

Native Inspect (based on GDB) is covered by the GNU General Public License.
Type "show copying" for conditions for changing and/or distributing copies.
Type "show warranty" for warranty/support information.

Working directory \HPITUG.$DATA01.JOJO.
Symbols read in for program loadfile /usr/local/Floss/coreutils-8.14/src/rm.
Added process (1,808).
Breakpoint 1 at 0x7000fcb0:1: file /usr/local/Floss/coreutils-8.14/src/rm.c,
line 206.
main (argc=3, argv=0x80ca000) at
/usr/local/Floss/coreutils-8.14/src/rm.c:206
*  206        bool preserve_root = true;
(eInspect 1,808):break
Breakpoint 2 at 0x7000fcb0:1: file /usr/local/Floss/coreutils-8.14/src/rm.c,
line 206.
(eInspect 1,808):clear
invalid command name "clear"
(eInspect 1,808):break 2
warning:  Line 2 in file "/usr/local/Floss/coreutils-8.14/src/rm.c" does not
have
instructions.
Placing breakpoint on the next available source line.
Breakpoint 3 at 0x7000e9c0:0: file /usr/local/Floss/coreutils-8.14/src/rm.c,
line 105.
(eInspect 1,808):exit
There are held processes that will be resumed.  Exit anyway? (y or n) y

There are existing Breakpoints.  Exit anyway? (y or n) y
eInspect is exiting...
./rm: traversal failed: `/tmp/foo': Bad file descriptor
jojo@\hpitug:/home/jojo/Floss/coreutils-8.14/src $ run -debug -inspect=on
./rm -r /tmp/foo

TNS/E Native Inspect gdb Debugger [T1237 - 30-Jun-2010 17:53]
Copyright 1998 Free Software Foundation, Inc.
Copyright 2003-2008 Hewlett-Packard Development Company, L.P.

Native Inspect (based on GDB) is covered by the GNU General Public License.
Type "show copying" for conditions for changing and/or distributing copies.
Type "show warranty" for warranty/support information.

Working directory \HPITUG.$DATA01.JOJO.
Symbols read in for program loadfile /usr/local/Floss/coreutils-8.14/src/rm.
Added process (1,317).
Breakpoint 1 at 0x7000fcb0:1: file /usr/local/Floss/coreutils-8.14/src/rm.c,
line 206.
main (argc=3, argv=0x80ca000) at
/usr/local/Floss/coreutils-8.14/src/rm.c:206
*  206        bool preserve_root = true;
(eInspect 1,317):break diropen
Breakpoint 2 at 0x7002f1a0:1: file
/usr/local/Floss/coreutils-8.14/lib/fts.c, line 360.
(eInspect 1,317):break fts_build
Breakpoint 3 at 0x70038af0:1: file
/usr/local/Floss/coreutils-8.14/lib/fts.c, line 1276.
(eInspect 1,317):break fts_safe_changedir
Breakpoint 4 at 0x7003ee80:1: file
/usr/local/Floss/coreutils-8.14/lib/fts.c, line 2009.
(eInspect 1,317):break restore_initial_cwd
Code location does not exist.

(eInspect 1,317):break fchdir
Breakpoint 5 at 0x7002cd30:2: file
/usr/local/Floss/coreutils-8.14/lib/fchdir.c, line 206.
(eInspect 1,317):break cwd_advance_fd
Breakpoint 6 at 0x70030f70:1: file
/usr/local/Floss/coreutils-8.14/lib/fts.c, line 331.
(eInspect 1,317):cont
Continuing.

Breakpoint 6, cwd_advance_fd (sp=0x80cee40, fd=-3041965,
chdir_down_one=true)
    at /usr/local/Floss/coreutils-8.14/lib/fts.c:331
*  331        int old = sp->fts_cwd_fd;
(eInspect 1,317):cont
Continuing.

Breakpoint 3, fts_build (sp=0x80cee40, type=3) at
    /usr/local/Floss/coreutils-8.14/lib/fts.c:1276
* 1276              FTSENT *cur = sp->fts_cur;
(eInspect 1,317):cont
Continuing.
./rm: traversal failed: `/tmp/foo': Bad file descriptor
Process (1,317) exited with code 01.
Removed process (1,317).
eInspect is exiting...
jojo@\hpitug:/home/jojo/Floss/coreutils-8.14/src $

so a) there is no restore_initial_cwd and b) it enters only cwd_advance_fd
and fts_build and both only once.

Stepping into fts_build shows that the dup(dir_fd) in line 1385 fails, with
errno being set to EBADF

* 1375              if (continue_readdir)
(eInspect 1,840):
* 1381              else if (nlinks || type == BREAD) {
(eInspect 1,840):
* 1382                      if (ISSET(FTS_CWDFD))
(eInspect 1,840):
* 1384                          dir_fd = dup (dir_fd);
(eInspect 1,840):p dir_fd
$3 = 3
(eInspect 1,840):next
* 1385                          if (0 <= dir_fd)
(eInspect 1,840):p dir_fd
$4 = -1
(eInspect 1,840):next
* 1388                      if (dir_fd < 0 || fts_safe_changedir(sp, cur,
dir_fd, NULL)) {
(eInspect 1,840):
* 1389                              if (nlinks && type == BREAD)
(eInspect 1,840):
* 1390                                      cur->fts_errno = errno;
(eInspect 1,840):
* 1391                              cur->fts_flags |= FTS_DONTCHDIR;
(eInspect 1,840):p cur->fts_errno
$5 = 4009
(eInspect 1,840):


So... it seems we can't dup() an fd for a directory here!

Bye, Jojo






Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2011 18:08:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 13:08:43 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbFjW-00071m-P8
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 13:08:43 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <eggert@HIDDEN>) id 1RbFjU-00071e-AM
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 13:08:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1RbFhw-000648-T9
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 13:07:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:46040)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1RbFhw-00063z-Re
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 13:07:04 -0500
Received: from eggs.gnu.org ([140.186.70.92]:37125)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1RbFhw-0003QX-0L
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 13:07:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <eggert@HIDDEN>) id 1RbFhv-00063h-5w
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 13:07:03 -0500
Received: from smtp.cs.ucla.edu ([131.179.128.62]:47881)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <eggert@HIDDEN>)
	id 1RbFhu-00063a-Tq; Thu, 15 Dec 2011 13:07:03 -0500
Received: from localhost (localhost.localdomain [127.0.0.1])
	by smtp.cs.ucla.edu (Postfix) with ESMTP id 92C93A60004;
	Thu, 15 Dec 2011 10:07:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu
Received: from smtp.cs.ucla.edu ([127.0.0.1])
	by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id BP3mrHOctZCS; Thu, 15 Dec 2011 10:07:00 -0800 (PST)
Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200])
	by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1C5EBA60002;
	Thu, 15 Dec 2011 10:07:00 -0800 (PST)
Message-ID: <4EEA373F.7040507@HIDDEN>
Date: Thu, 15 Dec 2011 10:06:55 -0800
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
	rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: Joachim Schmitz <jojo@HIDDEN>
Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
	<8762hhlryo.fsf@HIDDEN>
In-Reply-To: <8762hhlryo.fsf@HIDDEN>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnulib@HIDDEN, bug-coreutils@HIDDEN, Jim Meyering <jim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

On 12/15/11 08:28, Jim Meyering wrote:
> If you can debug it further to narrow down what/how it is failing,
> eventually we'll find the cause.

One way to do that might be to put a breakpoint on all the following
functions, and to let us know what their arguments are when called,
and what they return.  You also might try to compile coreutils
with debugging turned off, so that functions aren't inlined.

diropen
fts_build
fts_safe_changedir
restore_initial_cwd
fchdir
cwd_advance_fd




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2011 16:30:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 11:30:18 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbECH-0004gU-IX
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 11:30:18 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1RbECF-0004gN-Hn
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 11:30:16 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbEAm-0005dd-69
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 11:28:45 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:59041)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbEAm-0005dT-0Y
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 11:28:44 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45503)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbEAk-0005Yt-Nk
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 11:28:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbEAa-0005c6-L5
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 11:28:42 -0500
Received: from mx.meyering.net ([88.168.87.75]:35660)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>)
	id 1RbEAa-0005c1-FS; Thu, 15 Dec 2011 11:28:32 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 6234D600AE;
	Thu, 15 Dec 2011 17:28:31 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de> (Joachim
	Schmitz's message of "Thu, 15 Dec 2011 16:19:19 +0100")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
	<002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
Date: Thu, 15 Dec 2011 17:28:31 +0100
Message-ID: <8762hhlryo.fsf@HIDDEN>
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-coreutils@HIDDEN, bug-gnulib@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Joachim Schmitz wrote:
...
>> but what I really need to know is what happened just prior, in fts_read.
>> Can you run gdb, set a breakpoint in fts_read and show us the result of stepping
>> through fts_read?  That would be most useful.
>
> Sorry, no gdb, the debugger here is calls eInspect (but is similar to
> gdb, as far as I know).
> It goes thru fts_read() the 1st time without problem, on 2nd round
> fts_build(sp, BREAD) in ~/coreutils-8.14/lib/fts.c line 903 returns
> NULL, then the subsequent rm_fts (fts, ent, x) fails. It goues trhi
> fts_read() 2 more times after that.

There are three places in fts_build that directly set FTS_STOP:

  - fts_palloc failure (i.e., virtual memory exhausted, not likely)
  - found a file name longer than SIZE_MAX (not likely)
  - failure to restore working directory:

        /*
         * If descended after called from fts_children or after called from
         * fts_read and nothing found, get back.  At the root level we use
         * the saved fd; if one of fts_open()'s arguments is a relative name
         * to an empty directory, we wind up here with no other way back.  If
         * can't get back, we're done.
         */
        if (!continue_readdir && descend && (type == BCHILD || !nitems) &&
            (cur->fts_level == FTS_ROOTLEVEL
             ? RESTORE_INITIAL_CWD(sp)
             : fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
                cur->fts_info = FTS_ERR;
                SET(FTS_STOP);
                fts_lfree(head);
                return (NULL);
        }

If you can debug it further to narrow down what/how it is failing,
eventually we'll find the cause.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2011 15:22:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 10:22:09 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbD8I-00037n-WE
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 10:22:09 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbD8D-00037R-Fy
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 10:22:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbD6T-0004P5-9Q
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 10:20:31 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_FRT_STOCK2
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:35321)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbD6S-0004P1-TN
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 10:20:13 -0500
Received: from eggs.gnu.org ([140.186.70.92]:45807)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbD6C-0001V1-L7
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 10:20:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbD5r-0003zP-8r
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 10:19:51 -0500
Received: from moutng.kundenserver.de ([212.227.17.8]:64770)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>)
	id 1RbD5q-0003vD-17; Thu, 15 Dec 2011 10:19:35 -0500
Received: from DualCore (dsdf-4d0a1f67.pool.mediaWays.net [77.10.31.103])
	by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis)
	id 0MXXss-1RFsJ10AQ2-00WXCH; Thu, 15 Dec 2011 16:19:26 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: "'Jim Meyering'" <jim@HIDDEN>
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
	<87ehw5ly1o.fsf@HIDDEN>
In-Reply-To: <87ehw5ly1o.fsf@HIDDEN>
Subject: RE: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 15 Dec 2011 16:19:19 +0100
Message-ID: <002401ccbb3c$ead5be10$c0813a30$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_0025_01CCBB45.4C9A2610"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQEbigJvJN8jhHqONXf+h66ZX9yEJwFIYlkllzUWugA=
Content-Language: de
X-Provags-ID: V02:K0:u+dxoIiRAqW3e7ith24y1/dU5jB5sSuCFzCcF1b6Wje
	N8YES7OJSrp9/Aky/OJVGtW3vx2LUsXIvEllpY6REAJ/5ZvnCN
	0gZyQS8fzSQwSmlxC84Y0tgWjTazHU7gXG0eoUFHhIq+60/FMe
	F3cpWeAb2uUgtbVuD6sse4VqSoJqukHzT3CfR7UHEjZ59PJ4BN
	S/JXimTpwQrQGQeJkS6mOIVlxuh0Hpa2zjQZGBdWnNp7ap9YT5
	L4zzQIRurjC/Rw0vZc4ovInp9gqGI8yTeTW4E2V8iJ9wK+Qihh
	EMr7Ha+rbcNvD7noCYDPmSL0MkLQh82nadYITgMhoRqjRfGV97
	ATghO/ICUVsqdCHN6PdHYCAjqTu9byKmrQ4uiEEg200y8K3RuZ
	o+F4GHcO0JhuQ==
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Debbugs-Envelope-To: submit
Cc: bug-gnulib@HIDDEN, bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org

This is a multipart message in MIME format.

------=_NextPart_000_0025_01CCBB45.4C9A2610
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable

> From: Jim Meyering [mailto:jim@HIDDEN]
> Sent: Thursday, December 15, 2011 3:17 PM
> To: Joachim Schmitz
> Cc: bug-coreutils@HIDDEN; bug-gnulib@HIDDEN
> Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
>=20
> Joachim Schmitz wrote:
> > I got coreutils-8.9, 8.13 and 8.14 to compile for my platform, and
> > most of the
>=20
> Thanks for the report.
> More details will help us help you:
>=20
> Which platform is that?

HP-NonStop

> Including your config.h might help.
Attached

> > utilities work, but as soon as it comes to recurring thru the file
> > system some utils fail, e.g.:
> >
> > ~/coreutils-8.14/src $ ./rm -R /tmp/foo
> >
> > ./rm: traversal failed: `/tmp/foo': Bad file descriptor
> >
> > ~/coreutils-8.14/src $ ./rm -r /tmp/foo
> >
> > ./rm: traversal failed: `/tmp/foo': Bad file descriptor
> >
> > ~/coreutils-8.14/src $
> >
> > =E2=80=98./ls =E2=80=93R /tmp/foo=E2=80=99 does work though:
> >
> > ~/coreutils-8.14/src $ ./ls -lr /tmp/foo
> >
> > total 0
> >
> > -rw-rw-r-- 1 jojo ITUGLIB 0 Dec 15 08:06 bar
> >
> > Does this ring a bell with one of you?
>=20
> I haven't seen that before.
> It's obviously coming from this:
>=20
>     case FTS_ERR:
>       /* Various failures, from opendir to ENOMEM, to failure to =
"return"
>          to preceding directory, can provoke this.  */
>       error (0, ent->fts_errno, _("traversal failed: %s"),
>              quote (ent->fts_path));
>       fts_skip_tree (fts, ent);
>       return RM_ERROR;
>=20
> but what I really need to know is what happened just prior, in =
fts_read.
> Can you run gdb, set a breakpoint in fts_read and show us the result =
of stepping
> through fts_read?  That would be most useful.

Sorry, no gdb, the debugger here is calls eInspect (but is similar to =
gdb, as far as I know).
It goes thru fts_read() the 1st time without problem, on 2nd round =
fts_build(sp, BREAD) in ~/coreutils-8.14/lib/fts.c line 903 returns =
NULL, then the subsequent rm_fts (fts, ent, x) fails. It goues trhi =
fts_read() 2 more times after that.
=20
> Or can you run strace -o log ./rm -r /tmp/foo and send us the "log" =
file?

Sorry, no strace here.
=20
> > I don=E2=80=99t understand why one fails but the other works, and =
can=E2=80=99t seem
> > to fine the place where it goes wrong.
>=20
> rm (and du, chmod, chown, etc.) use fts for tree traversal, while ls =
still uses
> hand-rolled (and thus unnecessarily limited) recursion.

Ah, that makes sense, thanks.

Bye, Jojo

------=_NextPart_000_0025_01CCBB45.4C9A2610
Content-Type: text/plain;
	name="config.h"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="config.h"

/* lib/config.h.  Generated from config.hin by configure.  */
/* lib/config.hin.  Generated from configure.ac by autoheader.  */

/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* Define to the function xargmatch calls on failures. */
#define ARGMATCH_DIE usage (EXIT_FAILURE)

/* Define to the declaration of the xargmatch failure function. */
#define ARGMATCH_DIE_DECL void usage (int _e)

/* Define to the number of bits in type 'ptrdiff_t'. */
#define BITSIZEOF_PTRDIFF_T 32

/* Define to the number of bits in type 'sig_atomic_t'. */
#define BITSIZEOF_SIG_ATOMIC_T 16

/* Define to the number of bits in type 'size_t'. */
#define BITSIZEOF_SIZE_T 32

/* Define to the number of bits in type 'wchar_t'. */
#define BITSIZEOF_WCHAR_T 16

/* Define to the number of bits in type 'wint_t'. */
#define BITSIZEOF_WINT_T 32

/* Define if you wish *printf() functions that have a safe handling of
   non-IEEE-754 'long double' values. */
#define CHECK_PRINTF_SAFE 1

/* Define to 1 if chown fails to change ctime when at least one argument =
was
   not -1. */
#define CHOWN_CHANGE_TIME_BUG 1

/* Define if chown is not POSIX compliant regarding IDs of -1. */
/* #undef CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE */

/* Define if chown modifies symlinks. */
/* #undef CHOWN_MODIFIES_SYMLINK */

/* Define to 1 if chown mishandles trailing slash. */
/* #undef CHOWN_TRAILING_SLASH_BUG */

/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and =
Cray-YMP
   systems. This function is required for `alloca.c' support on those =
systems.
   */
/* #undef CRAY_STACKSEG_END */

/* Define to 1 if using `alloca.c'. */
#define C_ALLOCA 1

/* Define as the bit index in the word where to find bit 0 of the =
exponent of
   'double'. */
#define DBL_EXPBIT0_BIT 20

/* Define as the word index where to find the exponent of 'double'. */
#define DBL_EXPBIT0_WORD 0

/* Define as the bit index in the word where to find the sign of =
'double'. */
/* #undef DBL_SIGNBIT_BIT */

/* Define as the word index where to find the sign of 'double'. */
/* #undef DBL_SIGNBIT_WORD */

/* Define the default level of POSIX conformance. The value is of the =
form
   YYYYMM, specifying the year and month the standard was adopted. If =
not
   defined here, it defaults to the value of _POSIX2_VERSION in =
<unistd.h>.
   Define to 199209 to default to POSIX 1003.2-1992, which makes =
standard
   programs like `head', `tail', and `sort' accept obsolete options like =
`+10'
   and `-10'. Define to 200112 to default to POSIX 1003.1-2001, which =
makes
   these standard programs treat leading-`+' operands as file names and
   require modern usages like `-n 10' instead of `-10'. Whether defined =
here
   or not, the default can be overridden at run time via the =
_POSIX2_VERSION
   environment variable. */
/* #undef DEFAULT_POSIX2_VERSION */

/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
/* #undef DGUX */

/* the name of the file descriptor member of DIR */
/* #undef DIR_FD_MEMBER_NAME */

#ifdef DIR_FD_MEMBER_NAME
# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
#else
# define DIR_TO_FD(Dir_p) -1
#endif


/* Define to 1 if // is a file system root distinct from /. */
/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */

/* Define if struct dirent has a member d_ino that actually works. */
#define D_INO_IN_DIRENT 1

/* Define to 1 if translation of program messages to the user's native
   language is requested. */
#define ENABLE_NLS 1

/* Define to 1 if your platform has fchownat, but it does not reject an =
empty
   file name. */
/* #undef FCHOWNAT_EMPTY_FILENAME_BUG */

/* Define to 1 if your platform has fchownat, but it cannot perform =
lchown
   tasks. */
/* #undef FCHOWNAT_NOFOLLOW_BUG */

/* Define this to 1 if F_DUPFD behavior does not match POSIX */
/* #undef FCNTL_DUPFD_BUGGY */

/* Define to nothing if C supports flexible array members, and to 1 if =
it does
   not. That way, with a declaration like `struct s { int n; double
   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with =
pre-C99
   compilers. When computing the size of such an object, don't use =
'sizeof
   (struct s)' as it overestimates the size. Use 'offsetof (struct s, =
d)'
   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work =
with
   MSVC and with C++ compilers. */
#define FLEXIBLE_ARRAY_MEMBER /**/

/* Define as the bit index in the word where to find bit 0 of the =
exponent of
   'float'. */
#define FLT_EXPBIT0_BIT 23

/* Define as the word index where to find the exponent of 'float'. */
#define FLT_EXPBIT0_WORD 0

/* Define as the bit index in the word where to find the sign of =
'float'. */
/* #undef FLT_SIGNBIT_BIT */

/* Define as the word index where to find the sign of 'float'. */
/* #undef FLT_SIGNBIT_WORD */

/* Define to 1 if fopen() fails to recognize a trailing slash. */
/* #undef FOPEN_TRAILING_SLASH_BUG */

/* Define to 1 if fstatat (..., 0) does not work, as in AIX 7.1. */
/* #undef FSTATAT_ZERO_FLAG_BROKEN */

/* Define to 1 if the system's ftello function has the Solaris bug. */
/* #undef FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE */

/* Define to 1 if mkdir mistakenly creates a directory given with a =
trailing
   dot component. */
/* #undef FUNC_MKDIR_DOT_BUG */

/* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */
#define FUNC_NL_LANGINFO_YESEXPR_WORKS 0

/* Define to 1 if realpath() can malloc memory, always gives an absolute =
path,
   and handles trailing slash correctly. */
/* #undef FUNC_REALPATH_WORKS */

/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
/* #undef FUNC_UNGETC_BROKEN */

/* Define to 1 if futimesat mishandles a NULL file name. */
/* #undef FUTIMESAT_NULL_BUG */

/* Define to the type of elements in the array set by `getgroups'. =
Usually
   this is either `int' or `gid_t'. */
#define GETGROUPS_T gid_t

/* Define this to 1 if getgroups(0,NULL) does not return the number of =
groups.
   */
/* #undef GETGROUPS_ZERO_BUG */

/* Define if gettimeofday clobbers the localtime buffer. */
/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */

/* Define this to 'void' or 'struct timezone' to match the system's
   declaration of the second argument to gettimeofday. */
#define GETTIMEOFDAY_TIMEZONE struct timezone

/* Define to make the limit macros in <stdint.h> visible. */
#define GL_TRIGGER_STDC_LIMIT_MACROS 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module areadlinkat shall be considered present. */
#define GNULIB_AREADLINKAT 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module calloc-gnu shall be considered present. */
#define GNULIB_CALLOC_GNU 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module canonicalize shall be considered present. =
*/
#define GNULIB_CANONICALIZE 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module close-stream shall be considered present. =
*/
#define GNULIB_CLOSE_STREAM 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module dirent-safer shall be considered present. =
*/
#define GNULIB_DIRENT_SAFER 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module dirname shall be considered present. */
#define GNULIB_DIRNAME 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module faccessat shall be considered present. */
#define GNULIB_FACCESSAT 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fcntl-safer shall be considered present. */
#define GNULIB_FCNTL_SAFER 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fdopendir shall be considered present. */
#define GNULIB_FDOPENDIR 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fdutimensat shall be considered present. */
#define GNULIB_FDUTIMENSAT 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fd-safer-flag shall be considered present. =
*/
#define GNULIB_FD_SAFER_FLAG 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fflush shall be considered present. */
#define GNULIB_FFLUSH 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module filenamecat shall be considered present. */
#define GNULIB_FILENAMECAT 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module fopen-safer shall be considered present. */
#define GNULIB_FOPEN_SAFER 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module freopen-safer shall be considered present. =
*/
#define GNULIB_FREOPEN_SAFER 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module getcwd shall be considered present. */
#define GNULIB_GETCWD 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module malloc-gnu shall be considered present. */
#define GNULIB_MALLOC_GNU 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module openat shall be considered present. */
#define GNULIB_OPENAT 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module openat-safer shall be considered present. =
*/
#define GNULIB_OPENAT_SAFER 1

/* enable some gnulib portability checks */
/* #undef GNULIB_PORTCHECK */

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module realloc-gnu shall be considered present. */
#define GNULIB_REALLOC_GNU 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module snprintf shall be considered present. */
#define GNULIB_SNPRINTF 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module strerror shall be considered present. */
#define GNULIB_STRERROR 1

/* Define to 1 when the gnulib module accept should be tested. */
#define GNULIB_TEST_ACCEPT 1

/* Define to 1 when the gnulib module bind should be tested. */
#define GNULIB_TEST_BIND 1

/* Define to 1 when the gnulib module btowc should be tested. */
#define GNULIB_TEST_BTOWC 1

/* Define to 1 when the gnulib module calloc-posix should be tested. */
#define GNULIB_TEST_CALLOC_POSIX 1

/* Define to 1 when the gnulib module canonicalize should be tested. */
#define GNULIB_TEST_CANONICALIZE 1

/* Define to 1 when the gnulib module canonicalize_file_name should be =
tested.
   */
#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1

/* Define to 1 when the gnulib module chdir should be tested. */
#define GNULIB_TEST_CHDIR 1

/* Define to 1 when the gnulib module chown should be tested. */
#define GNULIB_TEST_CHOWN 1

/* Define to 1 when the gnulib module cloexec should be tested. */
#define GNULIB_TEST_CLOEXEC 1

/* Define to 1 when the gnulib module close should be tested. */
#define GNULIB_TEST_CLOSE 1

/* Define to 1 when the gnulib module closedir should be tested. */
#define GNULIB_TEST_CLOSEDIR 1

/* Define to 1 when the gnulib module connect should be tested. */
#define GNULIB_TEST_CONNECT 1

/* Define to 1 when the gnulib module dirfd should be tested. */
#define GNULIB_TEST_DIRFD 1

/* Define to 1 when the gnulib module dup should be tested. */
#define GNULIB_TEST_DUP 1

/* Define to 1 when the gnulib module dup2 should be tested. */
#define GNULIB_TEST_DUP2 1

/* Define to 1 when the gnulib module environ should be tested. */
#define GNULIB_TEST_ENVIRON 1

/* Define to 1 when the gnulib module euidaccess should be tested. */
#define GNULIB_TEST_EUIDACCESS 1

/* Define to 1 when the gnulib module faccessat should be tested. */
#define GNULIB_TEST_FACCESSAT 1

/* Define to 1 when the gnulib module fchdir should be tested. */
#define GNULIB_TEST_FCHDIR 1

/* Define to 1 when the gnulib module fclose should be tested. */
#define GNULIB_TEST_FCLOSE 1

/* Define to 1 when the gnulib module fcntl should be tested. */
#define GNULIB_TEST_FCNTL 1

/* Define to 1 when the gnulib module fdopen should be tested. */
#define GNULIB_TEST_FDOPEN 1

/* Define to 1 when the gnulib module fdopendir should be tested. */
#define GNULIB_TEST_FDOPENDIR 1

/* Define to 1 when the gnulib module fflush should be tested. */
#define GNULIB_TEST_FFLUSH 1

/* Define to 1 when the gnulib module fopen should be tested. */
#define GNULIB_TEST_FOPEN 1

/* Define to 1 when the gnulib module fpurge should be tested. */
#define GNULIB_TEST_FPURGE 1

/* Define to 1 when the gnulib module freopen should be tested. */
#define GNULIB_TEST_FREOPEN 1

/* Define to 1 when the gnulib module frexp should be tested. */
#define GNULIB_TEST_FREXP 1

/* Define to 1 when the gnulib module frexpl should be tested. */
#define GNULIB_TEST_FREXPL 1

/* Define to 1 when the gnulib module fseek should be tested. */
#define GNULIB_TEST_FSEEK 1

/* Define to 1 when the gnulib module fseeko should be tested. */
#define GNULIB_TEST_FSEEKO 1

/* Define to 1 when the gnulib module fstat should be tested. */
#define GNULIB_TEST_FSTAT 1

/* Define to 1 when the gnulib module fsync should be tested. */
#define GNULIB_TEST_FSYNC 1

/* Define to 1 when the gnulib module ftell should be tested. */
#define GNULIB_TEST_FTELL 1

/* Define to 1 when the gnulib module ftello should be tested. */
#define GNULIB_TEST_FTELLO 1

/* Define to 1 when the gnulib module ftruncate should be tested. */
#define GNULIB_TEST_FTRUNCATE 1

/* Define to 1 when the gnulib module futimens should be tested. */
#define GNULIB_TEST_FUTIMENS 1

/* Define to 1 when the gnulib module getaddrinfo should be tested. */
#define GNULIB_TEST_GETADDRINFO 1

/* Define to 1 when the gnulib module getcwd should be tested. */
#define GNULIB_TEST_GETCWD 1

/* Define to 1 when the gnulib module getdelim should be tested. */
#define GNULIB_TEST_GETDELIM 1

/* Define to 1 when the gnulib module getdtablesize should be tested. */
#define GNULIB_TEST_GETDTABLESIZE 1

/* Define to 1 when the gnulib module getgroups should be tested. */
#define GNULIB_TEST_GETGROUPS 1

/* Define to 1 when the gnulib module gethostname should be tested. */
#define GNULIB_TEST_GETHOSTNAME 1

/* Define to 1 when the gnulib module getline should be tested. */
#define GNULIB_TEST_GETLINE 1

/* Define to 1 when the gnulib module getloadavg should be tested. */
#define GNULIB_TEST_GETLOADAVG 1

/* Define to 1 when the gnulib module getopt-gnu should be tested. */
#define GNULIB_TEST_GETOPT_GNU 1

/* Define to 1 when the gnulib module getpagesize should be tested. */
#define GNULIB_TEST_GETPAGESIZE 1

/* Define to 1 when the gnulib module gettimeofday should be tested. */
#define GNULIB_TEST_GETTIMEOFDAY 1

/* Define to 1 when the gnulib module getusershell should be tested. */
#define GNULIB_TEST_GETUSERSHELL 1

/* Define to 1 when the gnulib module group-member should be tested. */
#define GNULIB_TEST_GROUP_MEMBER 1

/* Define to 1 when the gnulib module ioctl should be tested. */
#define GNULIB_TEST_IOCTL 1

/* Define to 1 when the gnulib module iswblank should be tested. */
#define GNULIB_TEST_ISWBLANK 1

/* Define to 1 when the gnulib module lchmod should be tested. */
#define GNULIB_TEST_LCHMOD 1

/* Define to 1 when the gnulib module lchown should be tested. */
#define GNULIB_TEST_LCHOWN 1

/* Define to 1 when the gnulib module link should be tested. */
#define GNULIB_TEST_LINK 1

/* Define to 1 when the gnulib module linkat should be tested. */
#define GNULIB_TEST_LINKAT 1

/* Define to 1 when the gnulib module listen should be tested. */
#define GNULIB_TEST_LISTEN 1

/* Define to 1 when the gnulib module lseek should be tested. */
#define GNULIB_TEST_LSEEK 1

/* Define to 1 when the gnulib module lstat should be tested. */
#define GNULIB_TEST_LSTAT 1

/* Define to 1 when the gnulib module malloc-posix should be tested. */
#define GNULIB_TEST_MALLOC_POSIX 1

/* Define to 1 when the gnulib module mbrlen should be tested. */
#define GNULIB_TEST_MBRLEN 1

/* Define to 1 when the gnulib module mbrtowc should be tested. */
#define GNULIB_TEST_MBRTOWC 1

/* Define to 1 when the gnulib module mbscasecmp should be tested. */
#define GNULIB_TEST_MBSCASECMP 1

/* Define to 1 when the gnulib module mbsinit should be tested. */
#define GNULIB_TEST_MBSINIT 1

/* Define to 1 when the gnulib module mbslen should be tested. */
#define GNULIB_TEST_MBSLEN 1

/* Define to 1 when the gnulib module mbsrtowcs should be tested. */
#define GNULIB_TEST_MBSRTOWCS 1

/* Define to 1 when the gnulib module mbsstr should be tested. */
#define GNULIB_TEST_MBSSTR 1

/* Define to 1 when the gnulib module mbtowc should be tested. */
#define GNULIB_TEST_MBTOWC 1

/* Define to 1 when the gnulib module memchr should be tested. */
#define GNULIB_TEST_MEMCHR 1

/* Define to 1 when the gnulib module mempcpy should be tested. */
#define GNULIB_TEST_MEMPCPY 1

/* Define to 1 when the gnulib module memrchr should be tested. */
#define GNULIB_TEST_MEMRCHR 1

/* Define to 1 when the gnulib module mkstemp should be tested. */
#define GNULIB_TEST_MKSTEMP 1

/* Define to 1 when the gnulib module mktime should be tested. */
#define GNULIB_TEST_MKTIME 1

/* Define to 1 when the gnulib module nanosleep should be tested. */
#define GNULIB_TEST_NANOSLEEP 1

/* Define to 1 when the gnulib module nl_langinfo should be tested. */
#define GNULIB_TEST_NL_LANGINFO 1

/* Define to 1 when the gnulib module open should be tested. */
#define GNULIB_TEST_OPEN 1

/* Define to 1 when the gnulib module opendir should be tested. */
#define GNULIB_TEST_OPENDIR 1

/* Define to 1 when the gnulib module perror should be tested. */
#define GNULIB_TEST_PERROR 1

/* Define to 1 when the gnulib module pipe should be tested. */
#define GNULIB_TEST_PIPE 1

/* Define to 1 when the gnulib module putenv should be tested. */
#define GNULIB_TEST_PUTENV 1

/* Define to 1 when the gnulib module raise should be tested. */
#define GNULIB_TEST_RAISE 1

/* Define to 1 when the gnulib module read should be tested. */
#define GNULIB_TEST_READ 1

/* Define to 1 when the gnulib module readdir should be tested. */
#define GNULIB_TEST_READDIR 1

/* Define to 1 when the gnulib module readlink should be tested. */
#define GNULIB_TEST_READLINK 1

/* Define to 1 when the gnulib module readlinkat should be tested. */
#define GNULIB_TEST_READLINKAT 1

/* Define to 1 when the gnulib module realloc-posix should be tested. */
#define GNULIB_TEST_REALLOC_POSIX 1

/* Define to 1 when the gnulib module remove should be tested. */
#define GNULIB_TEST_REMOVE 1

/* Define to 1 when the gnulib module rename should be tested. */
#define GNULIB_TEST_RENAME 1

/* Define to 1 when the gnulib module rmdir should be tested. */
#define GNULIB_TEST_RMDIR 1

/* Define to 1 when the gnulib module rpmatch should be tested. */
#define GNULIB_TEST_RPMATCH 1

/* Define to 1 when the gnulib module select should be tested. */
#define GNULIB_TEST_SELECT 1

/* Define to 1 when the gnulib module setenv should be tested. */
#define GNULIB_TEST_SETENV 1

/* Define to 1 when the gnulib module setlocale should be tested. */
#define GNULIB_TEST_SETLOCALE 1

/* Define to 1 when the gnulib module setsockopt should be tested. */
#define GNULIB_TEST_SETSOCKOPT 1

/* Define to 1 when the gnulib module sigaction should be tested. */
#define GNULIB_TEST_SIGACTION 1

/* Define to 1 when the gnulib module signbit should be tested. */
#define GNULIB_TEST_SIGNBIT 1

/* Define to 1 when the gnulib module sigprocmask should be tested. */
#define GNULIB_TEST_SIGPROCMASK 1

/* Define to 1 when the gnulib module sleep should be tested. */
#define GNULIB_TEST_SLEEP 1

/* Define to 1 when the gnulib module snprintf should be tested. */
#define GNULIB_TEST_SNPRINTF 1

/* Define to 1 when the gnulib module socket should be tested. */
#define GNULIB_TEST_SOCKET 1

/* Define to 1 when the gnulib module stat should be tested. */
#define GNULIB_TEST_STAT 1

/* Define to 1 when the gnulib module stpcpy should be tested. */
#define GNULIB_TEST_STPCPY 1

/* Define to 1 when the gnulib module stpncpy should be tested. */
#define GNULIB_TEST_STPNCPY 1

/* Define to 1 when the gnulib module strdup should be tested. */
#define GNULIB_TEST_STRDUP 1

/* Define to 1 when the gnulib module strerror should be tested. */
#define GNULIB_TEST_STRERROR 1

/* Define to 1 when the gnulib module strerror_r should be tested. */
#define GNULIB_TEST_STRERROR_R 1

/* Define to 1 when the gnulib module strndup should be tested. */
#define GNULIB_TEST_STRNDUP 1

/* Define to 1 when the gnulib module strnlen should be tested. */
#define GNULIB_TEST_STRNLEN 1

/* Define to 1 when the gnulib module strsignal should be tested. */
#define GNULIB_TEST_STRSIGNAL 1

/* Define to 1 when the gnulib module strstr should be tested. */
#define GNULIB_TEST_STRSTR 1

/* Define to 1 when the gnulib module strtod should be tested. */
#define GNULIB_TEST_STRTOD 1

/* Define to 1 when the gnulib module strtoll should be tested. */
#define GNULIB_TEST_STRTOLL 1

/* Define to 1 when the gnulib module strtoull should be tested. */
#define GNULIB_TEST_STRTOULL 1

/* Define to 1 when the gnulib module symlink should be tested. */
#define GNULIB_TEST_SYMLINK 1

/* Define to 1 when the gnulib module symlinkat should be tested. */
#define GNULIB_TEST_SYMLINKAT 1

/* Define to 1 when the gnulib module time_r should be tested. */
#define GNULIB_TEST_TIME_R 1

/* Define to 1 when the gnulib module unlink should be tested. */
#define GNULIB_TEST_UNLINK 1

/* Define to 1 when the gnulib module unsetenv should be tested. */
#define GNULIB_TEST_UNSETENV 1

/* Define to 1 when the gnulib module usleep should be tested. */
#define GNULIB_TEST_USLEEP 1

/* Define to 1 when the gnulib module utimensat should be tested. */
#define GNULIB_TEST_UTIMENSAT 1

/* Define to 1 when the gnulib module vasprintf should be tested. */
#define GNULIB_TEST_VASPRINTF 1

/* Define to 1 when the gnulib module vfprintf-posix should be tested. =
*/
#define GNULIB_TEST_VFPRINTF_POSIX 1

/* Define to 1 when the gnulib module vprintf-posix should be tested. */
#define GNULIB_TEST_VPRINTF_POSIX 1

/* Define to 1 when the gnulib module wcrtomb should be tested. */
#define GNULIB_TEST_WCRTOMB 1

/* Define to 1 when the gnulib module wcswidth should be tested. */
#define GNULIB_TEST_WCSWIDTH 1

/* Define to 1 when the gnulib module wctob should be tested. */
#define GNULIB_TEST_WCTOB 1

/* Define to 1 when the gnulib module wctomb should be tested. */
#define GNULIB_TEST_WCTOMB 1

/* Define to 1 when the gnulib module wcwidth should be tested. */
#define GNULIB_TEST_WCWIDTH 1

/* Define to 1 when the gnulib module write should be tested. */
#define GNULIB_TEST_WRITE 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module unistr/u8-mbtoucr shall be considered =
present. */
#define GNULIB_UNISTR_U8_MBTOUCR 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module unistr/u8-uctomb shall be considered =
present. */
#define GNULIB_UNISTR_U8_UCTOMB 1

/* Define to a C preprocessor expression that evaluates to 1 or 0, =
depending
   whether the gnulib module xgetgroups shall be considered present. */
#define GNULIB_XGETGROUPS 1

/* Define if your system defines TIOCGWINSZ in sys/ioctl.h. */
#define GWINSZ_IN_SYS_IOCTL 1

/* Define if your system defines TIOCGWINSZ in sys/pty.h. */
/* #undef GWINSZ_IN_SYS_PTY */

/* Define to 1 if you have the `access' function. */
#define HAVE_ACCESS 1

/* Define to 1 if you have the `aclsort' function. */
#define HAVE_ACLSORT 1

/* Define to 1 if you have the <aclv.h> header file. */
/* #undef HAVE_ACLV_H */

/* Define to 1 if you have the `aclx_get' function. */
/* #undef HAVE_ACLX_GET */

/* Define to 1 if you have the `acl_copy_ext_native' function. */
/* #undef HAVE_ACL_COPY_EXT_NATIVE */

/* Define to 1 if you have the `acl_create_entry_np' function. */
/* #undef HAVE_ACL_CREATE_ENTRY_NP */

/* Define to 1 if you have the `acl_delete_def_file' function. */
/* #undef HAVE_ACL_DELETE_DEF_FILE */

/* Define to 1 if you have the `acl_delete_fd_np' function. */
/* #undef HAVE_ACL_DELETE_FD_NP */

/* Define to 1 if you have the `acl_delete_file_np' function. */
/* #undef HAVE_ACL_DELETE_FILE_NP */

/* Define to 1 if you have the `acl_entries' function. */
/* #undef HAVE_ACL_ENTRIES */

/* Define to 1 if you have the `acl_extended_file' function. */
/* #undef HAVE_ACL_EXTENDED_FILE */

/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */
/* #undef HAVE_ACL_FIRST_ENTRY */

/* Define to 1 if you have the `acl_free' function. */
/* #undef HAVE_ACL_FREE */

/* Define to 1 if you have the `acl_free_text' function. */
/* #undef HAVE_ACL_FREE_TEXT */

/* Define to 1 if you have the `acl_from_mode' function. */
/* #undef HAVE_ACL_FROM_MODE */

/* Define to 1 if you have the `acl_from_text' function. */
/* #undef HAVE_ACL_FROM_TEXT */

/* Define to 1 if you have the `acl_get_fd' function. */
/* #undef HAVE_ACL_GET_FD */

/* Define to 1 if you have the `acl_get_file' function. */
/* #undef HAVE_ACL_GET_FILE */

/* Define to 1 if you have the <acl/libacl.h> header file. */
/* #undef HAVE_ACL_LIBACL_H */

/* Define to 1 if you have the `acl_set_fd' function. */
/* #undef HAVE_ACL_SET_FD */

/* Define to 1 if you have the `acl_set_file' function. */
/* #undef HAVE_ACL_SET_FILE */

/* Define to 1 if you have the `acl_to_short_text' function. */
/* #undef HAVE_ACL_TO_SHORT_TEXT */

/* Define to 1 if you have the `acl_trivial' function. */
/* #undef HAVE_ACL_TRIVIAL */

/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */
/* #undef HAVE_ACL_TYPE_EXTENDED */

/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1

/* Define to 1 if you have 'alloca' after including <alloca.h>, a header =
that
   may be supplied by this distribution. */
/* #undef HAVE_ALLOCA */

/* Define to 1 if you have <alloca.h> and it should be used (not on =
Ultrix).
   */
/* #undef HAVE_ALLOCA_H */

/* Define if you have an arithmetic hrtime_t type. */
/* #undef HAVE_ARITHMETIC_HRTIME_T */

/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1

/* Define to 1 if you have the `attr_copy_file' function. */
/* #undef HAVE_ATTR_COPY_FILE */

/* Define to 1 if you have the <attr/error_context.h> header file. */
/* #undef HAVE_ATTR_ERROR_CONTEXT_H */

/* Define to 1 if you have the <attr/libattr.h> header file. */
/* #undef HAVE_ATTR_LIBATTR_H */

/* Define to 1 if you have the <bp-sym.h> header file. */
/* #undef HAVE_BP_SYM_H */

/* Define to 1 if you have the `btowc' function. */
#define HAVE_BTOWC 1

/* Define to 1 if nanosleep mishandles large arguments. */
/* #undef HAVE_BUG_BIG_NANOSLEEP */

/* Define to 1 if strtold conforms to C99. */
#define HAVE_C99_STRTOLD 1

/* Define to 1 if your system has a GNU libc compatible `calloc' =
function, and
   to 0 otherwise. */
#define HAVE_CALLOC_GNU 0

/* Define if the 'calloc' function is POSIX compliant. */
#define HAVE_CALLOC_POSIX 1

/* Define to 1 if you have the `canonicalize_file_name' function. */
/* #undef HAVE_CANONICALIZE_FILE_NAME */

/* libcap usability */
/* #undef HAVE_CAP */

/* Define to 1 if you have the `catgets' function. */
#define HAVE_CATGETS 1

/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in =
the
   CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */

/* Define to 1 if you have the MacOS X function =
CFPreferencesCopyAppValue in
   the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */

/* Define to 1 if you have the `chown' function. */
#define HAVE_CHOWN 1

/* Define to 1 if you have the `chroot' function. */
#define HAVE_CHROOT 1

/* Define to 1 if you have the `chsize' function. */
/* #undef HAVE_CHSIZE */

/* Define to 1 if you have the `clock_gettime' function. */
/* #undef HAVE_CLOCK_GETTIME */

/* Define to 1 if you have the `clock_settime' function. */
/* #undef HAVE_CLOCK_SETTIME */

/* Define to 1 if you have the `closedir' function. */
#define HAVE_CLOSEDIR 1

/* Define if you have compound literals. */
#define HAVE_COMPOUND_LITERALS 1

/* Define if the copysignf function is declared in <math.h> and =
available in
   libc. */
/* #undef HAVE_COPYSIGNF_IN_LIBC */

/* Define if the copysignl function is declared in <math.h> and =
available in
   libc. */
/* #undef HAVE_COPYSIGNL_IN_LIBC */

/* Define if the copysign function is declared in <math.h> and available =
in
   libc. */
/* #undef HAVE_COPYSIGN_IN_LIBC */

/* FIXME */
/* #undef HAVE_C_LINE */

/* Define if the GNU dcgettext() function is already present or =
preinstalled.
   */
#define HAVE_DCGETTEXT 1

/* Define to 1 if you have the declaration of `alarm', and to 0 if you =
don't.
   */
#define HAVE_DECL_ALARM 1

/* Define to 1 if you have the declaration of `clearerr_unlocked', and =
to 0 if
   you don't. */
#define HAVE_DECL_CLEARERR_UNLOCKED 0

/* Define to 1 if you have the declaration of `copysign', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_COPYSIGN */

/* Define to 1 if you have the declaration of `copysignf', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_COPYSIGNF */

/* Define to 1 if you have the declaration of `copysignl', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_COPYSIGNL */

/* Define to 1 if you have the declaration of `dirfd', and to 0 if you =
don't.
   */
#define HAVE_DECL_DIRFD 0

/* Define to 1 if you have the declaration of `fchdir', and to 0 if you =
don't.
   */
#define HAVE_DECL_FCHDIR 0

/* Define to 1 if you have the declaration of `fdatasync', and to 0 if =
you
   don't. */
#define HAVE_DECL_FDATASYNC 0

/* Define to 1 if you have the declaration of `fdopendir', and to 0 if =
you
   don't. */
#define HAVE_DECL_FDOPENDIR 0

/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 =
if you
   don't. */
#define HAVE_DECL_FEOF_UNLOCKED 0

/* Define to 1 if you have the declaration of `ferror_unlocked', and to =
0 if
   you don't. */
#define HAVE_DECL_FERROR_UNLOCKED 0

/* Define to 1 if you have the declaration of `fflush_unlocked', and to =
0 if
   you don't. */
#define HAVE_DECL_FFLUSH_UNLOCKED 0

/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 =
if
   you don't. */
#define HAVE_DECL_FGETS_UNLOCKED 0

/* Define to 1 if you have the declaration of `flockfile', and to 0 if =
you
   don't. */
#define HAVE_DECL_FLOCKFILE 1

/* Define to 1 if you have the declaration of `fpurge', and to 0 if you =
don't.
   */
#define HAVE_DECL_FPURGE 0

/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 =
if
   you don't. */
#define HAVE_DECL_FPUTC_UNLOCKED 0

/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 =
if
   you don't. */
#define HAVE_DECL_FPUTS_UNLOCKED 0

/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 =
if
   you don't. */
#define HAVE_DECL_FREAD_UNLOCKED 0

/* Define to 1 if you have the declaration of `freeaddrinfo', and to 0 =
if you
   don't. */
#define HAVE_DECL_FREEADDRINFO 1

/* Define to 1 if you have the declaration of `fseeko', and to 0 if you =
don't.
   */
#define HAVE_DECL_FSEEKO 1

/* Define to 1 if you have the declaration of `ftello', and to 0 if you =
don't.
   */
#define HAVE_DECL_FTELLO 1

/* Define to 1 if you have the declaration of `funlockfile', and to 0 if =
you
   don't. */
#define HAVE_DECL_FUNLOCKFILE 1

/* Define to 1 if you have the declaration of `fwrite_unlocked', and to =
0 if
   you don't. */
#define HAVE_DECL_FWRITE_UNLOCKED 0

/* Define to 1 if you have the declaration of `gai_strerror', and to 0 =
if you
   don't. */
#define HAVE_DECL_GAI_STRERROR 1

/* Define to 1 if you have the declaration of `gai_strerrorA', and to 0 =
if you
   don't. */
#define HAVE_DECL_GAI_STRERRORA 0

/* Define to 1 if you have the declaration of `getaddrinfo', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETADDRINFO 1

/* Define to 1 if you have the declaration of `getchar_unlocked', and to =
0 if
   you don't. */
#define HAVE_DECL_GETCHAR_UNLOCKED 1

/* Define to 1 if you have the declaration of `getcwd', and to 0 if you =
don't.
   */
#define HAVE_DECL_GETCWD 1

/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 =
if you
   don't. */
#define HAVE_DECL_GETC_UNLOCKED 1

/* Define to 1 if you have the declaration of `getdelim', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETDELIM 0

/* Define to 1 if you have the declaration of `getenv', and to 0 if you =
don't.
   */
#define HAVE_DECL_GETENV 1

/* Define to 1 if you have the declaration of `geteuid', and to 0 if you
   don't. */
#define HAVE_DECL_GETEUID 1

/* Define to 1 if you have the declaration of `getgrgid', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETGRGID 1

/* Define to 1 if you have the declaration of `gethrtime', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETHRTIME 0

/* Define to 1 if you have the declaration of `getline', and to 0 if you
   don't. */
#define HAVE_DECL_GETLINE 0

/* Define to 1 if you have the declaration of `getlogin', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETLOGIN 1

/* Define to 1 if you have the declaration of `getnameinfo', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETNAMEINFO 1

/* Define to 1 if you have the declaration of `getpass', and to 0 if you
   don't. */
#define HAVE_DECL_GETPASS 1

/* Define to 1 if you have the declaration of `getpwuid', and to 0 if =
you
   don't. */
#define HAVE_DECL_GETPWUID 1

/* Define to 1 if you have the declaration of `getuid', and to 0 if you =
don't.
   */
#define HAVE_DECL_GETUID 1

/* Define to 1 if you have the declaration of `getusershell', and to 0 =
if you
   don't. */
/* #undef HAVE_DECL_GETUSERSHELL */

/* Define to 1 if you have the declaration of `getutent', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_GETUTENT */

/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if =
you
   don't. */
#define HAVE_DECL_INET_NTOP 1

/* Define to 1 if you have the declaration of `inet_pton', and to 0 if =
you
   don't. */
#define HAVE_DECL_INET_PTON 1

/* Define to 1 if you have the declaration of `isblank', and to 0 if you
   don't. */
#define HAVE_DECL_ISBLANK 1

/* Define to 1 if you have the declaration of `iswblank', and to 0 if =
you
   don't. */
#define HAVE_DECL_ISWBLANK 1

/* Define to 1 if you have the declaration of `localtime_r', and to 0 if =
you
   don't. */
#define HAVE_DECL_LOCALTIME_R 0

/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you =
don't.
   */
/* #undef HAVE_DECL_MBRLEN */

/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you
   don't. */
/* #undef HAVE_DECL_MBRTOWC */

/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you
   don't. */
/* #undef HAVE_DECL_MBSINIT */

/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_MBSRTOWCS */

/* Define to 1 if you have a declaration of mbswidth() in <wchar.h>, and =
to 0
   otherwise. */
#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0

/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
   don't. */
#define HAVE_DECL_MEMRCHR 0

/* Define to 1 if you have the declaration of `program_invocation_name', =
and
   to 0 if you don't. */
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0

/* Define to 1 if you have the declaration of =
`program_invocation_short_name',
   and to 0 if you don't. */
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0

/* Define to 1 if you have the declaration of `putchar_unlocked', and to =
0 if
   you don't. */
#define HAVE_DECL_PUTCHAR_UNLOCKED 1

/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 =
if you
   don't. */
#define HAVE_DECL_PUTC_UNLOCKED 1

/* Define to 1 if you have the declaration of `setenv', and to 0 if you =
don't.
   */
#define HAVE_DECL_SETENV 0

/* Define to 1 if you have the declaration of `setregid', and to 0 if =
you
   don't. */
#define HAVE_DECL_SETREGID 1

/* Define to 1 if you have the declaration of `sleep', and to 0 if you =
don't.
   */
#define HAVE_DECL_SLEEP 1

/* Define to 1 if you have the declaration of `snprintf', and to 0 if =
you
   don't. */
#define HAVE_DECL_SNPRINTF 1

/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you
   don't. */
#define HAVE_DECL_STPNCPY 0

/* Define to 1 if you have the declaration of `strdup', and to 0 if you =
don't.
   */
#define HAVE_DECL_STRDUP 1

/* Define to 1 if you have the declaration of `strerror_r', and to 0 if =
you
   don't. */
#define HAVE_DECL_STRERROR_R 1

/* Define to 1 if you have the declaration of `strmode', and to 0 if you
   don't. */
#define HAVE_DECL_STRMODE 0

/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if =
you
   don't. */
#define HAVE_DECL_STRNCASECMP 1

/* Define to 1 if you have the declaration of `strndup', and to 0 if you
   don't. */
#define HAVE_DECL_STRNDUP 0

/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
   don't. */
#define HAVE_DECL_STRNLEN 0

/* Define to 1 if you have the declaration of `strsignal', and to 0 if =
you
   don't. */
#define HAVE_DECL_STRSIGNAL 0

/* Define to 1 if you have the declaration of `strtoimax', and to 0 if =
you
   don't. */
#define HAVE_DECL_STRTOIMAX 1

/* Define to 1 if you have the declaration of `strtoll', and to 0 if you
   don't. */
/* #undef HAVE_DECL_STRTOLL */

/* Define to 1 if you have the declaration of `strtoull', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_STRTOULL */

/* Define to 1 if you have the declaration of `strtoumax', and to 0 if =
you
   don't. */
#define HAVE_DECL_STRTOUMAX 1

/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if =
you
   don't. */
#define HAVE_DECL_SYS_SIGLIST 0

/* Define to 1 if you have the declaration of `towlower', and to 0 if =
you
   don't. */
/* #undef HAVE_DECL_TOWLOWER */

/* Define to 1 if you have the declaration of `ttyname', and to 0 if you
   don't. */
#define HAVE_DECL_TTYNAME 1

/* Define to 1 if you have the declaration of `tzname', and to 0 if you =
don't.
   */
#define HAVE_DECL_TZNAME 1

/* Define to 1 if you have the declaration of `unsetenv', and to 0 if =
you
   don't. */
#define HAVE_DECL_UNSETENV 0

/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you
   don't. */
/* #undef HAVE_DECL_WCRTOMB */

/* Define to 1 if you have the declaration of `wctob', and to 0 if you =
don't.
   */
#define HAVE_DECL_WCTOB 1

/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
   don't. */
#define HAVE_DECL_WCWIDTH 1

/* Define to 1 if you have the declaration of `_snprintf', and to 0 if =
you
   don't. */
#define HAVE_DECL__SNPRINTF 0

/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 =
if you
   don't. */
#define HAVE_DECL__SYS_SIGLIST 0

/* Define to 1 if you have the declaration of `__fpending', and to 0 if =
you
   don't. */
#define HAVE_DECL___FPENDING 0

/* Define to 1 if you have the declaration of `__fsetlocking', and to 0 =
if you
   don't. */
#define HAVE_DECL___FSETLOCKING 0

/* Define to 1 if you have the declaration of `__sys_siglist', and to 0 =
if you
   don't. */
#define HAVE_DECL___SYS_SIGLIST 0

/* Define to 1 if you have the `directio' function. */
/* #undef HAVE_DIRECTIO */

/* Define to 1 if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1

/* Define to 1 if you have the `dirfd' function. */
/* #undef HAVE_DIRFD */

/* Define to 1 if you have the 'dup2' function. */
#define HAVE_DUP2 1

/* Define to 1 if you have the <dustat.h> header file. */
/* #undef HAVE_DUSTAT_H */

/* Define to 1 if you have the `eaccess' function. */
/* #undef HAVE_EACCESS */

/* Define to 1 if you have the `endgrent' function. */
#define HAVE_ENDGRENT 1

/* Define to 1 if you have the `endpwent' function. */
#define HAVE_ENDPWENT 1

/* Define if you have the declaration of environ. */
/* #undef HAVE_ENVIRON_DECL */

/* Define to 1 if you have the `euidaccess' function. */
/* #undef HAVE_EUIDACCESS */

/* Define to 1 if you have the `faccessat' function. */
/* #undef HAVE_FACCESSAT */

/* Define to 1 if you have the `facl' function. */
/* #undef HAVE_FACL */

/* Define to 1 if you have the `fchdir' function. */
/* #undef HAVE_FCHDIR */

/* Define to 1 if you have the `fchmod' function. */
#define HAVE_FCHMOD 1

/* Define to 1 if you have the `fchmodat' function. */
/* #undef HAVE_FCHMODAT */

/* Define to 1 if you have the `fchown' function. */
#define HAVE_FCHOWN 1

/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1

/* Define to 1 if you have the `fdatasync' function. */
/* #undef HAVE_FDATASYNC */

/* Define to 1 if you have the `fdopendir' function. */
/* #undef HAVE_FDOPENDIR */

/* Define to 1 if you have the <features.h> header file. */
/* #undef HAVE_FEATURES_H */

/* Define to 1 if pipes are FIFOs, 0 if sockets. Leave undefined if not =
known.
   */
#define HAVE_FIFO_PIPES 1

/* Define to 1 if you have the `flockfile' function. */
#define HAVE_FLOCKFILE 1

/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1

/* Define to 1 if you have the `fpurge' function. */
/* #undef HAVE_FPURGE */

/* Define if the frexpl function is available in libc. */
#define HAVE_FREXPL_IN_LIBC 1

/* Define if the frexp function is available in libc. */
/* #undef HAVE_FREXP_IN_LIBC */

/* Define to 1 if fseeko (and presumably ftello) exists and is declared. =
*/
#define HAVE_FSEEKO 1

/* Define to 1 if you have the `fstatat' function. */
/* #undef HAVE_FSTATAT */

/* Define to 1 if you have the `fstatfs' function. */
/* #undef HAVE_FSTATFS */

/* Define to 1 if you have the `fsync' function. */
#define HAVE_FSYNC 1

/* Define to 1 if you have the <fs_info.h> header file. */
/* #undef HAVE_FS_INFO_H */

/* Define to 1 if you have the `fs_stat_dev' function. */
/* #undef HAVE_FS_STAT_DEV */

/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1

/* Define to 1 if you have the `funlockfile' function. */
#define HAVE_FUNLOCKFILE 1

/* Define to 1 if you have the `futimens' function. */
/* #undef HAVE_FUTIMENS */

/* Define to 1 if you have the `futimes' function. */
/* #undef HAVE_FUTIMES */

/* Define to 1 if you have the `futimesat' function. */
/* #undef HAVE_FUTIMESAT */

/* Define to 1 if you have the `getacl' function. */
/* #undef HAVE_GETACL */

/* Define to 1 if you have the `getdelim' function. */
/* #undef HAVE_GETDELIM */

/* Define to 1 if you have the `getdtablesize' function. */
#define HAVE_GETDTABLESIZE 1

/* Define to 1 if you have the `getegid' function. */
#define HAVE_GETEGID 1

/* Define to 1 if you have the `getgrent_nomembers' function. */
/* #undef HAVE_GETGRENT_NOMEMBERS */

/* Define to 1 if you have the `getgrgid_nomembers' function. */
/* #undef HAVE_GETGRGID_NOMEMBERS */

/* Define to 1 if you have the `getgrnam_nomembers' function. */
/* #undef HAVE_GETGRNAM_NOMEMBERS */

/* Define to 1 if you have the `getgrouplist' function. */
/* #undef HAVE_GETGROUPLIST */

/* Define to 1 if your system has a working `getgroups' function. */
#define HAVE_GETGROUPS 1

/* Define to 1 if you have the `gethostbyname' function. */
#define HAVE_GETHOSTBYNAME 1

/* Define to 1 if you have the `gethostid' function. */
#define HAVE_GETHOSTID 1

/* Define to 1 if you have the `gethostname' function. */
#define HAVE_GETHOSTNAME 1

/* Define to 1 if you have the `getmntent' function. */
/* #undef HAVE_GETMNTENT */

/* Define to 1 if you have the `getmntinfo' function. */
/* #undef HAVE_GETMNTINFO */

/* Define to 1 if you have the <getopt.h> header file. */
/* #undef HAVE_GETOPT_H */

/* Define to 1 if you have the `getopt_long_only' function. */
/* #undef HAVE_GETOPT_LONG_ONLY */

/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1

/* Define to 1 if you have the `getppriv' function. */
/* #undef HAVE_GETPPRIV */

/* Define to 1 if you have the `getservbyname' function. */
#define HAVE_GETSERVBYNAME 1

/* Define to 1 if you have the `getspnam' function. */
/* #undef HAVE_GETSPNAM */

/* Define to 1 if you have the `getsysinfo' function. */
/* #undef HAVE_GETSYSINFO */

/* Define if the GNU gettext() function is already present or =
preinstalled. */
#define HAVE_GETTEXT 1

/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1

/* Define to 1 if you have the `getusershell' function. */
/* #undef HAVE_GETUSERSHELL */

/* Define if you have GNU libgmp (or replacement) */
/* #undef HAVE_GMP */

/* Define to 1 if you have the <grp.h> header file. */
#define HAVE_GRP_H 1

/* Define to 1 if you have the `hasmntopt' function. */
/* #undef HAVE_HASMNTOPT */

/* Define to 1 if you have the <hurd.h> header file. */
/* #undef HAVE_HURD_H */

/* Define if you have the iconv() function and it works. */
#define HAVE_ICONV 1

/* Define to 1 if you have the <iconv.h> header file. */
#define HAVE_ICONV_H 1

/* Define to 1 if you have the `inet_ntop' function. */
/* #undef HAVE_INET_NTOP */

/* Define to 1 if you have the `inet_pton' function. */
/* #undef HAVE_INET_PTON */

/* Define to 1 if you have the `initgroups' function. */
#define HAVE_INITGROUPS 1

/* Define to 1 if the compiler supports one of the keywords 'inline',
   '__inline__', '__inline' and effectively inlines functions marked as =
such.
   */
#define HAVE_INLINE 1

/* Define to 1 if you have usable inotify support. */
/* #undef HAVE_INOTIFY */

/* Define to 1 if you have the `inotify_init' function. */
/* #undef HAVE_INOTIFY_INIT */

/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. =
*/
#define HAVE_INTMAX_T 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
   declares uintmax_t. */
#define HAVE_INTTYPES_H_WITH_UINTMAX 1

/* Define to 1 if you have the `ioctl' function. */
#define HAVE_IOCTL 1

/* Define to 1 if <sys/socket.h> defines AF_INET. */
#define HAVE_IPV4 1

/* Define to 1 if <sys/socket.h> defines AF_INET6. */
/* #undef HAVE_IPV6 */

/* Define to 1 if you have the `isapipe' function. */
/* #undef HAVE_ISAPIPE */

/* Define to 1 if you have the `isascii' function. */
#define HAVE_ISASCII 1

/* Define to 1 if you have the `isblank' function. */
#define HAVE_ISBLANK 1

/* Define if the isnan(double) function is available in libc. */
#define HAVE_ISNAND_IN_LIBC 1

/* Define if the isnan(float) function is available in libc. */
#define HAVE_ISNANF_IN_LIBC 1

/* Define if the isnan(long double) function is available in libc. */
#define HAVE_ISNANL_IN_LIBC 1

/* Define to 1 if you have the `iswblank' function. */
#define HAVE_ISWBLANK 1

/* Define to 1 if you have the `iswcntrl' function. */
#define HAVE_ISWCNTRL 1

/* Define to 1 if you have the `iswctype' function. */
#define HAVE_ISWCTYPE 1

/* Define to 1 if you have the `iswspace' function. */
#define HAVE_ISWSPACE 1

/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1

/* Define to 1 if you have the <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1

/* Define if you have <langinfo.h> and nl_langinfo(YESEXPR). */
/* #undef HAVE_LANGINFO_YESEXPR */

/* Define to 1 if you have the `lchmod' function. */
#define HAVE_LCHMOD 1

/* Define to 1 if you have the `lchown' function. */
#define HAVE_LCHOWN 1

/* Define if your <locale.h> file defines LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1

/* Define if the ldexpl function is available in libc. */
#define HAVE_LDEXPL_IN_LIBC 1

/* Define if the ldexp function is available in libc. */
#define HAVE_LDEXP_IN_LIBC 1

/* Define to 1 if you have the `dgc' library (-ldgc). */
/* #undef HAVE_LIBDGC */

/* Define to 1 if you have the <libgen.h> header file. */
#define HAVE_LIBGEN_H 1

/* Define to 1 if you have the <libintl.h> header file. */
#define HAVE_LIBINTL_H 1

/* Define to 1 if you have the `kstat' library (-lkstat). */
/* #undef HAVE_LIBKSTAT */

/* Define to 1 if you have the `ldgc' library (-lldgc). */
/* #undef HAVE_LIBLDGC */

/* Define to 1 if you have the `os' library (-los). */
/* #undef HAVE_LIBOS */

/* Define to 1 if you have the `perfstat' library (-lperfstat). */
/* #undef HAVE_LIBPERFSTAT */

/* Define to 1 if you have the `ypsec' library (-lypsec). */
/* #undef HAVE_LIBYPSEC */

/* Define to 1 if you have the `link' function. */
#define HAVE_LINK 1

/* Define to 1 if you have the `linkat' function. */
/* #undef HAVE_LINKAT */

/* Define to 1 if you have the `listmntent' function. */
/* #undef HAVE_LISTMNTENT */

/* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1

/* Define to 1 if you support file names longer than 14 characters. */
#define HAVE_LONG_FILE_NAMES 1

/* Define to 1 if the system has the type `long long int'. */
#define HAVE_LONG_LONG_INT 1

/* Define to 1 if you have the `lstat' function. */
#define HAVE_LSTAT 1

/* Define to 1 if `lstat' has the bug that it succeeds when given the
   zero-length file name argument. */
/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */

/* Define to 1 if you have the `lutimes' function. */
/* #undef HAVE_LUTIMES */

/* Define to 1 if you have the <machine/hal_sysinfo.h> header file. */
/* #undef HAVE_MACHINE_HAL_SYSINFO_H */

/* Define to 1 if you have the <mach/mach.h> header file. */
/* #undef HAVE_MACH_MACH_H */

/* Define to 1 if your system has a GNU libc compatible 'malloc' =
function, and
   to 0 otherwise. */
#define HAVE_MALLOC_GNU 0

/* Define if the 'malloc' function is POSIX compliant. */
#define HAVE_MALLOC_POSIX 1

/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after =
including
   config.h and <sys/mman.h>. */
/* #undef HAVE_MAP_ANONYMOUS */

/* Define to 1 if you have the `matchpathcon_init_prefix' function. */
/* #undef HAVE_MATCHPATHCON_INIT_PREFIX */

/* Define to 1 if you have the <math.h> header file. */
#define HAVE_MATH_H 1

/* Define to 1 if you have the `mbrlen' function. */
#define HAVE_MBRLEN 1

/* Define to 1 if you have the `mbrtowc' function. */
#define HAVE_MBRTOWC 1

/* Define to 1 if you have the `mbsinit' function. */
#define HAVE_MBSINIT 1

/* Define to 1 if you have the `mbslen' function. */
/* #undef HAVE_MBSLEN */

/* Define to 1 if you have the `mbsrtowcs' function. */
#define HAVE_MBSRTOWCS 1

/* Define to 1 if <wchar.h> declares mbstate_t. */
#define HAVE_MBSTATE_T 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mempcpy' function. */
/* #undef HAVE_MEMPCPY */

/* Define to 1 if you have the `memrchr' function. */
/* #undef HAVE_MEMRCHR */

/* Define to 1 if you have the `microuptime' function. */
/* #undef HAVE_MICROUPTIME */

/* Define to 1 if you have the `mkdirat' function. */
/* #undef HAVE_MKDIRAT */

/* Define to 1 if you have the `mkfifo' function. */
#define HAVE_MKFIFO 1

/* Define to 1 if you have the `mkstemp' function. */
#define HAVE_MKSTEMP 1

/* Define to 1 if you have the <mntent.h> header file. */
/* #undef HAVE_MNTENT_H */

/* Define to 1 if you have the `mprotect' function. */
/* #undef HAVE_MPROTECT */

/* Define to 1 on MSVC platforms that have the "invalid parameter =
handler"
   concept. */
/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */

/* Define to 1 if you have the `nanotime' function. */
/* #undef HAVE_NANOTIME */

/* Define to 1 if you have the `nanouptime' function. */
/* #undef HAVE_NANOUPTIME */

/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1

/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1

/* Define to 1 if you have the `newlocale' function. */
/* #undef HAVE_NEWLOCALE */

/* Define to 1 if you have the `next_dev' function. */
/* #undef HAVE_NEXT_DEV */

/* Define to 1 if you have the <nfs/nfs_client.h> header file. */
/* #undef HAVE_NFS_NFS_CLIENT_H */

/* Define to 1 if you have the <nfs/vfs.h> header file. */
/* #undef HAVE_NFS_VFS_H */

/* Define to 1 if you have the `nice' function. */
#define HAVE_NICE 1

/* Define to 1 if you have the <nlist.h> header file. */
#define HAVE_NLIST_H 1

/* Define to 1 if you have the `nl_langinfo' function. */
#define HAVE_NL_LANGINFO 1

/* Define to 1 if libc includes obstacks. */
/* #undef HAVE_OBSTACK */

/* Define to 1 if you have the `openat' function. */
/* #undef HAVE_OPENAT */

/* Define to 1 if you have the `opendir' function. */
#define HAVE_OPENDIR 1

/* Define to 1 if you have the <OS.h> header file. */
/* #undef HAVE_OS_H */

/* Define to 1 if getcwd works, except it sometimes fails when it =
shouldn't,
   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */
/* #undef HAVE_PARTLY_WORKING_GETCWD */

/* Define to 1 if you have the `pathconf' function. */
#define HAVE_PATHCONF 1

/* Define to 1 if you have the <paths.h> header file. */
/* #undef HAVE_PATHS_H */

/* Define to 1 if you have the `pipe' function. */
#define HAVE_PIPE 1

/* Define to 1 if you have the `posix_fadvise' function. */
/* #undef HAVE_POSIX_FADVISE */

/* Define to 1 if you have the <priv.h> header file. */
/* #undef HAVE_PRIV_H */

/* Define if your system has the /proc/uptime special file. */
/* #undef HAVE_PROC_UPTIME */

/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */

/* Define to 1 if you have the `pstat_getstatic' function. */
/* #undef HAVE_PSTAT_GETSTATIC */

/* Define to 1 if you have the `pthread_atfork' function. */
/* #undef HAVE_PTHREAD_ATFORK */

/* Define to 1 if you have the <pthread.h> header file. */
/* #undef HAVE_PTHREAD_H */

/* Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE. */
/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */

/* Define if the POSIX multithreading library has read/write locks. */
/* #undef HAVE_PTHREAD_RWLOCK */

/* Define to 1 if the system has the type `pthread_spinlock_t'. */
/* #undef HAVE_PTHREAD_SPINLOCK_T */

/* Define to 1 if the system has the type `pthread_t'. */
/* #undef HAVE_PTHREAD_T */

/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H 1

/* Define to 1 if you have the `raise' function. */
#define HAVE_RAISE 1

/* Define to 1 if accept is declared even after undefining macros. */
#define HAVE_RAW_DECL_ACCEPT 1

/* Define to 1 if accept4 is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_ACCEPT4 */

/* Define to 1 if acosf is declared even after undefining macros. */
#define HAVE_RAW_DECL_ACOSF 1

/* Define to 1 if acosl is declared even after undefining macros. */
#define HAVE_RAW_DECL_ACOSL 1

/* Define to 1 if alphasort is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_ALPHASORT */

/* Define to 1 if asinf is declared even after undefining macros. */
#define HAVE_RAW_DECL_ASINF 1

/* Define to 1 if asinl is declared even after undefining macros. */
#define HAVE_RAW_DECL_ASINL 1

/* Define to 1 if atanf is declared even after undefining macros. */
#define HAVE_RAW_DECL_ATANF 1

/* Define to 1 if atanl is declared even after undefining macros. */
#define HAVE_RAW_DECL_ATANL 1

/* Define to 1 if atoll is declared even after undefining macros. */
#define HAVE_RAW_DECL_ATOLL 1

/* Define to 1 if bind is declared even after undefining macros. */
#define HAVE_RAW_DECL_BIND 1

/* Define to 1 if btowc is declared even after undefining macros. */
#define HAVE_RAW_DECL_BTOWC 1

/* Define to 1 if canonicalize_file_name is declared even after =
undefining
   macros. */
/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */

/* Define to 1 if ceilf is declared even after undefining macros. */
#define HAVE_RAW_DECL_CEILF 1

/* Define to 1 if ceill is declared even after undefining macros. */
#define HAVE_RAW_DECL_CEILL 1

/* Define to 1 if chdir is declared even after undefining macros. */
#define HAVE_RAW_DECL_CHDIR 1

/* Define to 1 if chown is declared even after undefining macros. */
#define HAVE_RAW_DECL_CHOWN 1

/* Define to 1 if closedir is declared even after undefining macros. */
#define HAVE_RAW_DECL_CLOSEDIR 1

/* Define to 1 if connect is declared even after undefining macros. */
#define HAVE_RAW_DECL_CONNECT 1

/* Define to 1 if copysign is declared even after undefining macros. */
#define HAVE_RAW_DECL_COPYSIGN 1

/* Define to 1 if copysignf is declared even after undefining macros. */
#define HAVE_RAW_DECL_COPYSIGNF 1

/* Define to 1 if copysignl is declared even after undefining macros. */
#define HAVE_RAW_DECL_COPYSIGNL 1

/* Define to 1 if cosf is declared even after undefining macros. */
#define HAVE_RAW_DECL_COSF 1

/* Define to 1 if coshf is declared even after undefining macros. */
#define HAVE_RAW_DECL_COSHF 1

/* Define to 1 if cosl is declared even after undefining macros. */
#define HAVE_RAW_DECL_COSL 1

/* Define to 1 if dirfd is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_DIRFD */

/* Define to 1 if dprintf is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_DPRINTF */

/* Define to 1 if dup is declared even after undefining macros. */
#define HAVE_RAW_DECL_DUP 1

/* Define to 1 if dup2 is declared even after undefining macros. */
#define HAVE_RAW_DECL_DUP2 1

/* Define to 1 if dup3 is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_DUP3 */

/* Define to 1 if duplocale is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_DUPLOCALE */

/* Define to 1 if endusershell is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_ENDUSERSHELL */

/* Define to 1 if environ is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_ENVIRON */

/* Define to 1 if euidaccess is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_EUIDACCESS */

/* Define to 1 if expf is declared even after undefining macros. */
#define HAVE_RAW_DECL_EXPF 1

/* Define to 1 if expl is declared even after undefining macros. */
#define HAVE_RAW_DECL_EXPL 1

/* Define to 1 if fabsf is declared even after undefining macros. */
#define HAVE_RAW_DECL_FABSF 1

/* Define to 1 if faccessat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FACCESSAT */

/* Define to 1 if fchdir is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FCHDIR */

/* Define to 1 if fchmodat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FCHMODAT */

/* Define to 1 if fchownat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FCHOWNAT */

/* Define to 1 if fcntl is declared even after undefining macros. */
#define HAVE_RAW_DECL_FCNTL 1

/* Define to 1 if fdatasync is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FDATASYNC */

/* Define to 1 if fdopendir is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FDOPENDIR */

/* Define to 1 if ffs is declared even after undefining macros. */
#define HAVE_RAW_DECL_FFS 1

/* Define to 1 if ffsl is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FFSL */

/* Define to 1 if ffsll is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FFSLL */

/* Define to 1 if floorf is declared even after undefining macros. */
#define HAVE_RAW_DECL_FLOORF 1

/* Define to 1 if floorl is declared even after undefining macros. */
#define HAVE_RAW_DECL_FLOORL 1

/* Define to 1 if fmodf is declared even after undefining macros. */
#define HAVE_RAW_DECL_FMODF 1

/* Define to 1 if fpurge is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FPURGE */

/* Define to 1 if freeaddrinfo is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_FREEADDRINFO 1

/* Define to 1 if frexpf is declared even after undefining macros. */
#define HAVE_RAW_DECL_FREXPF 1

/* Define to 1 if frexpl is declared even after undefining macros. */
#define HAVE_RAW_DECL_FREXPL 1

/* Define to 1 if fseeko is declared even after undefining macros. */
#define HAVE_RAW_DECL_FSEEKO 1

/* Define to 1 if fstat is declared even after undefining macros. */
#define HAVE_RAW_DECL_FSTAT 1

/* Define to 1 if fstatat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FSTATAT */

/* Define to 1 if fsync is declared even after undefining macros. */
#define HAVE_RAW_DECL_FSYNC 1

/* Define to 1 if ftello is declared even after undefining macros. */
#define HAVE_RAW_DECL_FTELLO 1

/* Define to 1 if ftruncate is declared even after undefining macros. */
#define HAVE_RAW_DECL_FTRUNCATE 1

/* Define to 1 if futimens is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_FUTIMENS */

/* Define to 1 if gai_strerror is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GAI_STRERROR 1

/* Define to 1 if getaddrinfo is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETADDRINFO 1

/* Define to 1 if getcwd is declared even after undefining macros. */
#define HAVE_RAW_DECL_GETCWD 1

/* Define to 1 if getdelim is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_GETDELIM */

/* Define to 1 if getdomainname is declared even after undefining =
macros. */
/* #undef HAVE_RAW_DECL_GETDOMAINNAME */

/* Define to 1 if getdtablesize is declared even after undefining =
macros. */
#define HAVE_RAW_DECL_GETDTABLESIZE 1

/* Define to 1 if getgroups is declared even after undefining macros. */
#define HAVE_RAW_DECL_GETGROUPS 1

/* Define to 1 if gethostname is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_GETHOSTNAME */

/* Define to 1 if getline is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_GETLINE */

/* Define to 1 if getloadavg is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_GETLOADAVG */

/* Define to 1 if getlogin is declared even after undefining macros. */
#define HAVE_RAW_DECL_GETLOGIN 1

/* Define to 1 if getlogin_r is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETLOGIN_R 1

/* Define to 1 if getnameinfo is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETNAMEINFO 1

/* Define to 1 if getpagesize is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETPAGESIZE 1

/* Define to 1 if getpeername is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETPEERNAME 1

/* Define to 1 if getsockname is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETSOCKNAME 1

/* Define to 1 if getsockopt is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETSOCKOPT 1

/* Define to 1 if getsubopt is declared even after undefining macros. */
#define HAVE_RAW_DECL_GETSUBOPT 1

/* Define to 1 if gettimeofday is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_GETTIMEOFDAY 1

/* Define to 1 if getusershell is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_GETUSERSHELL */

/* Define to 1 if grantpt is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_GRANTPT */

/* Define to 1 if group_member is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_GROUP_MEMBER */

/* Define to 1 if imaxabs is declared even after undefining macros. */
#define HAVE_RAW_DECL_IMAXABS 1

/* Define to 1 if imaxdiv is declared even after undefining macros. */
#define HAVE_RAW_DECL_IMAXDIV 1

/* Define to 1 if inet_ntop is declared even after undefining macros. */
#define HAVE_RAW_DECL_INET_NTOP 1

/* Define to 1 if inet_pton is declared even after undefining macros. */
#define HAVE_RAW_DECL_INET_PTON 1

/* Define to 1 if initstat_r is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_INITSTAT_R */

/* Define to 1 if ioctl is declared even after undefining macros. */
#define HAVE_RAW_DECL_IOCTL 1

/* Define to 1 if isblank is declared even after undefining macros. */
#define HAVE_RAW_DECL_ISBLANK 1

/* Define to 1 if iswctype is declared even after undefining macros. */
#define HAVE_RAW_DECL_ISWCTYPE 1

/* Define to 1 if lchmod is declared even after undefining macros. */
#define HAVE_RAW_DECL_LCHMOD 1

/* Define to 1 if lchown is declared even after undefining macros. */
#define HAVE_RAW_DECL_LCHOWN 1

/* Define to 1 if ldexpf is declared even after undefining macros. */
#define HAVE_RAW_DECL_LDEXPF 1

/* Define to 1 if ldexpl is declared even after undefining macros. */
#define HAVE_RAW_DECL_LDEXPL 1

/* Define to 1 if link is declared even after undefining macros. */
#define HAVE_RAW_DECL_LINK 1

/* Define to 1 if linkat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_LINKAT */

/* Define to 1 if listen is declared even after undefining macros. */
#define HAVE_RAW_DECL_LISTEN 1

/* Define to 1 if log10f is declared even after undefining macros. */
#define HAVE_RAW_DECL_LOG10F 1

/* Define to 1 if logb is declared even after undefining macros. */
#define HAVE_RAW_DECL_LOGB 1

/* Define to 1 if logf is declared even after undefining macros. */
#define HAVE_RAW_DECL_LOGF 1

/* Define to 1 if logl is declared even after undefining macros. */
#define HAVE_RAW_DECL_LOGL 1

/* Define to 1 if lseek is declared even after undefining macros. */
#define HAVE_RAW_DECL_LSEEK 1

/* Define to 1 if lstat is declared even after undefining macros. */
#define HAVE_RAW_DECL_LSTAT 1

/* Define to 1 if mbrlen is declared even after undefining macros. */
#define HAVE_RAW_DECL_MBRLEN 1

/* Define to 1 if mbrtowc is declared even after undefining macros. */
#define HAVE_RAW_DECL_MBRTOWC 1

/* Define to 1 if mbsinit is declared even after undefining macros. */
#define HAVE_RAW_DECL_MBSINIT 1

/* Define to 1 if mbsnrtowcs is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_MBSNRTOWCS */

/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
#define HAVE_RAW_DECL_MBSRTOWCS 1

/* Define to 1 if memmem is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MEMMEM */

/* Define to 1 if mempcpy is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MEMPCPY */

/* Define to 1 if memrchr is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MEMRCHR */

/* Define to 1 if mkdirat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKDIRAT */

/* Define to 1 if mkdtemp is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKDTEMP */

/* Define to 1 if mkfifo is declared even after undefining macros. */
#define HAVE_RAW_DECL_MKFIFO 1

/* Define to 1 if mkfifoat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKFIFOAT */

/* Define to 1 if mknod is declared even after undefining macros. */
#define HAVE_RAW_DECL_MKNOD 1

/* Define to 1 if mknodat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKNODAT */

/* Define to 1 if mkostemp is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKOSTEMP */

/* Define to 1 if mkostemps is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKOSTEMPS */

/* Define to 1 if mkstemp is declared even after undefining macros. */
#define HAVE_RAW_DECL_MKSTEMP 1

/* Define to 1 if mkstemps is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_MKSTEMPS */

/* Define to 1 if modff is declared even after undefining macros. */
#define HAVE_RAW_DECL_MODFF 1

/* Define to 1 if nl_langinfo is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_NL_LANGINFO 1

/* Define to 1 if openat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_OPENAT */

/* Define to 1 if opendir is declared even after undefining macros. */
#define HAVE_RAW_DECL_OPENDIR 1

/* Define to 1 if pclose is declared even after undefining macros. */
#define HAVE_RAW_DECL_PCLOSE 1

/* Define to 1 if pipe is declared even after undefining macros. */
#define HAVE_RAW_DECL_PIPE 1

/* Define to 1 if pipe2 is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_PIPE2 */

/* Define to 1 if popen is declared even after undefining macros. */
#define HAVE_RAW_DECL_POPEN 1

/* Define to 1 if powf is declared even after undefining macros. */
#define HAVE_RAW_DECL_POWF 1

/* Define to 1 if pread is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_PREAD */

/* Define to 1 if pselect is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_PSELECT */

/* Define to 1 if pthread_sigmask is declared even after undefining =
macros. */
#define HAVE_RAW_DECL_PTHREAD_SIGMASK 1

/* Define to 1 if ptsname is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_PTSNAME */

/* Define to 1 if pwrite is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_PWRITE */

/* Define to 1 if random_r is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_RANDOM_R */

/* Define to 1 if rawmemchr is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_RAWMEMCHR */

/* Define to 1 if readdir is declared even after undefining macros. */
#define HAVE_RAW_DECL_READDIR 1

/* Define to 1 if readlink is declared even after undefining macros. */
#define HAVE_RAW_DECL_READLINK 1

/* Define to 1 if readlinkat is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_READLINKAT */

/* Define to 1 if realpath is declared even after undefining macros. */
#define HAVE_RAW_DECL_REALPATH 1

/* Define to 1 if recv is declared even after undefining macros. */
#define HAVE_RAW_DECL_RECV 1

/* Define to 1 if recvfrom is declared even after undefining macros. */
#define HAVE_RAW_DECL_RECVFROM 1

/* Define to 1 if renameat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_RENAMEAT */

/* Define to 1 if rewinddir is declared even after undefining macros. */
#define HAVE_RAW_DECL_REWINDDIR 1

/* Define to 1 if rmdir is declared even after undefining macros. */
#define HAVE_RAW_DECL_RMDIR 1

/* Define to 1 if round is declared even after undefining macros. */
#define HAVE_RAW_DECL_ROUND 1

/* Define to 1 if roundf is declared even after undefining macros. */
#define HAVE_RAW_DECL_ROUNDF 1

/* Define to 1 if roundl is declared even after undefining macros. */
#define HAVE_RAW_DECL_ROUNDL 1

/* Define to 1 if rpmatch is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_RPMATCH */

/* Define to 1 if scandir is declared even after undefining macros. */
#define HAVE_RAW_DECL_SCANDIR 1

/* Define to 1 if select is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_SELECT */

/* Define to 1 if send is declared even after undefining macros. */
#define HAVE_RAW_DECL_SEND 1

/* Define to 1 if sendto is declared even after undefining macros. */
#define HAVE_RAW_DECL_SENDTO 1

/* Define to 1 if setenv is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_SETENV */

/* Define to 1 if setlocale is declared even after undefining macros. */
#define HAVE_RAW_DECL_SETLOCALE 1

/* Define to 1 if setsockopt is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SETSOCKOPT 1

/* Define to 1 if setstate_r is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_SETSTATE_R */

/* Define to 1 if setusershell is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_SETUSERSHELL */

/* Define to 1 if shutdown is declared even after undefining macros. */
#define HAVE_RAW_DECL_SHUTDOWN 1

/* Define to 1 if sigaction is declared even after undefining macros. */
#define HAVE_RAW_DECL_SIGACTION 1

/* Define to 1 if sigaddset is declared even after undefining macros. */
#define HAVE_RAW_DECL_SIGADDSET 1

/* Define to 1 if sigdelset is declared even after undefining macros. */
#define HAVE_RAW_DECL_SIGDELSET 1

/* Define to 1 if sigemptyset is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SIGEMPTYSET 1

/* Define to 1 if sigfillset is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SIGFILLSET 1

/* Define to 1 if sigismember is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SIGISMEMBER 1

/* Define to 1 if sigpending is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SIGPENDING 1

/* Define to 1 if sigprocmask is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_SIGPROCMASK 1

/* Define to 1 if sinf is declared even after undefining macros. */
#define HAVE_RAW_DECL_SINF 1

/* Define to 1 if sinhf is declared even after undefining macros. */
#define HAVE_RAW_DECL_SINHF 1

/* Define to 1 if sinl is declared even after undefining macros. */
#define HAVE_RAW_DECL_SINL 1

/* Define to 1 if sleep is declared even after undefining macros. */
#define HAVE_RAW_DECL_SLEEP 1

/* Define to 1 if snprintf is declared even after undefining macros. */
#define HAVE_RAW_DECL_SNPRINTF 1

/* Define to 1 if socket is declared even after undefining macros. */
#define HAVE_RAW_DECL_SOCKET 1

/* Define to 1 if sqrtf is declared even after undefining macros. */
#define HAVE_RAW_DECL_SQRTF 1

/* Define to 1 if sqrtl is declared even after undefining macros. */
#define HAVE_RAW_DECL_SQRTL 1

/* Define to 1 if srandom_r is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_SRANDOM_R */

/* Define to 1 if stat is declared even after undefining macros. */
#define HAVE_RAW_DECL_STAT 1

/* Define to 1 if stpcpy is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STPCPY */

/* Define to 1 if stpncpy is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STPNCPY */

/* Define to 1 if strcasecmp is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_STRCASECMP 1

/* Define to 1 if strcasestr is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_STRCASESTR */

/* Define to 1 if strchrnul is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STRCHRNUL */

/* Define to 1 if strdup is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRDUP 1

/* Define to 1 if strerror_r is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_STRERROR_R 1

/* Define to 1 if strncasecmp is declared even after undefining macros. =
*/
#define HAVE_RAW_DECL_STRNCASECMP 1

/* Define to 1 if strncat is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRNCAT 1

/* Define to 1 if strndup is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STRNDUP */

/* Define to 1 if strnlen is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STRNLEN */

/* Define to 1 if strpbrk is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRPBRK 1

/* Define to 1 if strsep is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STRSEP */

/* Define to 1 if strsignal is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_STRSIGNAL */

/* Define to 1 if strtod is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOD 1

/* Define to 1 if strtoimax is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOIMAX 1

/* Define to 1 if strtok_r is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOK_R 1

/* Define to 1 if strtoll is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOLL 1

/* Define to 1 if strtoull is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOULL 1

/* Define to 1 if strtoumax is declared even after undefining macros. */
#define HAVE_RAW_DECL_STRTOUMAX 1

/* Define to 1 if strverscmp is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_STRVERSCMP */

/* Define to 1 if symlink is declared even after undefining macros. */
#define HAVE_RAW_DECL_SYMLINK 1

/* Define to 1 if symlinkat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_SYMLINKAT */

/* Define to 1 if tanf is declared even after undefining macros. */
#define HAVE_RAW_DECL_TANF 1

/* Define to 1 if tanhf is declared even after undefining macros. */
#define HAVE_RAW_DECL_TANHF 1

/* Define to 1 if tanl is declared even after undefining macros. */
#define HAVE_RAW_DECL_TANL 1

/* Define to 1 if tcgetsid is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_TCGETSID */

/* Define to 1 if tmpfile is declared even after undefining macros. */
#define HAVE_RAW_DECL_TMPFILE 1

/* Define to 1 if towctrans is declared even after undefining macros. */
#define HAVE_RAW_DECL_TOWCTRANS 1

/* Define to 1 if trunc is declared even after undefining macros. */
#define HAVE_RAW_DECL_TRUNC 1

/* Define to 1 if truncf is declared even after undefining macros. */
#define HAVE_RAW_DECL_TRUNCF 1

/* Define to 1 if truncl is declared even after undefining macros. */
#define HAVE_RAW_DECL_TRUNCL 1

/* Define to 1 if ttyname_r is declared even after undefining macros. */
#define HAVE_RAW_DECL_TTYNAME_R 1

/* Define to 1 if uname is declared even after undefining macros. */
#define HAVE_RAW_DECL_UNAME 1

/* Define to 1 if unlink is declared even after undefining macros. */
#define HAVE_RAW_DECL_UNLINK 1

/* Define to 1 if unlinkat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_UNLINKAT */

/* Define to 1 if unlockpt is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_UNLOCKPT */

/* Define to 1 if unsetenv is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_UNSETENV */

/* Define to 1 if usleep is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_USLEEP */

/* Define to 1 if utimensat is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_UTIMENSAT */

/* Define to 1 if vdprintf is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_VDPRINTF */

/* Define to 1 if vsnprintf is declared even after undefining macros. */
#define HAVE_RAW_DECL_VSNPRINTF 1

/* Define to 1 if waitpid is declared even after undefining macros. */
#define HAVE_RAW_DECL_WAITPID 1

/* Define to 1 if wcpcpy is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_WCPCPY */

/* Define to 1 if wcpncpy is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_WCPNCPY */

/* Define to 1 if wcrtomb is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCRTOMB 1

/* Define to 1 if wcscasecmp is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_WCSCASECMP */

/* Define to 1 if wcscat is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCAT 1

/* Define to 1 if wcschr is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCHR 1

/* Define to 1 if wcscmp is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCMP 1

/* Define to 1 if wcscoll is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCOLL 1

/* Define to 1 if wcscpy is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCPY 1

/* Define to 1 if wcscspn is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSCSPN 1

/* Define to 1 if wcsdup is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_WCSDUP */

/* Define to 1 if wcslen is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSLEN 1

/* Define to 1 if wcsncasecmp is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_WCSNCASECMP */

/* Define to 1 if wcsncat is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSNCAT 1

/* Define to 1 if wcsncmp is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSNCMP 1

/* Define to 1 if wcsncpy is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSNCPY 1

/* Define to 1 if wcsnlen is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_WCSNLEN */

/* Define to 1 if wcsnrtombs is declared even after undefining macros. =
*/
/* #undef HAVE_RAW_DECL_WCSNRTOMBS */

/* Define to 1 if wcspbrk is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSPBRK 1

/* Define to 1 if wcsrchr is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSRCHR 1

/* Define to 1 if wcsrtombs is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSRTOMBS 1

/* Define to 1 if wcsspn is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSSPN 1

/* Define to 1 if wcsstr is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSSTR 1

/* Define to 1 if wcstok is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSTOK 1

/* Define to 1 if wcswidth is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSWIDTH 1

/* Define to 1 if wcsxfrm is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCSXFRM 1

/* Define to 1 if wctob is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCTOB 1

/* Define to 1 if wctrans is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCTRANS 1

/* Define to 1 if wctype is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCTYPE 1

/* Define to 1 if wcwidth is declared even after undefining macros. */
#define HAVE_RAW_DECL_WCWIDTH 1

/* Define to 1 if wmemchr is declared even after undefining macros. */
#define HAVE_RAW_DECL_WMEMCHR 1

/* Define to 1 if wmemcmp is declared even after undefining macros. */
#define HAVE_RAW_DECL_WMEMCMP 1

/* Define to 1 if wmemcpy is declared even after undefining macros. */
#define HAVE_RAW_DECL_WMEMCPY 1

/* Define to 1 if wmemmove is declared even after undefining macros. */
#define HAVE_RAW_DECL_WMEMMOVE 1

/* Define to 1 if wmemset is declared even after undefining macros. */
#define HAVE_RAW_DECL_WMEMSET 1

/* Define to 1 if _Exit is declared even after undefining macros. */
#define HAVE_RAW_DECL__EXIT 1

/* Define to 1 if you have the `readdir' function. */
#define HAVE_READDIR 1

/* Define to 1 if you have the `readlink' function. */
#define HAVE_READLINK 1

/* Define to 1 if you have the `readlinkat' function. */
/* #undef HAVE_READLINKAT */

/* Define to 1 if your system has a GNU libc compatible 'realloc' =
function,
   and to 0 otherwise. */
#define HAVE_REALLOC_GNU 0

/* Define if the 'realloc' function is POSIX compliant. */
#define HAVE_REALLOC_POSIX 1

/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1

/* Define to 1 if you have the `rpmatch' function. */
#define HAVE_RPMATCH 1

/* Define to 1 if you have run the test for working tzset. */
#define HAVE_RUN_TZSET_TEST 1

/* Define to 1 if 'long double' and 'double' have the same =
representation. */
#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1

/* Define to 1 if the system has the type `sa_family_t'. */
#define HAVE_SA_FAMILY_T 1

/* Define to 1 if you have the `sched_getaffinity' function. */
/* #undef HAVE_SCHED_GETAFFINITY */

/* Define to 1 if sched_getaffinity has a glibc compatible declaration. =
*/
/* #undef HAVE_SCHED_GETAFFINITY_LIKE_GLIBC */

/* Define to 1 if you have the `sched_getaffinity_np' function. */
/* #undef HAVE_SCHED_GETAFFINITY_NP */

/* Define to 1 if you have the <sched.h> header file. */
#define HAVE_SCHED_H 1

/* Define to 1 if you have the <search.h> header file. */
#define HAVE_SEARCH_H 1

/* Define to 1 if you have the <selinux/context.h> header file. */
/* #undef HAVE_SELINUX_CONTEXT_H */

/* Define to 1 if you have the <selinux/flask.h> header file. */
/* #undef HAVE_SELINUX_FLASK_H */

/* Define to 1 if you have the <selinux/selinux.h> header file. */
/* #undef HAVE_SELINUX_SELINUX_H */

/* Define to 1 if you have the `setenv' function. */
/* #undef HAVE_SETENV */

/* Define to 1 if you have the `setgroups' function. */
#define HAVE_SETGROUPS 1

/* Define to 1 if you have the `sethostname' function. */
/* #undef HAVE_SETHOSTNAME */

/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1

/* Define to 1 if you have the `setrlimit' function. */
/* #undef HAVE_SETRLIMIT */

/* Define to 1 if you have the `settimeofday' function. */
/* #undef HAVE_SETTIMEOFDAY */

/* Define to 1 if you have the <shadow.h> header file. */
/* #undef HAVE_SHADOW_H */

/* Define to 1 if you have the `shutdown' function. */
#define HAVE_SHUTDOWN 1

/* Define to 1 if you have the `sig2str' function. */
/* #undef HAVE_SIG2STR */

/* Define to 1 if you have the `sigaction' function. */
#define HAVE_SIGACTION 1

/* Define to 1 if you have the `sigaltstack' function. */
#define HAVE_SIGALTSTACK 1

/* Define to 1 if the system has the type `siginfo_t'. */
/* #undef HAVE_SIGINFO_T */

/* Define to 1 if you have the `siginterrupt' function. */
/* #undef HAVE_SIGINTERRUPT */

/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
#define HAVE_SIGNED_SIG_ATOMIC_T 1

/* Define to 1 if 'wchar_t' is a signed integer type. */
/* #undef HAVE_SIGNED_WCHAR_T */

/* Define to 1 if 'wint_t' is a signed integer type. */
#define HAVE_SIGNED_WINT_T 1

/* Define to 1 if the system has the type `sigset_t'. */
#define HAVE_SIGSET_T 1

/* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1

/* Define if the return value of the snprintf function is the number of =
of
   bytes (excluding the terminating NUL) that would have been produced =
if the
   buffer had been large enough. */
#define HAVE_SNPRINTF_RETVAL_C99 1

/* Define to 1 if you have the `statacl' function. */
/* #undef HAVE_STATACL */

/* Define to 1 if you have the `statvfs' function. */
/* #undef HAVE_STATVFS */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and =
declares
   uintmax_t. */
#define HAVE_STDINT_H_WITH_UINTMAX 1

/* Define to 1 if you have the <stdio_ext.h> header file. */
/* #undef HAVE_STDIO_EXT_H */

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `stime' function. */
/* #undef HAVE_STIME */

/* Define to 1 if you have the `stpcpy' function. */
/* #undef HAVE_STPCPY */

/* Define if you have the stpncpy() function and it works. */
/* #undef HAVE_STPNCPY */

/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1

/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */

/* Define to 1 if you have the `strnlen' function. */
/* #undef HAVE_STRNLEN */

/* Define to 1 if you have the <stropts.h> header file. */
#define HAVE_STROPTS_H 1

/* Define to 1 if you have the `strsignal' function. */
/* #undef HAVE_STRSIGNAL */

/* Define to 1 if you have the `strtod_l' function. */
/* #undef HAVE_STRTOD_L */

/* Define to 1 if you have the `strtof' function. */
#define HAVE_STRTOF 1

/* Define to 1 if you have the `strtoimax' function. */
#define HAVE_STRTOIMAX 1

/* Define to 1 if you have the `strtold_l' function. */
/* #undef HAVE_STRTOLD_L */

/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1

/* Define to 1 if you have the `strtoull' function. */
#define HAVE_STRTOULL 1

/* Define to 1 if you have the `strtoumax' function. */
#define HAVE_STRTOUMAX 1

/* Define to 1 if the system has the type `struct addrinfo'. */
#define HAVE_STRUCT_ADDRINFO 1

/* Define if there is a member named d_type in the struct describing =
directory
   headers. */
/* #undef HAVE_STRUCT_DIRENT_D_TYPE */

/* Define to 1 if `f_fstypename' is a member of `struct fsstat'. */
/* #undef HAVE_STRUCT_FSSTAT_F_FSTYPENAME */

/* Define to 1 if `n_un.n_name' is a member of `struct nlist'. */
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */

/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */
/* #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION */

/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */

/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#define HAVE_STRUCT_SOCKADDR_STORAGE 1

/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. =
*/
/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY */

/* Define to 1 if `sp_pwdp' is a member of `struct spwd'. */
/* #undef HAVE_STRUCT_SPWD_SP_PWDP */

/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */

/* Define to 1 if `f_namelen' is a member of `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS_F_NAMELEN */

/* Define to 1 if `f_type' is a member of `struct statfs'. */
/* #undef HAVE_STRUCT_STATFS_F_TYPE */

/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */
#define HAVE_STRUCT_STATVFS_F_BASETYPE 1

/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */
/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */

/* Define to 1 if `f_namemax' is a member of `struct statvfs'. */
#define HAVE_STRUCT_STATVFS_F_NAMEMAX 1

/* Define to 1 if `f_type' is a member of `struct statvfs'. */
/* #undef HAVE_STRUCT_STATVFS_F_TYPE */

/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */

/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. =
*/
/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */

/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct =
stat'. */
/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */

/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */

/* Define to 1 if `st_author' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_AUTHOR */

/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC */

/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct =
stat'. */
/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC */

/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC */

/* Define to 1 if `st_blocks' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */

/* Define to 1 if `tm_zone' is a member of `struct tm'. */
/* #undef HAVE_STRUCT_TM_TM_ZONE */

/* Define if struct utimbuf is declared -- usually in <utime.h>. Some =
systems
   have utime.h but don't declare the struct anywhere. */
#define HAVE_STRUCT_UTIMBUF 1

/* Define to 1 if `ut_exit' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_EXIT */

/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_EXIT */

/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmpx'. =
*/
/* #undef HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION */

/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_EXIT */

/* Define to 1 if `ut_exit.ut_termination' is a member of `struct =
utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_EXIT_UT_TERMINATION */

/* Define to 1 if `ut_id' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_ID */

/* Define to 1 if `ut_name' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_NAME */

/* Define to 1 if `ut_pid' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_PID */

/* Define to 1 if `ut_type' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_TYPE */

/* Define to 1 if `ut_user' is a member of `struct utmpx'. */
/* #undef HAVE_STRUCT_UTMPX_UT_USER */

/* Define to 1 if `ut_exit' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_EXIT */

/* Define to 1 if `ut_exit.e_exit' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_EXIT_E_EXIT */

/* Define to 1 if `ut_exit.e_termination' is a member of `struct utmp'. =
*/
/* #undef HAVE_STRUCT_UTMP_UT_EXIT_E_TERMINATION */

/* Define to 1 if `ut_exit.ut_exit' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_EXIT */

/* Define to 1 if `ut_exit.ut_termination' is a member of `struct utmp'. =
*/
/* #undef HAVE_STRUCT_UTMP_UT_EXIT_UT_TERMINATION */

/* Define to 1 if `ut_id' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_ID */

/* Define to 1 if `ut_name' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_NAME */

/* Define to 1 if `ut_pid' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_PID */

/* Define to 1 if `ut_type' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_TYPE */

/* Define to 1 if `ut_user' is a member of `struct utmp'. */
/* #undef HAVE_STRUCT_UTMP_UT_USER */

/* Define to 1 if the system has the type `struct utsname'. */
#define HAVE_STRUCT_UTSNAME 1

/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
   `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
/* #undef HAVE_ST_BLOCKS */

/* Define if struct stat has an st_dm_mode member. */
/* #undef HAVE_ST_DM_MODE */

/* Define to 1 if you have the `symlink' function. */
#define HAVE_SYMLINK 1

/* Define to 1 if you have the `symlinkat' function. */
/* #undef HAVE_SYMLINKAT */

/* Define to 1 if you have the `sync' function. */
/* #undef HAVE_SYNC */

/* Define to 1 if you have the `sysctl' function. */
/* #undef HAVE_SYSCTL */

/* Define to 1 if you have the `sysinfo' function. */
/* #undef HAVE_SYSINFO */

/* FIXME */
#define HAVE_SYSLOG 1

/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1

/* Define to 1 if you have the `sysmp' function. */
/* #undef HAVE_SYSMP */

/* Define to 1 if you have the <sys/acl.h> header file. */
#define HAVE_SYS_ACL_H 1

/* Define to 1 if you have the <sys/bitypes.h> header file. */
/* #undef HAVE_SYS_BITYPES_H */

/* Define to 1 if you have the <sys/filsys.h> header file. */
/* #undef HAVE_SYS_FILSYS_H */

/* Define to 1 if you have the <sys/fs/s5param.h> header file. */
/* #undef HAVE_SYS_FS_S5PARAM_H */

/* Define to 1 if you have the <sys/fs_types.h> header file. */
/* #undef HAVE_SYS_FS_TYPES_H */

/* Define to 1 if you have the <sys/inttypes.h> header file. */
/* #undef HAVE_SYS_INTTYPES_H */

/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H 1

/* Define to 1 if you have the <sys/loadavg.h> header file. */
/* #undef HAVE_SYS_LOADAVG_H */

/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef HAVE_SYS_MMAN_H */

/* Define to 1 if you have the <sys/mntent.h> header file. */
/* #undef HAVE_SYS_MNTENT_H */

/* Define to 1 if you have the <sys/mount.h> header file. */
/* #undef HAVE_SYS_MOUNT_H */

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/pstat.h> header file. */
/* #undef HAVE_SYS_PSTAT_H */

/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1

/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef HAVE_SYS_SELECT_H */

/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1

/* Define to 1 if you have the <sys/statfs.h> header file. */
/* #undef HAVE_SYS_STATFS_H */

/* Define to 1 if you have the <sys/statvfs.h> header file. */
#define HAVE_SYS_STATVFS_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* #undef HAVE_SYS_SYSCTL_H */

/* Define to 1 if you have the <sys/sysinfo.h> header file. */
/* #undef HAVE_SYS_SYSINFO_H */

/* Define to 1 if you have the <sys/sysmp.h> header file. */
/* #undef HAVE_SYS_SYSMP_H */

/* Define to 1 if you have the <sys/systemcfg.h> header file. */
/* #undef HAVE_SYS_SYSTEMCFG_H */

/* Define to 1 if you have the <sys/systeminfo.h> header file. */
/* #undef HAVE_SYS_SYSTEMINFO_H */

/* Define to 1 if you have the <sys/table.h> header file. */
/* #undef HAVE_SYS_TABLE_H */

/* Define to 1 if you have the <sys/timeb.h> header file. */
/* #undef HAVE_SYS_TIMEB_H */

/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <sys/ucred.h> header file. */
/* #undef HAVE_SYS_UCRED_H */

/* Define to 1 if you have the <sys/uio.h> header file. */
#define HAVE_SYS_UIO_H 1

/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1

/* Define to 1 if you have the <sys/vfs.h> header file. */
/* #undef HAVE_SYS_VFS_H */

/* Define to 1 if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1

/* Define to 1 if you have the `table' function. */
/* #undef HAVE_TABLE */

/* Define to 1 if you have the `tcgetattr' function. */
#define HAVE_TCGETATTR 1

/* Define to 1 if you have the `tcgetpgrp' function. */
#define HAVE_TCGETPGRP 1

/* Define to 1 if you have the `tcsetattr' function. */
#define HAVE_TCSETATTR 1

/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1

/* Define to 1 if you have the `timer_settime' function. */
/* #undef HAVE_TIMER_SETTIME */

/* Define if struct tm has the tm_gmtoff member. */
/* #undef HAVE_TM_GMTOFF */

/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
   `HAVE_STRUCT_TM_TM_ZONE' instead. */
/* #undef HAVE_TM_ZONE */

/* Define to 1 if you have the `towlower' function. */
#define HAVE_TOWLOWER 1

/* Define to 1 if you have the `tsearch' function. */
#define HAVE_TSEARCH 1

/* Define to 1 if you don't have `tm_zone' but do have the external =
array
   `tzname'. */
#define HAVE_TZNAME 1

/* Define to 1 if you have the `tzset' function. */
#define HAVE_TZSET 1

/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `unlinkat' function. */
/* #undef HAVE_UNLINKAT */

/* Define to 1 if you have the `unsetenv' function. */
/* #undef HAVE_UNSETENV */

/* Define to 1 if the system has the type `unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1

/* Define to 1 if you have the `uselocale' function. */
/* #undef HAVE_USELOCALE */

/* Define to 1 if you have the `usleep' function. */
/* #undef HAVE_USLEEP */

/* Define to 1 if you have the `utimensat' function. */
/* #undef HAVE_UTIMENSAT */

/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1

/* Define to 1 if you have the `utmpname' function. */
/* #undef HAVE_UTMPNAME */

/* Define to 1 if you have the `utmpxname' function. */
/* #undef HAVE_UTMPXNAME */

/* Define to 1 if you have the <utmpx.h> header file. */
/* #undef HAVE_UTMPX_H */

/* Define to 1 if you have the <utmp.h> header file. */
/* #undef HAVE_UTMP_H */

/* FIXME */
/* #undef HAVE_UT_HOST */

/* Define to 1 if you have the `vasnprintf' function. */
/* #undef HAVE_VASNPRINTF */

/* Define to 1 if you have the `vasprintf' function. */
/* #undef HAVE_VASPRINTF */

/* Define to 1 if you have the `vfork' function. */
/* #undef HAVE_VFORK */

/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */

/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1

/* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1

/* Define to 1 if you have the `wcrtomb' function. */
#define HAVE_WCRTOMB 1

/* Define to 1 if you have the `wcscoll' function. */
#define HAVE_WCSCOLL 1

/* Define to 1 if you have the `wcslen' function. */
#define HAVE_WCSLEN 1

/* Define to 1 if you have the `wcsnlen' function. */
/* #undef HAVE_WCSNLEN */

/* Define to 1 if you have the `wcswidth' function. */
#define HAVE_WCSWIDTH 1

/* Define to 1 if you have the `wctob' function. */
#define HAVE_WCTOB 1

/* Define to 1 if you have the <wctype.h> header file. */
#define HAVE_WCTYPE_H 1

/* Define to 1 if you have the `wcwidth' function. */
#define HAVE_WCWIDTH 1

/* Define to 1 if you have the <winsock2.h> header file. */
/* #undef HAVE_WINSOCK2_H */

/* Define if you have the 'wint_t' type. */
#define HAVE_WINT_T 1

/* Define to 1 if you have the `wmemchr' function. */
#define HAVE_WMEMCHR 1

/* Define to 1 if you have the `wmemcpy' function. */
#define HAVE_WMEMCPY 1

/* Define to 1 if you have the `wmempcpy' function. */
/* #undef HAVE_WMEMPCPY */

/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1

/* Define to 1 if O_NOATIME works. */
#define HAVE_WORKING_O_NOATIME 0

/* Define to 1 if O_NOFOLLOW works. */
#define HAVE_WORKING_O_NOFOLLOW 0

/* Define if utimes works properly. */
/* #undef HAVE_WORKING_UTIMES */

/* Define to 1 if `vfork' works. */
/* #undef HAVE_WORKING_VFORK */

/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */

/* Define to 1 if you have the <xlocale.h> header file. */
/* #undef HAVE_XLOCALE_H */

/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1

/* Define to 1 if you have the `_ftime' function. */
/* #undef HAVE__FTIME */

/* Define to 1 if you have the `_set_invalid_parameter_handler' =
function. */
/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */

/* Define to 1 if you have the external variable, _system_configuration =
with a
   member named physmem. */
/* #undef HAVE__SYSTEM_CONFIGURATION */

/* Define to 1 if you have the `__fpending' function. */
/* #undef HAVE___FPENDING */

/* Define to 1 if you have the `__fpurge' function. */
/* #undef HAVE___FPURGE */

/* Define to 1 if you have the `__freading' function. */
/* #undef HAVE___FREADING */

/* Define to 1 if you have the `__fsetlocking' function. */
/* #undef HAVE___FSETLOCKING */

/* Define to 1 if you have the `__xpg_strerror_r' function. */
/* #undef HAVE___XPG_STRERROR_R */

/* Define HOST_NAME_MAX when <limits.h> does not define it. */
#define HOST_NAME_MAX 256

/* The host operating system. */
#define HOST_OPERATING_SYSTEM "NonStop Kernel"

/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST const

/* Define to a symbolic name denoting the flavor of iconv_open()
   implementation. */
/* #undef ICONV_FLAVOR */

/* Define as the bit index in the word where to find bit 0 of the =
exponent of
   'long double'. */
#define LDBL_EXPBIT0_BIT 20

/* Define as the word index where to find the exponent of 'long double'. =
*/
#define LDBL_EXPBIT0_WORD 0

/* Define as the bit index in the word where to find the sign of 'long
   double'. */
/* #undef LDBL_SIGNBIT_BIT */

/* Define as the word index where to find the sign of 'long double'. */
/* #undef LDBL_SIGNBIT_WORD */

/* Define to 1 if linkat fails to recognize a trailing slash. */
/* #undef LINKAT_TRAILING_SLASH_BUG */

/* Define to 1 if `link(2)' dereferences symbolic links, 0 if it creates =
hard
   links to symlinks, -1 if it depends on the variable __xpg4, and -2 if
   unknown. */
#define LINK_FOLLOWS_SYMLINKS 1

/* FIXME */
/* #undef LOCALTIME_CACHE */

/* Define to 1 if lseek does not detect pipes. */
/* #undef LSEEK_PIPE_BROKEN */

/* Define to 1 if `lstat' dereferences a symlink specified with a =
trailing
   slash. */
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1

/* Define to 1 if `major', `minor', and `makedev' are declared in =
<mkdev.h>.
   */
/* #undef MAJOR_IN_MKDEV */

/* Define to 1 if `major', `minor', and `makedev' are declared in
   <sysmacros.h>. */
/* #undef MAJOR_IN_SYSMACROS */

/* If malloc(0) is !=3D NULL, define this to 1. Otherwise define this to =
0. */
#define MALLOC_0_IS_NONNULL 0

/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
/* #undef MAP_ANONYMOUS */

/* Define if the mbrtowc function has the NULL pwc argument bug. */
/* #undef MBRTOWC_NULL_ARG1_BUG */

/* Define if the mbrtowc function has the NULL string argument bug. */
/* #undef MBRTOWC_NULL_ARG2_BUG */

/* Define if the mbrtowc function does not return 0 for a NUL character. =
*/
/* #undef MBRTOWC_NUL_RETVAL_BUG */

/* Define if the mbrtowc function returns a wrong return value. */
/* #undef MBRTOWC_RETVAL_BUG */

/* Define if there is no specific function for reading the list of =
mounted
   file systems. fread will be used to read /etc/mnttab. (SVR2) */
/* #undef MOUNTED_FREAD */

/* Define if (like SVR2) there is no specific function for reading the =
list of
   mounted file systems, and your system has these header files: =
<sys/fstyp.h>
   and <sys/statfs.h>. (SVR3) */
/* #undef MOUNTED_FREAD_FSTYP */

/* Define if there are functions named next_dev and fs_stat_dev for =
reading
   the list of mounted file systems. (BeOS) */
/* #undef MOUNTED_FS_STAT_DEV */

/* Define if there is a function named getfsstat for reading the list of
   mounted file systems. (DEC Alpha running OSF/1) */
/* #undef MOUNTED_GETFSSTAT */

/* Define if there is a function named getmnt for reading the list of =
mounted
   file systems. (Ultrix) */
/* #undef MOUNTED_GETMNT */

/* Define if there is a function named getmntent for reading the list of
   mounted file systems, and that function takes a single argument. =
(4.3BSD,
   SunOS, HP-UX, Dynix, Irix) */
#define MOUNTED_GETMNTENT1 1

/* Define if there is a function named getmntent for reading the list of
   mounted file systems, and that function takes two arguments. (SVR4) =
*/
/* #undef MOUNTED_GETMNTENT2 */

/* Define if there is a function named getmntinfo for reading the list =
of
   mounted file systems and it returns an array of 'struct statfs'. =
(4.4BSD,
   Darwin) */
/* #undef MOUNTED_GETMNTINFO */

/* Define if there is a function named getmntinfo for reading the list =
of
   mounted file systems and it returns an array of 'struct statvfs'. =
(NetBSD
   3.0) */
/* #undef MOUNTED_GETMNTINFO2 */

/* Define if we are on interix, and ought to use statvfs plus some =
special
   knowledge on where mounted filesystems can be found. (Interix) */
/* #undef MOUNTED_INTERIX_STATVFS */

/* Define if there is a function named listmntent that can be used to =
list all
   mounted file systems. (UNICOS) */
/* #undef MOUNTED_LISTMNTENT */

/* Define if there is a function named mntctl that can be used to read =
the
   list of mounted file systems, and there is a system header file that
   declares `struct vmount.' (AIX) */
/* #undef MOUNTED_VMOUNT */

/* Define to 1 if assertions should be disabled. */
/* #undef NDEBUG */

/* Define if the vasnprintf implementation needs special code for the =
'a' and
   'A' directives. */
#define NEED_PRINTF_DIRECTIVE_A 1

/* Define if the vasnprintf implementation needs special code for the =
'F'
   directive. */
/* #undef NEED_PRINTF_DIRECTIVE_F */

/* Define if the vasnprintf implementation needs special code for the =
'ls'
   directive. */
/* #undef NEED_PRINTF_DIRECTIVE_LS */

/* Define if the vasnprintf implementation needs special code for =
'double'
   arguments. */
#define NEED_PRINTF_DOUBLE 1

/* Define if the vasnprintf implementation needs special code for =
surviving
   out-of-memory conditions. */
#define NEED_PRINTF_ENOMEM 1

/* Define if the vasnprintf implementation needs special code for the ' =
flag.
   */
/* #undef NEED_PRINTF_FLAG_GROUPING */

/* Define if the vasnprintf implementation needs special code for the =
'-'
   flag. */
/* #undef NEED_PRINTF_FLAG_LEFTADJUST */

/* Define if the vasnprintf implementation needs special code for the 0 =
flag.
   */
#define NEED_PRINTF_FLAG_ZERO 1

/* Define if the vasnprintf implementation needs special code for =
infinite
   'double' arguments. */
#define NEED_PRINTF_INFINITE_DOUBLE 1

/* Define if the vasnprintf implementation needs special code for =
infinite
   'long double' arguments. */
#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1

/* Define if the vasnprintf implementation needs special code for 'long
   double' arguments. */
#define NEED_PRINTF_LONG_DOUBLE 1

/* Define if the vasnprintf implementation needs special code for =
supporting
   large precisions without arbitrary bounds. */
#define NEED_PRINTF_UNBOUNDED_PRECISION 1

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */

/* Define to 1 if the nlist n_name member is a pointer */
#define N_NAME_POINTER 1

/* Define to 1 if open() fails to recognize a trailing slash. */
/* #undef OPEN_TRAILING_SLASH_BUG */

/* Name of package */
#define PACKAGE "coreutils"

/* Define to the address where bug reports for this package should be =
sent. */
#define PACKAGE_BUGREPORT "bug-coreutils@HIDDEN"

/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU coreutils"

/* String identifying the packager of this software */
/* #undef PACKAGE_PACKAGER */

/* Packager info for bug reports (URL/e-mail/...) */
/* #undef PACKAGE_PACKAGER_BUG_REPORTS */

/* Packager-specific version information */
/* #undef PACKAGE_PACKAGER_VERSION */

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU coreutils 8.14"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "coreutils"

/* Define to the home page for this package. */
#define PACKAGE_URL "http://www.gnu.org/software/coreutils/"

/* Define to the version of this package. */
#define PACKAGE_VERSION "8.14"

/* the number of pending output bytes on stream `fp' */
#define PENDING_OUTPUT_N_BYTES fp->_ptr - fp->_base

/* Define to the maximum link count that a true pipe can have. */
#define PIPE_LINK_COUNT_MAX (-1)

/* Define this if you prefer euidaccess to return the correct result =
even if
   this would make it nonreentrant. Define this only if your entire
   application is safe even if the uid or gid might temporarily change. =
If
   your application uses signal handlers or threads it is probably not =
safe.
   */
#define PREFER_NONREENTRANT_EUIDACCESS 1

/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
/* #undef PRI_MACROS_BROKEN */

/* Define to the type that is the result of default argument promotions =
of
   type mode_t. */
#define PROMOTED_MODE_T mode_t

/* Define if the pthread_in_use() detection is hard. */
/* #undef PTHREAD_IN_USE_DETECTION_HARD */

/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
   'ptrdiff_t'. */
#define PTRDIFF_T_SUFFIX l

/* Define to 1 if readlink fails to recognize a trailing slash. */
/* #undef READLINK_TRAILING_SLASH_BUG */

/* Define if rename does not work when the destination file exists, as =
on
   Cygwin 1.5 or Windows. */
/* #undef RENAME_DEST_EXISTS_BUG */

/* Define if rename fails to leave hard links alone, as on NetBSD 1.6 or
   Cygwin 1.5. */
/* #undef RENAME_HARD_LINK_BUG */

/* Define if rename does not correctly handle slashes on the destination
   argument, such as on Solaris 10 or NetBSD 1.6. */
#define RENAME_TRAILING_SLASH_DEST_BUG 1

/* Define if rename does not correctly handle slashes on the source =
argument,
   such as on Solaris 9 or cygwin 1.5. */
/* #undef RENAME_TRAILING_SLASH_SOURCE_BUG */

/* Define to 1 if gnulib's fchdir() replacement is used. */
#define REPLACE_FCHDIR 1

/* Define to 1 if stat needs help when passed a directory name with a =
trailing
   slash */
/* #undef REPLACE_FUNC_STAT_DIR */

/* Define to 1 if stat needs help when passed a file name with a =
trailing
   slash */
/* #undef REPLACE_FUNC_STAT_FILE */

/* Define if nl_langinfo exists but is overridden by gnulib. */
#define REPLACE_NL_LANGINFO 1

/* Define to 1 if open() should work around the inability to open a =
directory.
   */
/* #undef REPLACE_OPEN_DIRECTORY */

/* Define to 1 if strerror(0) does not return a message implying =
success. */
/* #undef REPLACE_STRERROR_0 */

/* Define if vasnprintf exists but is overridden by gnulib. */
/* #undef REPLACE_VASNPRINTF */

/* Define if vfprintf is overridden by a POSIX compliant gnulib
   implementation. */
#define REPLACE_VFPRINTF_POSIX 1

/* Define if vprintf is overridden by a POSIX compliant gnulib =
implementation.
   */
#define REPLACE_VPRINTF_POSIX 1

/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
   'sig_atomic_t'. */
#define SIG_ATOMIC_T_SUFFIX=20

/* Define as the maximum value of type 'size_t', if the system doesn't =
define
   it. */
#ifndef SIZE_MAX
/* # undef SIZE_MAX */
#endif

/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
   'size_t'. */
#define SIZE_T_SUFFIX u

/* If using the C implementation of alloca, define if you know the
   direction of stack growth for your system; otherwise it will be
   automatically deduced at runtime.
        STACK_DIRECTION > 0 =3D> grows toward higher addresses
        STACK_DIRECTION < 0 =3D> grows toward lower addresses
        STACK_DIRECTION =3D 0 =3D> direction of growth unknown */
#define STACK_DIRECTION -1

/* Define if the block counts reported by statfs may be truncated to 2GB =
and
   the correct values may be stored in the f_spare array. (SunOS 4.1.2, =
4.1.3,
   and 4.1.3_U1 are reported to have this problem. SunOS 4.1.1 seems not =
to be
   affected.) */
/* #undef STATFS_TRUNCATES_BLOCK_COUNTS */

/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work =
properly. */
/* #undef STAT_MACROS_BROKEN */

/* Define if there is no specific function for reading file systems =
usage
   information and you have the <sys/filsys.h> header file. (SVR2) */
/* #undef STAT_READ_FILSYS */

/* Define if statfs takes 2 args and struct statfs has a field named =
f_bsize.
   (4.3BSD, SunOS 4, HP-UX, AIX PS/2) */
/* #undef STAT_STATFS2_BSIZE */

/* Define if statfs takes 2 args and struct statfs has a field named =
f_fsize.
   (4.4BSD, NetBSD) */
/* #undef STAT_STATFS2_FSIZE */

/* Define if statfs takes 2 args and the second argument has type struct
   fs_data. (Ultrix) */
/* #undef STAT_STATFS2_FS_DATA */

/* Define if statfs takes 3 args. (DEC Alpha running OSF/1) */
/* #undef STAT_STATFS3_OSF1 */

/* Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, =
Dolphin) */
/* #undef STAT_STATFS4 */

/* Define if there is a function named statvfs. (SVR4) */
#define STAT_STATVFS 1

/* Define if statvfs64 should be preferred over statvfs. */
/* #undef STAT_STATVFS64 */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if strerror_r returns char *. */
/* #undef STRERROR_R_CHAR_P */

/* Define to 1 if the f_fsid member of struct statfs is an integer. */
/* #undef STRUCT_STATFS_F_FSID_IS_INTEGER */

/* Define to 1 if the f_fsid member of struct statvfs is an integer. */
/* #undef STRUCT_STATVFS_F_FSID_IS_INTEGER */

/* Define to 1 on System V Release 4. */
/* #undef SVR4 */

/* FIXME */
/* #undef TERMIOS_NEEDS_XOPEN_SOURCE */

/* Define to 1 if all 'time_t' values fit in a 'long int'. */
#define TIME_T_FITS_IN_LONG_INT 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. =
*/
#define TIME_WITH_SYS_TIME 1

/* Define to 1 if your <sys/time.h> declares `struct tm'. */
/* #undef TM_IN_SYS_TIME */

/* group used by system for TTYs */
/* #undef TTY_GROUP_NAME */

/* Define to 1 if the type of the st_atim member of a struct stat is =
struct
   timespec. */
/* #undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC */

/* Define if tzset clobbers localtime's static buffer. */
/* #undef TZSET_CLOBBERS_LOCALTIME */

/* Define to 1 for Encore UMAX. */
/* #undef UMAX */

/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> =
instead of
   <sys/cpustats.h>. */
/* #undef UMAX4_3 */

/* Define to 1 if unlink (dir) cannot possibly succeed. */
/* #undef UNLINK_CANNOT_UNLINK_DIR */

/* Define to 1 if unlink() on a parent directory may succeed */
/* #undef UNLINK_PARENT_BUG */

/* Define to nonzero if you want access control list support. */
#define USE_ACL 1

/* Define if the POSIX multithreading library can be used. */
/* #undef USE_POSIX_THREADS */

/* Define if references to the POSIX multithreading library should be =
made
   weak. */
/* #undef USE_POSIX_THREADS_WEAK */

/* Define if the GNU Pth multithreading library can be used. */
/* #undef USE_PTH_THREADS */

/* Define if references to the GNU Pth multithreading library should be =
made
   weak. */
/* #undef USE_PTH_THREADS_WEAK */

/* Define if the old Solaris multithreading library can be used. */
/* #undef USE_SOLARIS_THREADS */

/* Define if references to the old Solaris multithreading library should =
be
   made weak. */
/* #undef USE_SOLARIS_THREADS_WEAK */

/* Define to 1 if you want getc etc. to use unlocked I/O if available.
   Unlocked I/O can improve performance in unithreaded apps, but it is =
not
   safe for multithreaded apps. */
#define USE_UNLOCKED_IO 1

/* Define if the Win32 multithreading API can be used. */
/* #undef USE_WIN32_THREADS */

/* Define if you want extended attribute support. */
#define USE_XATTR 0

/* Version number of package */
#define VERSION "8.14"

/* Define to 1 if unsetenv returns void instead of int. */
/* #undef VOID_UNSETENV */

/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
   'wchar_t'. */
#define WCHAR_T_SUFFIX=20

/* Define if WSAStartup is needed. */
/* #undef WINDOWS_SOCKETS */

/* Define if sys/ptem.h is required for struct winsize. */
/* #undef WINSIZE_IN_PTEM */

/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
   'wint_t'. */
#define WINT_T_SUFFIX=20

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the =
most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
#  define WORDS_BIGENDIAN 1
# endif
#endif

/* Enable large inode numbers on Mac OS X.  */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

/* enable compile-time and run-time bounds-checking, and some warnings =
*/
/* #undef _FORTIFY_SOURCE */

/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */

/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

/* Define to 1 if on MINIX. */
/* #undef _MINIX */

/* The _Noreturn keyword of draft C1X.  */
#ifndef _Noreturn
# if (3 <=3D __GNUC__ || (__GNUC__ =3D=3D 2 && 8 <=3D __GNUC_MINOR__) \
      || 0x5110 <=3D __SUNPRO_C)
#  define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <=3D _MSC_VER
#  define _Noreturn __declspec (noreturn)
# else
#  define _Noreturn
# endif
#endif


/* Define to 2 if the system does not provide POSIX.1 features except =
with
   this defined. */
/* #undef _POSIX_1_SOURCE */

/* Define to 1 in order to get the POSIX compatible declarations of =
socket
   functions. */
/* #undef _POSIX_PII_SOCKET */

/* Define to 1 if you need to in order for `stat' and other things to =
work. */
/* #undef _POSIX_SOURCE */

/* Define if you want regoff_t to be at least as wide POSIX requires. */
#define _REGEX_LARGE_OFFSETS 1

/* Define to 500 only on HP-UX. */
/* #undef _XOPEN_SOURCE */

/* Enable extensions on AIX 3, Interix.  */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable general extensions on MacOS X.  */
#ifndef _DARWIN_C_SOURCE
# define _DARWIN_C_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris.  */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop.  */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris.  */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif


/* Define to rpl_ if the getopt replacement functions and variables =
should be
   used. */
#define __GETOPT_PREFIX rpl_

/* Ensure that <stdint.h> defines the limit macros, since gnulib's
   <inttypes.h> relies on them.  */
#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && =
GL_TRIGGER_STDC_LIMIT_MACROS
# define __STDC_LIMIT_MACROS 1
#endif


/* Always use our fgetfilecon wrapper. */
/* #undef fgetfilecon */

/* Define to a replacement function name for fnmatch(). */
#define fnmatch gnu_fnmatch

/* Always use our getfilecon wrapper. */
/* #undef getfilecon */

/* Define to a replacement function name for getpass(). */
#define getpass gnu_getpass

/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */

/* A replacement for va_copy, if needed.  */
#define gl_va_copy(a,b) ((a) =3D (b))

/* Define to rpl_gmtime if the replacement function should be used. */
/* #undef gmtime */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  =
*/
#ifndef __cplusplus
/* #undef inline */
#endif

/* Define to `unsigned long int' if <sys/types.h> does not define. */
/* #undef ino_t */

/* Define to long or long long if <stdint.h> and <inttypes.h> don't =
define. */
/* #undef intmax_t */

/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it =
supports
   the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics =
of
   earlier versions), but does not display it by setting =
__GNUC_STDC_INLINE__.
   __APPLE__ && __MACH__ test for MacOS X.
   __APPLE_CC__ tests for the Apple compiler and its version.
   __STDC_VERSION__ tests for the C99 mode.  */
#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >=3D 5465 && =
!defined __cplusplus && __STDC_VERSION__ >=3D 199901L && !defined =
__GNUC_STDC_INLINE__
# define __GNUC_STDC_INLINE__ 1
#endif

/* Always use our lgetfilecon wrapper. */
/* #undef lgetfilecon */

/* Define to 1 if the compiler is checking for lint. */
/* #undef lint */

/* Define to rpl_localtime if the replacement function should be used. =
*/
/* #undef localtime */

/* Define to `unsigned int' if <sys/types.h> does not define. */
#define major_t unsigned int

/* Define to a type if <wchar.h> does not define. */
/* #undef mbstate_t */

/* Define to `unsigned int' if <sys/types.h> does not define. */
#define minor_t unsigned int

/* Define to `int' if <sys/types.h> does not define. */
/* #undef mode_t */

/* Define to the name of the strftime replacement function. */
#define my_strftime nstrftime

/* Define to the type of st_nlink in struct stat, or a supertype. */
/* #undef nlink_t */

/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */

/* Define as the type of the result of subtracting two pointers, if the =
system
   doesn't define it. */
/* #undef ptrdiff_t */

/* Define to rpl_re_comp if the replacement should be used. */
#define re_comp rpl_re_comp

/* Define to rpl_re_compile_fastmap if the replacement should be used. =
*/
#define re_compile_fastmap rpl_re_compile_fastmap

/* Define to rpl_re_compile_pattern if the replacement should be used. =
*/
#define re_compile_pattern rpl_re_compile_pattern

/* Define to rpl_re_exec if the replacement should be used. */
#define re_exec rpl_re_exec

/* Define to rpl_re_match if the replacement should be used. */
#define re_match rpl_re_match

/* Define to rpl_re_match_2 if the replacement should be used. */
#define re_match_2 rpl_re_match_2

/* Define to rpl_re_search if the replacement should be used. */
#define re_search rpl_re_search

/* Define to rpl_re_search_2 if the replacement should be used. */
#define re_search_2 rpl_re_search_2

/* Define to rpl_re_set_registers if the replacement should be used. */
#define re_set_registers rpl_re_set_registers

/* Define to rpl_re_set_syntax if the replacement should be used. */
#define re_set_syntax rpl_re_set_syntax

/* Define to rpl_re_syntax_options if the replacement should be used. */
#define re_syntax_options rpl_re_syntax_options

/* Define to rpl_regcomp if the replacement should be used. */
#define regcomp rpl_regcomp

/* Define to rpl_regerror if the replacement should be used. */
#define regerror rpl_regerror

/* Define to rpl_regexec if the replacement should be used. */
#define regexec rpl_regexec

/* Define to rpl_regfree if the replacement should be used. */
#define regfree rpl_regfree

/* Define to the equivalent of the C99 'restrict' keyword, or to
   nothing if this is not supported.  Do not define if restrict is
   supported directly.  */
/* #undef restrict */
/* Work around a bug in Sun C++: it does not support _Restrict or
   __restrict__, even though the corresponding Sun C compiler ends up =
with
   "#define restrict _Restrict" or "#define restrict __restrict__" in =
the
   previous line.  Perhaps some future version of Sun C++ will work with
   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

/* type to use in place of socklen_t if not defined */
/* #undef socklen_t */

/* Define as a signed type of the same size as size_t. */
/* #undef ssize_t */

/* Define to rpl_tzset if the wrapper function should be used. */
/* #undef tzset */

/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */

/* Define as a marker that can be attached to declarations that might =
not
    be used.  This helps to reduce warnings, such as from
    GCC -Wunused-parameter.  */
#if __GNUC__ >=3D 3 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 7)
# define _GL_UNUSED __attribute__ ((__unused__))
#else
# define _GL_UNUSED
#endif
/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
   is a misnomer outside of parameter lists.  */
#define _UNUSED_PARAMETER_ _GL_UNUSED

/* The __pure__ attribute was added in gcc 2.96.  */
#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 96)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
#else
# define _GL_ATTRIBUTE_PURE /* empty */
#endif

/* The __const__ attribute was added in gcc 2.95.  */
#if __GNUC__ > 2 || (__GNUC__ =3D=3D 2 && __GNUC_MINOR__ >=3D 95)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
#else
# define _GL_ATTRIBUTE_CONST /* empty */
#endif


/* Define to an unsigned 32-bit type if <sys/types.h> lacks this type. =
*/
/* #undef useconds_t */

/* Define as a macro for copying va_list variables. */
/* #undef va_copy */

/* Define as `fork' if `vfork' does not work. */
#define vfork fork

/* Define to empty if the keyword `volatile' does not work. Warning: =
valid
   code using `volatile' can become incorrect without. Disable with =
care. */
/* #undef volatile */

------=_NextPart_000_0025_01CCBB45.4C9A2610--





Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2011 14:19:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 09:19:00 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbC9D-0001YE-LW
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:19:00 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jim@HIDDEN>) id 1RbC9A-0001Y2-AU
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:18:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbC7e-00073D-9b
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:17:26 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:57662)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbC7e-000735-87
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:17:22 -0500
Received: from eggs.gnu.org ([140.186.70.92]:38776)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbC7W-000164-8K
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 09:17:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@HIDDEN>) id 1RbC7Q-00071C-Cl
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 09:17:14 -0500
Received: from mx.meyering.net ([88.168.87.75]:35335)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@HIDDEN>)
	id 1RbC7Q-000717-2s; Thu, 15 Dec 2011 09:17:08 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 4782A600E3;
	Thu, 15 Dec 2011 15:17:07 +0100 (CET)
From: Jim Meyering <jim@HIDDEN>
To: "Joachim Schmitz" <jojo@HIDDEN>
Subject: Re: coreutils-8.14, "rm -r" fails with EBADF
In-Reply-To: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de> (Joachim
	Schmitz's message of "Thu, 15 Dec 2011 15:05:15 +0100")
References: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
Date: Thu, 15 Dec 2011 15:17:07 +0100
Message-ID: <87ehw5ly1o.fsf@HIDDEN>
Lines: 55
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.7 (----)
X-Debbugs-Envelope-To: submit
Cc: bug-gnulib@HIDDEN, bug-coreutils@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.7 (----)

Joachim Schmitz wrote:
> I got coreutils-8.9, 8.13 and 8.14 to compile for my platform, and most o=
f the

Thanks for the report.
More details will help us help you:

Which platform is that?
Including your config.h might help.

> utilities work, but as soon as it comes to recurring thru the file system=
 some
> utils fail, e.g.:
>
> ~/coreutils-8.14/src $ ./rm -R /tmp/foo
>
> ./rm: traversal failed: `/tmp/foo': Bad file descriptor
>
> ~/coreutils-8.14/src $ ./rm -r /tmp/foo
>
> ./rm: traversal failed: `/tmp/foo': Bad file descriptor
>
> ~/coreutils-8.14/src $
>
> =E2=80=98./ls =E2=80=93R /tmp/foo=E2=80=99 does work though:
>
> ~/coreutils-8.14/src $ ./ls -lr /tmp/foo
>
> total 0
>
> -rw-rw-r-- 1 jojo ITUGLIB 0 Dec 15 08:06 bar
>
> Does this ring a bell with one of you?

I haven't seen that before.
It's obviously coming from this:

    case FTS_ERR:
      /* Various failures, from opendir to ENOMEM, to failure to "return"
         to preceding directory, can provoke this.  */
      error (0, ent->fts_errno, _("traversal failed: %s"),
             quote (ent->fts_path));
      fts_skip_tree (fts, ent);
      return RM_ERROR;

but what I really need to know is what happened just prior, in fts_read.
Can you run gdb, set a breakpoint in fts_read and show us the result of
stepping through fts_read?  That would be most useful.

Or can you run strace -o log ./rm -r /tmp/foo
and send us the "log" file?

> I don=E2=80=99t understand why one fails but the other works, and can=E2=
=80=99t seem to fine the
> place where it goes wrong.

rm (and du, chmod, chown, etc.) use fts for tree traversal, while ls
still uses hand-rolled (and thus unnecessarily limited) recursion.




Information forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2011 14:07:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 15 09:07:14 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1RbBxq-0001HW-Ha
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:07:14 -0500
Received: from eggs.gnu.org ([140.186.70.92])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <jojo@HIDDEN>) id 1RbBxo-0001HP-7K
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:07:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbBwG-0004UA-3x
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:05:42 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([140.186.70.17]:36299)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbBwG-0004U4-12
	for submit <at> debbugs.gnu.org; Thu, 15 Dec 2011 09:05:36 -0500
Received: from eggs.gnu.org ([140.186.70.92]:41856)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbBw9-0007wV-UD
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 09:05:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jojo@HIDDEN>) id 1RbBw3-0004SD-Ru
	for bug-coreutils@HIDDEN; Thu, 15 Dec 2011 09:05:29 -0500
Received: from moutng.kundenserver.de ([212.227.126.187]:61050)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jojo@HIDDEN>)
	id 1RbBw3-0004Rz-GU; Thu, 15 Dec 2011 09:05:23 -0500
Received: from DualCore (dsdf-4d0a1f67.pool.mediaWays.net [77.10.31.103])
	by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis)
	id 0LcmTH-1QuOKE1NDj-00jgXK; Thu, 15 Dec 2011 15:05:21 +0100
From: "Joachim Schmitz" <jojo@HIDDEN>
To: <bug-coreutils@HIDDEN>,
	<bug-gnulib@HIDDEN>
Subject: coreutils-8.14, "rm -r" fails with EBADF
Date: Thu, 15 Dec 2011 15:05:15 +0100
Message-ID: <001f01ccbb32$92549f40$b6fdddc0$@schmitz-digital.de>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0020_01CCBB3A.F4190740"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: Acy7Mgt0ZxU0yR1zT2eSC/7mQli/FQ==
Content-Language: de
X-Provags-ID: V02:K0:10iFVLGD43YYhhs1DRP8/GmY9IrP4dCFSgRCMYzBhfd
	JEvuFLENwyMuQeFekCzqoTquGpTB94QfPWgzfEMRMum7f4pGRC
	aTwkzLr3ULXsh62K7MAcsMBGt9eTi+4ZNGKgi048nNZjix8nAy
	Q2VQruq5BAYMaoDPJGPtY7JsnEYew8R5l37rQLv8Wk/8d+Lkkc
	kuk73fureDMGRjqMcZz8opCdVeAvwGKc+cxjox1b9ae2aLeDD7
	9dkmIVCR8GbQMah6U9QCOAzkR13thWI4KxuT0mnrRbhRJuJTVE
	x8jKMm+VD2/t+87RSRh6D8J8JXFyWLB5JqkGr2PlpD+hYIrlln
	ljPNrNCpK6p7Mlaph5htFLRd7yymt0OYmJKoZlGwHcMAPQEeJy
	ffBHKN5GM+HKQ==
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 140.186.70.17
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -5.3 (-----)

This is a multipart message in MIME format.

------=_NextPart_000_0020_01CCBB3A.F4190740
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi folks

 

I got coreutils-8.9, 8.13 and 8.14 to compile for my platform, and most of
the utilities work, but as soon as it comes to recurring thru the file
system some utils fail, e.g.:

 

~/coreutils-8.14/src $ ./rm -R /tmp/foo

./rm: traversal failed: `/tmp/foo': Bad file descriptor

~/coreutils-8.14/src $ ./rm -r /tmp/foo

./rm: traversal failed: `/tmp/foo': Bad file descriptor

~/coreutils-8.14/src $

 

'./ls -R /tmp/foo' does work though:

~/coreutils-8.14/src $ ./ls -lr /tmp/foo

total 0

-rw-rw-r-- 1 jojo ITUGLIB 0 Dec 15 08:06 bar

 

Does this ring a bell with one of you?

I don't understand why one fails but the other works, and can't seem to fine
the place where it goes wrong.

It seems to happen somewhere deep in gnulib, but I'm not really sure.

 

Bye, Jojo


------=_NextPart_000_0020_01CCBB3A.F4190740
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.E-MailFormatvorlage17
	{mso-style-type:personal;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.E-MailFormatvorlage18
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DDE link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal><span =
lang=3DEN-US style=3D'color:#1F497D'>Hi folks<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>I got =
coreutils-8.9, 8.13 and 8.14 to compile for my platform, and most of the =
utilities work, but as soon as it comes to recurring thru the file =
system some utils fail, e.g.:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>~/coreutils-8.14/src $ ./rm -R =
/tmp/foo<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>./rm: traversal failed: `/tmp/foo': Bad file =
descriptor<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>~/coreutils-8.14/src $ ./rm -r =
/tmp/foo<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>./rm: traversal failed: `/tmp/foo': Bad file =
descriptor<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>~/coreutils-8.14/src $<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>&#8216;./ls =
&#8211;R /tmp/foo&#8217; does work though:<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>~/coreutils-8.14/src $ ./ls -lr =
/tmp/foo<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>total 0<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>-rw-rw-r-- =
1 jojo ITUGLIB 0 Dec 15 08:06 bar<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>Does this =
ring a bell with one of you?<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>I =
don&#8217;t understand why one fails but the other works, and =
can&#8217;t seem to fine the place where it goes =
wrong.<o:p></o:p></span></p><p class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'>It seems to happen somewhere deep in gnulib, but =
I&#8217;m not really sure.<o:p></o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US =
style=3D'color:#1F497D'><o:p>&nbsp;</o:p></span></p><p =
class=3DMsoNormal><span lang=3DEN-US style=3D'color:#1F497D'>Bye, =
Jojo<o:p></o:p></span></p></div></body></html>
------=_NextPart_000_0020_01CCBB3A.F4190740--





Acknowledgement sent to "Joachim Schmitz" <jojo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#10305; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.