diff options
-rw-r--r-- | usr.bin/xargs/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/xargs/xargs.c | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/xargs/Makefile b/usr.bin/xargs/Makefile index 1f33228..1f258ca 100644 --- a/usr.bin/xargs/Makefile +++ b/usr.bin/xargs/Makefile @@ -5,4 +5,8 @@ PROG= xargs SRCS= xargs.c strnsubst.c WARNS?= 4 +.if defined(BOOTSTRAPPING) +CFLAGS+=-DBOOTSTRAPPING +.endif + .include <bsd.prog.mk> diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index d13b23a..32f8a75 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -56,7 +56,9 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <errno.h> +#ifndef BOOTSTRAPPING #include <langinfo.h> +#endif #include <locale.h> #include <paths.h> #include <regex.h> @@ -536,7 +538,13 @@ prompt(void) (void)fprintf(stderr, "?..."); (void)fflush(stderr); if ((response = fgetln(ttyfp, &rsize)) == NULL || - regcomp(&cre, nl_langinfo(YESEXPR), REG_BASIC) != 0) { + regcomp(&cre, +#ifdef BOOTSTRAPPING + "^[yY]", +#else + nl_langinfo(YESEXPR), +#endif + REG_BASIC) != 0) { (void)fclose(ttyfp); return (0); } |