git: Import stdbuf(1) together with libstdbuf(3) from FreeBSD

Aaron LI aly at crater.dragonflybsd.org
Fri Jan 1 07:11:49 PST 2021


commit ec21d9fbfac028108ef0d30283d74b804e16da33
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Jan 1 22:08:34 2021 +0800

    Import stdbuf(1) together with libstdbuf(3) from FreeBSD
    
    The stdbuf(1) is a utility to change the initial buffering of stdin,
    stdout and stderr streams for a given command.  It achieves this
    functionality by preloading the libstdbuf(3) library and configuring the
    needed environment variables.  Under the hood, libstdbuf(3) library
    calls setvbuf(3) to do the actual work.
    
    Changes from FreeBSD:
    * Removed 32bit i386 code from stdbuf(1)
    * Fix typos and update HISTORY section in libstdbuf.3 man page
    * Update the example to actually work on DragonFly

Summary of changes:
 lib/Makefile              |   1 +
 lib/libstdbuf/Makefile    |   7 +++
 lib/libstdbuf/libstdbuf.3 | 104 ++++++++++++++++++++++++++++++++++++++++
 lib/libstdbuf/stdbuf.c    | 117 +++++++++++++++++++++++++++++++++++++++++++++
 share/mk/bsd.libnames.mk  |   1 +
 usr.bin/Makefile          |   1 +
 usr.bin/stdbuf/Makefile   |   4 ++
 usr.bin/stdbuf/stdbuf.1   | 118 ++++++++++++++++++++++++++++++++++++++++++++++
 usr.bin/stdbuf/stdbuf.c   | 101 +++++++++++++++++++++++++++++++++++++++
 9 files changed, 454 insertions(+)
 create mode 100644 lib/libstdbuf/Makefile
 create mode 100644 lib/libstdbuf/libstdbuf.3
 create mode 100644 lib/libstdbuf/stdbuf.c
 create mode 100644 usr.bin/stdbuf/Makefile
 create mode 100644 usr.bin/stdbuf/stdbuf.1
 create mode 100644 usr.bin/stdbuf/stdbuf.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ec21d9fbfac028108ef0d30283d74b804e16da33


-- 
DragonFly BSD source repository



More information about the Commits mailing list