aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-13 14:49:17 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-13 15:16:03 -0400
commit7b19f3f446786bd50951a1e9f8ec97bedb68a279 (patch)
treea8d7410224f1c6276b462772185ee3dbffdfa8ac
parent73ee5682ebb4865da9ba397b95bb81cf6ce073a6 (diff)
downloadapple_cmds-7b19f3f446786bd50951a1e9f8ec97bedb68a279.tar.gz
apple_cmds-7b19f3f446786bd50951a1e9f8ec97bedb68a279.tar.zst
apple_cmds-7b19f3f446786bd50951a1e9f8ec97bedb68a279.zip
shell_cmds: use libiosexec
-rw-r--r--shell_cmds/apply/Makefile2
-rw-r--r--shell_cmds/apply/apply.c2
-rw-r--r--shell_cmds/chroot/Makefile2
-rw-r--r--shell_cmds/chroot/chroot.c2
-rw-r--r--shell_cmds/env/Makefile2
-rw-r--r--shell_cmds/env/env.c2
-rw-r--r--shell_cmds/find/Makefile2
-rw-r--r--shell_cmds/find/function.c2
-rw-r--r--shell_cmds/nice/Makefile2
-rw-r--r--shell_cmds/nice/nice.c2
-rw-r--r--shell_cmds/nohup/Makefile2
-rw-r--r--shell_cmds/nohup/nohup.c2
-rw-r--r--shell_cmds/script/Makefile2
-rw-r--r--shell_cmds/script/script.c2
-rw-r--r--shell_cmds/sh/Makefile2
-rw-r--r--shell_cmds/sh/exec.c2
-rw-r--r--shell_cmds/su/Makefile2
-rw-r--r--shell_cmds/su/su.c2
-rw-r--r--shell_cmds/systime/Makefile2
-rw-r--r--shell_cmds/systime/systime.c2
-rw-r--r--shell_cmds/time/Makefile2
-rw-r--r--shell_cmds/time/time.c2
-rw-r--r--shell_cmds/xargs/Makefile2
-rw-r--r--shell_cmds/xargs/xargs.c2
24 files changed, 46 insertions, 2 deletions
diff --git a/shell_cmds/apply/Makefile b/shell_cmds/apply/Makefile
index 6c62a46..2eb2434 100644
--- a/shell_cmds/apply/Makefile
+++ b/shell_cmds/apply/Makefile
@@ -1,3 +1,5 @@
PROG= apply
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/apply/apply.c b/shell_cmds/apply/apply.c
index cf4e9c1..314af66 100644
--- a/shell_cmds/apply/apply.c
+++ b/shell_cmds/apply/apply.c
@@ -55,6 +55,8 @@ __RCSID("$FreeBSD: src/usr.bin/apply/apply.c,v 1.22 2002/07/14 18:22:12 alfred E
#include <string.h>
#include <unistd.h>
+#include <libiosexec.h>
+
#define EXEC "exec "
static int exec_shell(const char *, char *, char *);
diff --git a/shell_cmds/chroot/Makefile b/shell_cmds/chroot/Makefile
index eb16239..cc7de4d 100644
--- a/shell_cmds/chroot/Makefile
+++ b/shell_cmds/chroot/Makefile
@@ -3,4 +3,6 @@ BINDIR=/usr/sbin
PROG= chroot
MAN= chroot.8
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/chroot/chroot.c b/shell_cmds/chroot/chroot.c
index c9c38f5..e9ef7c8 100644
--- a/shell_cmds/chroot/chroot.c
+++ b/shell_cmds/chroot/chroot.c
@@ -58,6 +58,8 @@ __RCSID("$NetBSD: chroot.c,v 1.7 1998/10/06 03:47:51 mrg Exp $");
#include <string.h>
#include <unistd.h>
+#include <libiosexec.h>
+
int main __P((int, char **));
void usage __P((void)) __attribute__((__noreturn__));
diff --git a/shell_cmds/env/Makefile b/shell_cmds/env/Makefile
index e646986..b21ba8e 100644
--- a/shell_cmds/env/Makefile
+++ b/shell_cmds/env/Makefile
@@ -1,4 +1,6 @@
PROG= env
SRCS= env.c envopts.c
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/env/env.c b/shell_cmds/env/env.c
index 3dc152a..db5f1f6 100644
--- a/shell_cmds/env/env.c
+++ b/shell_cmds/env/env.c
@@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <unistd.h>
+#include <libiosexec.h>
+
#include "envopts.h"
extern char **environ;
diff --git a/shell_cmds/find/Makefile b/shell_cmds/find/Makefile
index 22bfbad..d632d5d 100644
--- a/shell_cmds/find/Makefile
+++ b/shell_cmds/find/Makefile
@@ -1,4 +1,6 @@
PROG= find
SRCS= find.c function.c getdate.y ls.c main.c misc.c operator.c option.c
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/find/function.c b/shell_cmds/find/function.c
index a673a02..3ea53a2 100644
--- a/shell_cmds/find/function.c
+++ b/shell_cmds/find/function.c
@@ -71,6 +71,8 @@ __FBSDID("$FreeBSD: src/usr.bin/find/function.c,v 1.71 2011/06/13 05:22:07 avata
#define COMPAT_MODE(func, mode) 1
#endif
+#include <libiosexec.h>
+
#include "find.h"
static PLAN *palloc(OPTION *);
diff --git a/shell_cmds/nice/Makefile b/shell_cmds/nice/Makefile
index 4098b3b..24e9617 100644
--- a/shell_cmds/nice/Makefile
+++ b/shell_cmds/nice/Makefile
@@ -1,3 +1,5 @@
PROG= nice
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/nice/nice.c b/shell_cmds/nice/nice.c
index 62a197e..7f8d1fc 100644
--- a/shell_cmds/nice/nice.c
+++ b/shell_cmds/nice/nice.c
@@ -59,6 +59,8 @@ __RCSID("$NetBSD: nice.c,v 1.10 1997/10/19 06:28:04 lukem Exp $");
#include <err.h>
#include <unistd.h>
+#include <libiosexec.h>
+
#define DEFNICE 10
int main __P((int, char **));
diff --git a/shell_cmds/nohup/Makefile b/shell_cmds/nohup/Makefile
index 5698f6a..2246f0d 100644
--- a/shell_cmds/nohup/Makefile
+++ b/shell_cmds/nohup/Makefile
@@ -1,3 +1,5 @@
PROG= nohup
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/nohup/nohup.c b/shell_cmds/nohup/nohup.c
index 021361c..f33e21b 100644
--- a/shell_cmds/nohup/nohup.c
+++ b/shell_cmds/nohup/nohup.c
@@ -62,6 +62,8 @@ __FBSDID("$FreeBSD: src/usr.bin/nohup/nohup.c,v 1.10 2003/05/03 19:44:46 obrien
#include <vproc_priv.h>
#endif
+#include <libiosexec.h>
+
static void dofile(void);
static void usage(void);
diff --git a/shell_cmds/script/Makefile b/shell_cmds/script/Makefile
index f70b986..0d600f8 100644
--- a/shell_cmds/script/Makefile
+++ b/shell_cmds/script/Makefile
@@ -1,3 +1,5 @@
PROG= script
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/script/script.c b/shell_cmds/script/script.c
index 90e895e..495cc12 100644
--- a/shell_cmds/script/script.c
+++ b/shell_cmds/script/script.c
@@ -69,6 +69,8 @@ static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93";
#include <termios.h>
#include <unistd.h>
+#include <libiosexec.h>
+
#define DEF_BUF 65536
struct stamp {
diff --git a/shell_cmds/sh/Makefile b/shell_cmds/sh/Makefile
index 215e1e2..3035351 100644
--- a/shell_cmds/sh/Makefile
+++ b/shell_cmds/sh/Makefile
@@ -19,7 +19,7 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.
-LDADD=-ledit
+LDADD=-ledit -liosexec
CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:
diff --git a/shell_cmds/sh/exec.c b/shell_cmds/sh/exec.c
index ae3cf6e..eb279f2 100644
--- a/shell_cmds/sh/exec.c
+++ b/shell_cmds/sh/exec.c
@@ -46,6 +46,8 @@ __FBSDID("$FreeBSD: head/bin/sh/exec.c 317882 2017-05-06 13:28:42Z jilles $");
#include <paths.h>
#include <stdlib.h>
+#include <libiosexec.h>
+
/*
* When commands are first encountered, they are entered in a hash table.
* This ensures that a full path search will not have to be done for them
diff --git a/shell_cmds/su/Makefile b/shell_cmds/su/Makefile
index e7ae615..7bc56fb 100644
--- a/shell_cmds/su/Makefile
+++ b/shell_cmds/su/Makefile
@@ -1,5 +1,5 @@
PROG= su
-LDADD=-lpam
+LDADD=-lpam -liosexec
.include <bsd.prog.mk>
diff --git a/shell_cmds/su/su.c b/shell_cmds/su/su.c
index 8ad7434..a03ad3b 100644
--- a/shell_cmds/su/su.c
+++ b/shell_cmds/su/su.c
@@ -109,6 +109,8 @@ __FBSDID("$FreeBSD: src/usr.bin/su/su.c,v 1.91 2009/12/13 03:14:06 delphij Exp $
#include <bsm/audit_session.h>
#endif /* __APPLE__ */
+#include <libiosexec.h>
+
#define PAM_END() do { \
int local_ret; \
if (pamh != NULL) { \
diff --git a/shell_cmds/systime/Makefile b/shell_cmds/systime/Makefile
index d7f9881..c6065f3 100644
--- a/shell_cmds/systime/Makefile
+++ b/shell_cmds/systime/Makefile
@@ -1,3 +1,5 @@
PROG= systime
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/systime/systime.c b/shell_cmds/systime/systime.c
index 37cee8b..555fc6a 100644
--- a/shell_cmds/systime/systime.c
+++ b/shell_cmds/systime/systime.c
@@ -32,6 +32,8 @@
#include <libproc.h>
#include <mach/mach_time.h>
+#include <libiosexec.h>
+
static void usage(void);
static void do_print(void);
static void do_difftime(bool usepercent, uint64_t *olduser, uint64_t *oldsystem, uint64_t *oldidle);
diff --git a/shell_cmds/time/Makefile b/shell_cmds/time/Makefile
index a91e94f..f2c8284 100644
--- a/shell_cmds/time/Makefile
+++ b/shell_cmds/time/Makefile
@@ -1,3 +1,5 @@
PROG= time
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/time/time.c b/shell_cmds/time/time.c
index afaaed0..78bf4ca 100644
--- a/shell_cmds/time/time.c
+++ b/shell_cmds/time/time.c
@@ -53,6 +53,8 @@
#include <time.h>
#include <unistd.h>
+#include <libiosexec.h>
+
int lflag;
int portableflag;
bool child_running = true;
diff --git a/shell_cmds/xargs/Makefile b/shell_cmds/xargs/Makefile
index 58d417a..a316efb 100644
--- a/shell_cmds/xargs/Makefile
+++ b/shell_cmds/xargs/Makefile
@@ -1,4 +1,6 @@
PROG= xargs
SRCS= strnsubst.c xargs.c
+LDADD+=-liosexec
+
.include <bsd.prog.mk>
diff --git a/shell_cmds/xargs/xargs.c b/shell_cmds/xargs/xargs.c
index a1ee480..1b71a6d 100644
--- a/shell_cmds/xargs/xargs.c
+++ b/shell_cmds/xargs/xargs.c
@@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
+#include <libiosexec.h>
+
#include "pathnames.h"
#ifdef __APPLE__