From owner-freebsd-current Sun Sep 22 13:38:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51CC137B401 for ; Sun, 22 Sep 2002 13:38:42 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83D2443E65 for ; Sun, 22 Sep 2002 13:38:41 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g8MKcX4v063655 for ; Sun, 22 Sep 2002 22:38:33 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) Cc: current@FreeBSD.ORG Subject: Re: Who broke sort(1) ? In-Reply-To: Your message of "Sun, 22 Sep 2002 22:17:41 +0200." <63403.1032725861@critter.freebsd.dk> Date: Sun, 22 Sep 2002 22:38:33 +0200 Message-ID: <63654.1032727113@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <63403.1032725861@critter.freebsd.dk>, Poul-Henning Kamp writes: > >flat# date | sort +5n >sort: open failed: +5n: No such file or directory > >This breaks the build in libncurses... Ok, nailed it down. this commit, is the culprit. I guess it changes the fts ABI in some subtle way because backing the change to src/include/fts.h out makes sort(1) work again. I'll try if adding sort(1) to as a bootstrap-tool for buildworld solves this... Poul-Henning wollman 2002/09/20 18:28:41 PDT Modified files: bin/cp cp.c bin/ls ls.c include fts.h lib/libc/gen fts.3 fts.c usr.bin/find find.c usr.sbin/ctm/ctm_dequeue ctm_dequeue.c usr.sbin/mtree create.c usr.sbin/pkg_install/lib match.c Log: Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch Revision Changes Path 1.41 +2 -2 src/bin/cp/cp.c 1.66 +2 -2 src/bin/ls/ls.c 1.7 +10 -3 src/include/fts.h 1.14 +41 -6 src/lib/libc/gen/fts.3 1.21 +68 -14 src/lib/libc/gen/fts.c 1.15 +2 -2 src/usr.bin/find/find.c 1.11 +3 -3 src/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c 1.27 +2 -2 src/usr.sbin/mtree/create.c 1.13 +2 -2 src/usr.sbin/pkg_install/lib/match.c -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message