]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
shell_cmds: All compiled
authorCameron Katri <me@cameronkatri.com>
Mon, 10 May 2021 15:59:14 +0000 (11:59 -0400)
committerCameron Katri <me@cameronkatri.com>
Mon, 10 May 2021 18:59:06 +0000 (14:59 -0400)
55 files changed:
shell_cmds/Makefile [new file with mode: 0644]
shell_cmds/Makefile.inc [new file with mode: 0644]
shell_cmds/alias/Makefile [new file with mode: 0644]
shell_cmds/apply/Makefile [new file with mode: 0644]
shell_cmds/basename/Makefile [new file with mode: 0644]
shell_cmds/chroot/Makefile [new file with mode: 0644]
shell_cmds/date/Makefile [new file with mode: 0644]
shell_cmds/dirname/Makefile [new file with mode: 0644]
shell_cmds/echo/Makefile [new file with mode: 0644]
shell_cmds/env/Makefile [new file with mode: 0644]
shell_cmds/expr/Makefile [new file with mode: 0644]
shell_cmds/false/Makefile [new file with mode: 0644]
shell_cmds/find/Makefile [new file with mode: 0644]
shell_cmds/getopt/Makefile [new file with mode: 0644]
shell_cmds/hexdump/Makefile [new file with mode: 0644]
shell_cmds/hostname/Makefile [new file with mode: 0644]
shell_cmds/id/Makefile [new file with mode: 0644]
shell_cmds/jot/Makefile [new file with mode: 0644]
shell_cmds/kill/Makefile [new file with mode: 0644]
shell_cmds/killall/Makefile [new file with mode: 0644]
shell_cmds/lastcomm/Makefile [new file with mode: 0644]
shell_cmds/locate/Makefile [new file with mode: 0644]
shell_cmds/locate/bigram/Makefile [new file with mode: 0644]
shell_cmds/locate/code/Makefile [new file with mode: 0644]
shell_cmds/locate/locate/Makefile [new file with mode: 0644]
shell_cmds/logname/Makefile [new file with mode: 0644]
shell_cmds/mktemp/Makefile [new file with mode: 0644]
shell_cmds/nice/Makefile [new file with mode: 0644]
shell_cmds/nohup/Makefile [new file with mode: 0644]
shell_cmds/path_helper/Makefile [new file with mode: 0644]
shell_cmds/printenv/Makefile [new file with mode: 0644]
shell_cmds/printf/Makefile [new file with mode: 0644]
shell_cmds/pwd/Makefile [new file with mode: 0644]
shell_cmds/renice/Makefile [new file with mode: 0644]
shell_cmds/script/Makefile [new file with mode: 0644]
shell_cmds/seq/Makefile [new file with mode: 0644]
shell_cmds/sh/Makefile
shell_cmds/shlock/Makefile [new file with mode: 0644]
shell_cmds/sleep/Makefile [new file with mode: 0644]
shell_cmds/su/Makefile [new file with mode: 0644]
shell_cmds/systime/Makefile [new file with mode: 0644]
shell_cmds/tee/Makefile [new file with mode: 0644]
shell_cmds/test/Makefile [new file with mode: 0644]
shell_cmds/time/Makefile [new file with mode: 0644]
shell_cmds/true/Makefile [new file with mode: 0644]
shell_cmds/uname/Makefile [new file with mode: 0644]
shell_cmds/users/Makefile [new file with mode: 0644]
shell_cmds/w/Makefile [new file with mode: 0644]
shell_cmds/what/Makefile [new file with mode: 0644]
shell_cmds/whereis/Makefile [new file with mode: 0644]
shell_cmds/which/Makefile [new file with mode: 0644]
shell_cmds/who/Makefile [new file with mode: 0644]
shell_cmds/who/utmpentry.c
shell_cmds/xargs/Makefile [new file with mode: 0644]
shell_cmds/yes/Makefile [new file with mode: 0644]

diff --git a/shell_cmds/Makefile b/shell_cmds/Makefile
new file mode 100644 (file)
index 0000000..e630c10
--- /dev/null
@@ -0,0 +1,51 @@
+SUBDIR=        alias \
+       apply \
+       basename \
+       chroot \
+       date \
+       dirname \
+       echo \
+       env \
+       expr \
+       false \
+       find \
+       getopt \
+       hexdump \
+       hostname \
+       id \
+       jot \
+       kill \
+       killall \
+       lastcomm \
+       locate \
+       logname \
+       mktemp \
+       nice \
+       nohup \
+       path_helper \
+       printenv \
+       printf \
+       pwd \
+       renice \
+       script \
+       seq \
+       sh \
+       shlock \
+       sleep \
+       su \
+       systime \
+       tee \
+       test \
+       time \
+       true \
+       uname \
+       users \
+       w \
+       what \
+       whereis \
+       which \
+       who \
+       xargs \
+       yes
+
+.include <bsd.subdir.mk>
diff --git a/shell_cmds/Makefile.inc b/shell_cmds/Makefile.inc
new file mode 100644 (file)
index 0000000..5b08cda
--- /dev/null
@@ -0,0 +1 @@
+BINDIR?=/usr/bin
diff --git a/shell_cmds/alias/Makefile b/shell_cmds/alias/Makefile
new file mode 100644 (file)
index 0000000..818ff1a
--- /dev/null
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+SCRIPTS=generic.sh
+SCRIPTSNAME=alias
+MAN=builtin.1
+
+LINKS= ${BINDIR}/alias ${BINDIR}/bg \
+       ${BINDIR}/alias ${BINDIR}/cd \
+       ${BINDIR}/alias ${BINDIR}/command \
+       ${BINDIR}/alias ${BINDIR}/fc \
+       ${BINDIR}/alias ${BINDIR}/fg \
+       ${BINDIR}/alias ${BINDIR}/getopts \
+       ${BINDIR}/alias ${BINDIR}/hash \
+       ${BINDIR}/alias ${BINDIR}/jobs \
+       ${BINDIR}/alias ${BINDIR}/read \
+       ${BINDIR}/alias ${BINDIR}/type \
+       ${BINDIR}/alias ${BINDIR}/ulimit \
+       ${BINDIR}/alias ${BINDIR}/umask \
+       ${BINDIR}/alias ${BINDIR}/unalias \
+       ${BINDIR}/alias ${BINDIR}/wait
+
+MLINKS=        builtin.1 alias.1 \
+       builtin.1 cd.1 \
+       builtin.1 command.1 \
+       builtin.1 fc.1 \
+       builtin.1 fg.1 \
+       builtin.1 getopts.1 \
+       builtin.1 hash.1 \
+       builtin.1 jobs.1 \
+       builtin.1 read.1 \
+       builtin.1 type.1 \
+       builtin.1 ulimit.1 \
+       builtin.1 umask.1 \
+       builtin.1 unalias.1 \
+       builtin.1 wait.1
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/apply/Makefile b/shell_cmds/apply/Makefile
new file mode 100644 (file)
index 0000000..6c62a46
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  apply
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/basename/Makefile b/shell_cmds/basename/Makefile
new file mode 100644 (file)
index 0000000..e507dfd
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  basename
+MAN=   basename.1 dirname.1
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/chroot/Makefile b/shell_cmds/chroot/Makefile
new file mode 100644 (file)
index 0000000..eb16239
--- /dev/null
@@ -0,0 +1,6 @@
+BINDIR=/usr/sbin
+
+PROG=  chroot
+MAN=   chroot.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/date/Makefile b/shell_cmds/date/Makefile
new file mode 100644 (file)
index 0000000..ad0dd44
--- /dev/null
@@ -0,0 +1,6 @@
+BINDIR=/bin
+
+PROG=  date
+SRCS=  date.c netdate.c vary.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/dirname/Makefile b/shell_cmds/dirname/Makefile
new file mode 100644 (file)
index 0000000..939bfaf
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  dirname
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/echo/Makefile b/shell_cmds/echo/Makefile
new file mode 100644 (file)
index 0000000..f896dfc
--- /dev/null
@@ -0,0 +1,5 @@
+BINDIR=/bin
+
+PROG=  echo
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/env/Makefile b/shell_cmds/env/Makefile
new file mode 100644 (file)
index 0000000..e646986
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  env
+SRCS=  env.c envopts.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/expr/Makefile b/shell_cmds/expr/Makefile
new file mode 100644 (file)
index 0000000..8169f63
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  expr
+SRCS=  expr.y
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/false/Makefile b/shell_cmds/false/Makefile
new file mode 100644 (file)
index 0000000..7922186
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  false
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/find/Makefile b/shell_cmds/find/Makefile
new file mode 100644 (file)
index 0000000..22bfbad
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  find
+SRCS=  find.c function.c getdate.y ls.c main.c misc.c operator.c option.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/getopt/Makefile b/shell_cmds/getopt/Makefile
new file mode 100644 (file)
index 0000000..b015a8a
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  getopt
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/hexdump/Makefile b/shell_cmds/hexdump/Makefile
new file mode 100644 (file)
index 0000000..1ae98e4
--- /dev/null
@@ -0,0 +1,10 @@
+PROG=  hexdump
+MAN=   hexdump.1 od.1
+SRCS=  conv.c \
+       display.c \
+       hexdump.c \
+       hexsyntax.c \
+       odsyntax.c \
+       parse.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/hostname/Makefile b/shell_cmds/hostname/Makefile
new file mode 100644 (file)
index 0000000..95cf6bb
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  hostname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/id/Makefile b/shell_cmds/id/Makefile
new file mode 100644 (file)
index 0000000..b01f798
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  id
+MAN=   groups.1 id.1 whoami.1
+SRCS=  id.c
+
+LINKS= ${BINDIR}/id ${BINDIR}/groups
+LINKS+=        ${BINDIR}/id ${BINDIR}/whoami
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/jot/Makefile b/shell_cmds/jot/Makefile
new file mode 100644 (file)
index 0000000..e662623
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  jot
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/kill/Makefile b/shell_cmds/kill/Makefile
new file mode 100644 (file)
index 0000000..d6bfee9
--- /dev/null
@@ -0,0 +1,5 @@
+BINDIR=/bin
+
+PROG=  kill
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/killall/Makefile b/shell_cmds/killall/Makefile
new file mode 100644 (file)
index 0000000..e8ff6ee
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  killall
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/lastcomm/Makefile b/shell_cmds/lastcomm/Makefile
new file mode 100644 (file)
index 0000000..23fafaf
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  lastcomm
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/Makefile b/shell_cmds/locate/Makefile
new file mode 100644 (file)
index 0000000..a4c8e8f
--- /dev/null
@@ -0,0 +1,3 @@
+SUBDIR=        bigram code locate
+
+.include <bsd.subdir.mk>
diff --git a/shell_cmds/locate/bigram/Makefile b/shell_cmds/locate/bigram/Makefile
new file mode 100644 (file)
index 0000000..1740f30
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  locate.bigram
+MAN=   locate.bigram.8
+
+BINDIR=/usr/libexec
+
+CFLAGS+=-I../locate
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/code/Makefile b/shell_cmds/locate/code/Makefile
new file mode 100644 (file)
index 0000000..4c06f77
--- /dev/null
@@ -0,0 +1,8 @@
+PROG=  locate.code
+MAN=   locate.code.8
+
+BINDIR=/usr/libexec
+
+CFLAGS+=-I../locate
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/locate/Makefile b/shell_cmds/locate/locate/Makefile
new file mode 100644 (file)
index 0000000..cf5717b
--- /dev/null
@@ -0,0 +1,17 @@
+#      @(#)Makefile    8.1 (Berkeley) 6/6/93
+# $FreeBSD$
+
+CONFS= locate.rc
+PROG=  locate
+SRCS=  util.c locate.c
+CFLAGS+= -I${.CURDIR} -DMMAP # -DDEBUG (print time) -O2 (10% faster)
+SCRIPTS=updatedb.sh mklocatedb.sh concatdb.sh
+MAN=   locate.1 locate.updatedb.8
+
+SCRIPTSDIR=    ${LIBEXECDIR}
+.for script in ${SCRIPTS}
+SCRIPTSNAME_${script}= locate.${script:R}
+.endfor
+MLINKS+= locate.updatedb.8 updatedb.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/logname/Makefile b/shell_cmds/logname/Makefile
new file mode 100644 (file)
index 0000000..b7422cb
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  logname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/mktemp/Makefile b/shell_cmds/mktemp/Makefile
new file mode 100644 (file)
index 0000000..b78ac92
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  mktemp
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/nice/Makefile b/shell_cmds/nice/Makefile
new file mode 100644 (file)
index 0000000..4098b3b
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  nice
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/nohup/Makefile b/shell_cmds/nohup/Makefile
new file mode 100644 (file)
index 0000000..5698f6a
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  nohup
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/path_helper/Makefile b/shell_cmds/path_helper/Makefile
new file mode 100644 (file)
index 0000000..e5f316a
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  path_helper
+MAN=   path_helper.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/printenv/Makefile b/shell_cmds/printenv/Makefile
new file mode 100644 (file)
index 0000000..e3b7071
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  printenv
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/printf/Makefile b/shell_cmds/printf/Makefile
new file mode 100644 (file)
index 0000000..9133366
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  printf
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/pwd/Makefile b/shell_cmds/pwd/Makefile
new file mode 100644 (file)
index 0000000..d5c1780
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  pwd
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/renice/Makefile b/shell_cmds/renice/Makefile
new file mode 100644 (file)
index 0000000..00fdb5c
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  renice
+MAN=   renice.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/script/Makefile b/shell_cmds/script/Makefile
new file mode 100644 (file)
index 0000000..f70b986
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  script
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/seq/Makefile b/shell_cmds/seq/Makefile
new file mode 100644 (file)
index 0000000..96f8a35
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  seq
+
+.include <bsd.prog.mk>
index 8d0866256fe1dee009f28242ddb44b51cf01057f..215e1e2005efaf5a9a27e03be6199d0abb4f6876 100644 (file)
@@ -1,7 +1,7 @@
 #      @(#)Makefile    8.4 (Berkeley) 5/5/95
 # $FreeBSD: head/bin/sh/Makefile 322515 2017-08-14 19:21:37Z ngie $
-
-.include <src.opts.mk>
+#
+BINDIR=/bin
 
 PACKAGE=runtime
 PROG=  sh
@@ -19,18 +19,18 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
 # utilities of the same name are handled with the associated manpage,
 # builtin.1 in share/man/man1/.
 
-LIBADD=        edit
+LDADD=-ledit
 
 CFLAGS+=-DSHELL -I. -I${.CURDIR}
 # for debug:
 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
-WARNS?=        2
+#WARNS?=       2
 WFORMAT=0
 
 .PATH: ${.CURDIR}/bltin \
        ${.CURDIR:H}/kill \
        ${.CURDIR:H}/test \
-       ${SRCTOP}/usr.bin/printf
+       ${.CURDIR}/../printf
 
 CLEANFILES+= mknodes mknodes.o \
        mksyntax mksyntax.o
@@ -39,27 +39,22 @@ CLEANFILES+= ${GENSRCS} ${GENHDRS}
 build-tools: mknodes mksyntax
 
 .ORDER: builtins.c builtins.h
-builtins.h: .NOMETA
 builtins.c builtins.h: mkbuiltins builtins.def
        sh ${.CURDIR}/mkbuiltins ${.CURDIR}
 
 # XXX this is just to stop the default .c rule being used, so that the
 # intermediate object has a fixed name.
 # XXX we have a default .c rule, but no default .o rule.
-mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
-       ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
-mknodes: mknodes.o ${BUILD_TOOLS_META}
-mksyntax: mksyntax.o ${BUILD_TOOLS_META}
+mknodes mksyntax:
+       clang ${.IMPSRC} ${.TARGET}.c -o ${.TARGET}
 
 .ORDER: nodes.c nodes.h
-nodes.h: .NOMETA
 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
-       ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
+       ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
 
 .ORDER: syntax.c syntax.h
-syntax.h: .NOMETA
 syntax.c syntax.h: mksyntax
-       ${BTOOLSPATH:U.}/mksyntax
+       ./mksyntax
 
 token.h: mktokens
        sh ${.CURDIR}/mktokens
diff --git a/shell_cmds/shlock/Makefile b/shell_cmds/shlock/Makefile
new file mode 100644 (file)
index 0000000..004ad04
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  shlock
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/sleep/Makefile b/shell_cmds/sleep/Makefile
new file mode 100644 (file)
index 0000000..193ae51
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  sleep
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/su/Makefile b/shell_cmds/su/Makefile
new file mode 100644 (file)
index 0000000..e7ae615
--- /dev/null
@@ -0,0 +1,5 @@
+PROG=  su
+
+LDADD=-lpam
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/systime/Makefile b/shell_cmds/systime/Makefile
new file mode 100644 (file)
index 0000000..d7f9881
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  systime
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/tee/Makefile b/shell_cmds/tee/Makefile
new file mode 100644 (file)
index 0000000..ab7b935
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  tee
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/test/Makefile b/shell_cmds/test/Makefile
new file mode 100644 (file)
index 0000000..562c968
--- /dev/null
@@ -0,0 +1,8 @@
+BINDIR=/bin
+
+PROG=  test
+MAN=   [.1 test.1
+
+LINKS= ${BINDIR}/test ${BINDIR}/[
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/time/Makefile b/shell_cmds/time/Makefile
new file mode 100644 (file)
index 0000000..a91e94f
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  time
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/true/Makefile b/shell_cmds/true/Makefile
new file mode 100644 (file)
index 0000000..1285b81
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  true
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/uname/Makefile b/shell_cmds/uname/Makefile
new file mode 100644 (file)
index 0000000..a002a44
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  uname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/users/Makefile b/shell_cmds/users/Makefile
new file mode 100644 (file)
index 0000000..8b987ca
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  users
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/w/Makefile b/shell_cmds/w/Makefile
new file mode 100644 (file)
index 0000000..c1d1c21
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  w
+SRCS=  fmt.c pr_time.c proc_compare.c w.c
+
+CFLAGS+=-DHAVE_UTMPX
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/what/Makefile b/shell_cmds/what/Makefile
new file mode 100644 (file)
index 0000000..f50df5d
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  what
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/whereis/Makefile b/shell_cmds/whereis/Makefile
new file mode 100644 (file)
index 0000000..5803279
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  whereis
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/which/Makefile b/shell_cmds/which/Makefile
new file mode 100644 (file)
index 0000000..097d238
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  which
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/who/Makefile b/shell_cmds/who/Makefile
new file mode 100644 (file)
index 0000000..74826ba
--- /dev/null
@@ -0,0 +1,6 @@
+PROG=  who
+SRCS=  who.c utmpentry.c
+
+CFLAGS+=-DSUPPORT_UTMPX
+
+.include <bsd.prog.mk>
index b0e09146f3faf6db18f047bf096946fa6b4691b5..7938d371692fe5c132b4c79c61ad1d72f248bf9e 100644 (file)
@@ -319,7 +319,7 @@ getentry(struct utmpentry *e, struct utmp *up)
 static void
 getentryx(struct utmpentry *e, struct utmpx *up)
 {
-       COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_name));
+       COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_user));
        COMPILE_ASSERT(sizeof(e->line) > sizeof(up->ut_line));
        COMPILE_ASSERT(sizeof(e->host) > sizeof(up->ut_host));
 
@@ -331,7 +331,7 @@ getentryx(struct utmpentry *e, struct utmpx *up)
         * reason we use the size of the _source_ as the length
         * argument.
         */
-       (void)strncpy(e->name, up->ut_name, sizeof(up->ut_name));
+       (void)strncpy(e->name, up->ut_user, sizeof(up->ut_user));
        (void)strncpy(e->line, up->ut_line, sizeof(up->ut_line));
        (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
 
diff --git a/shell_cmds/xargs/Makefile b/shell_cmds/xargs/Makefile
new file mode 100644 (file)
index 0000000..58d417a
--- /dev/null
@@ -0,0 +1,4 @@
+PROG=  xargs
+SRCS=  strnsubst.c xargs.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/yes/Makefile b/shell_cmds/yes/Makefile
new file mode 100644 (file)
index 0000000..b1d4075
--- /dev/null
@@ -0,0 +1,3 @@
+PROG=  yes
+
+.include <bsd.prog.mk>