git: sort(1): Replace NetBSD version with Free/Open version

John Marino marino at crater.dragonflybsd.org
Tue Jul 28 11:57:12 PDT 2015


commit 50fc853e3b7db00a98d1340044b5206d291d1925
Author: John Marino <draco at marino.st>
Date:   Tue Jul 28 20:41:56 2015 +0200

    sort(1): Replace NetBSD version with Free/Open version
    
    With my ongoing collation work, I discovered our sort was not locale
    sensitive, but GNU sort was.  I replaced our ancient GNU sort with
    NetBSD's version about 4 years ago.  NetBSD hasn't updated that version
    since.  However, FreeBSD got rid of their GNU sort fairly recently and
    replaced it with another BSD-licensed version.  Four months ago, it was
    imported into OpenBSD, they made some corrections which were incorporated
    back in FreeBSD in the April timeframe.
    
    This version is locale sensitive and gives the same answers as GNU sort in
    my (admittedly) very limited testing.
    
    I fixed some minor issues that GCC5 was squawking about (mainly unused
    variables) and I changed the --parallel option PTHREAD_MUTEX_ADAPTIVE_NP
    behavior to PTHREAD_MUTEX_ERRORCHECK (the default POSIX behavior).  DF
    does not have the former flag implemented.

Summary of changes:
 usr.bin/sort/Makefile     |   23 +-
 usr.bin/sort/append.c     |   92 ---
 usr.bin/sort/bwstring.c   | 1143 ++++++++++++++++++++++++++++++++
 usr.bin/sort/bwstring.h   |  142 ++++
 usr.bin/sort/coll.c       | 1302 ++++++++++++++++++++++++++++++++++++
 usr.bin/sort/coll.h       |  167 +++++
 usr.bin/sort/fields.c     |  375 -----------
 usr.bin/sort/file.c       | 1597 +++++++++++++++++++++++++++++++++++++++++++++
 usr.bin/sort/file.h       |  126 ++++
 usr.bin/sort/files.c      |  276 --------
 usr.bin/sort/fsort.c      |  200 ------
 usr.bin/sort/fsort.h      |   78 ---
 usr.bin/sort/init.c       |  444 -------------
 usr.bin/sort/mem.c        |   81 +++
 usr.bin/sort/mem.h        |   45 ++
 usr.bin/sort/msort.c      |  424 ------------
 usr.bin/sort/pathnames.h  |   66 --
 usr.bin/sort/radix_sort.c |  216 ------
 usr.bin/sort/radixsort.c  |  691 ++++++++++++++++++++
 usr.bin/sort/radixsort.h  |   38 ++
 usr.bin/sort/sort.1       |  748 +++++++++++++--------
 usr.bin/sort/sort.c       | 1553 ++++++++++++++++++++++++++++++++++---------
 usr.bin/sort/sort.h       |  259 +++-----
 usr.bin/sort/tmp.c        |  104 ---
 usr.bin/sort/vsort.c      |  265 ++++++++
 usr.bin/sort/vsort.h      |   37 ++
 26 files changed, 7432 insertions(+), 3060 deletions(-)
 delete mode 100644 usr.bin/sort/append.c
 create mode 100644 usr.bin/sort/bwstring.c
 create mode 100644 usr.bin/sort/bwstring.h
 create mode 100644 usr.bin/sort/coll.c
 create mode 100644 usr.bin/sort/coll.h
 delete mode 100644 usr.bin/sort/fields.c
 create mode 100644 usr.bin/sort/file.c
 create mode 100644 usr.bin/sort/file.h
 delete mode 100644 usr.bin/sort/files.c
 delete mode 100644 usr.bin/sort/fsort.c
 delete mode 100644 usr.bin/sort/fsort.h
 delete mode 100644 usr.bin/sort/init.c
 create mode 100644 usr.bin/sort/mem.c
 create mode 100644 usr.bin/sort/mem.h
 delete mode 100644 usr.bin/sort/msort.c
 delete mode 100644 usr.bin/sort/pathnames.h
 delete mode 100644 usr.bin/sort/radix_sort.c
 create mode 100644 usr.bin/sort/radixsort.c
 create mode 100644 usr.bin/sort/radixsort.h
 delete mode 100644 usr.bin/sort/tmp.c
 create mode 100644 usr.bin/sort/vsort.c
 create mode 100644 usr.bin/sort/vsort.h

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/50fc853e3b7db00a98d1340044b5206d291d1925


-- 
DragonFly BSD source repository


More information about the Commits mailing list