Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2002 22:38:33 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        current@FreeBSD.ORG
Subject:   Re: Who broke sort(1) ? 
Message-ID:  <63654.1032727113@critter.freebsd.dk>
In-Reply-To: Your message of "Sun, 22 Sep 2002 22:17:41 %2B0200." <63403.1032725861@critter.freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?63654.1032727113>