summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-22 03:18:55 -0500
committerKiyoshi Aman <kiyoshi.aman+adelie@gmail.com>2019-06-22 03:18:55 -0500
commit7369e24c3897c0e4036830c5e15f88e56f7566c8 (patch)
tree9fe4c9c2ee83995b8d411e7845ac3fdea452cca3
parent7e8519ccfd23dd8562b06eef66d1a939d4443923 (diff)
downloaduserland-7369e24c3897c0e4036830c5e15f88e56f7566c8.tar.gz
userland-7369e24c3897c0e4036830c5e15f88e56f7566c8.tar.bz2
userland-7369e24c3897c0e4036830c5e15f88e56f7566c8.tar.xz
userland-7369e24c3897c0e4036830c5e15f88e56f7566c8.zip
usr.bin/xargs: make buildable with libbsd
-rw-r--r--usr.bin/xargs/strnsubst.c8
-rw-r--r--usr.bin/xargs/xargs.c19
2 files changed, 4 insertions, 23 deletions
diff --git a/usr.bin/xargs/strnsubst.c b/usr.bin/xargs/strnsubst.c
index 0953f49..488cc6f 100644
--- a/usr.bin/xargs/strnsubst.c
+++ b/usr.bin/xargs/strnsubst.c
@@ -8,14 +8,6 @@
* For the man who taught me vi, and who got too old, too young.
*/
-#include <sys/cdefs.h>
-#ifndef lint
-#if 0
-__FBSDID("$FreeBSD: src/usr.bin/xargs/strnsubst.c,v 1.8 2005/12/30 23:22:50 jmallett Exp $");
-#endif
-__RCSID("$NetBSD: strnsubst.c,v 1.1 2007/04/18 15:56:07 christos Exp $");
-#endif /* not lint */
-
#include <err.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c
index 5c89377..0a9570d 100644
--- a/usr.bin/xargs/xargs.c
+++ b/usr.bin/xargs/xargs.c
@@ -34,17 +34,6 @@
* $xMach: xargs.c,v 1.6 2002/02/23 05:27:47 tim Exp $
*/
-#include <sys/cdefs.h>
-#ifndef lint
-__COPYRIGHT("@(#) Copyright (c) 1990, 1993\
- The Regents of the University of California. All rights reserved.");
-#if 0
-static char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93";
-__FBSDID("$FreeBSD: src/usr.bin/xargs/xargs.c,v 1.62 2006/01/01 22:59:54 jmallett Exp $");
-#endif
-__RCSID("$NetBSD: xargs.c,v 1.20 2010/12/17 11:32:57 plunky Exp $");
-#endif /* not lint */
-
#include <sys/param.h>
#include <sys/wait.h>
@@ -56,7 +45,7 @@ __RCSID("$NetBSD: xargs.c,v 1.20 2010/12/17 11:32:57 plunky Exp $");
#include <paths.h>
#include <regex.h>
#include <stdio.h>
-#include <stdlib.h>
+#include <bsd/stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
@@ -67,7 +56,7 @@ static void parse_input(int, char *[]);
static void prerun(int, char *[]);
static int prompt(void);
static void run(char **);
-static void usage(void) __dead;
+static void usage(void);
void strnsubst(char **, const char *, const char *, size_t);
static void waitchildren(const char *, int);
@@ -601,7 +590,7 @@ waitchildren(const char *name, int waitall)
} else if (WIFSIGNALED (status)) {
if (WTERMSIG(status) < NSIG) {
warnx("%s terminated by SIG%s", name,
- sys_signame[WTERMSIG(status)]);
+ strsignal(WTERMSIG(status)));
} else {
warnx("%s terminated by signal %d", name,
WTERMSIG(status));
@@ -630,7 +619,7 @@ prompt(void)
(void)fprintf(stderr, "?...");
(void)fflush(stderr);
if ((response = fgetln(ttyfp, &rsize)) == NULL ||
- regcomp(&cre, nl_langinfo(YESEXPR), REG_BASIC) != 0) {
+ regcomp(&cre, nl_langinfo(YESEXPR), 0) != 0) {
(void)fclose(ttyfp);
return (0);
}