svn commit: r231101 - head/usr.bin/rpcgen
Dimitry Andric
dim at FreeBSD.org
Mon Feb 6 21:35:11 UTC 2012
Author: dim
Date: Mon Feb 6 21:35:11 2012
New Revision: 231101
URL: http://svn.freebsd.org/changeset/base/231101
Log:
In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
rpcgen will search the current PATH for the preprocessor. This makes it
possible to run a preprocessor built during the cross-tools stage of
buildworld.
MFC after: 1 week
Modified:
head/usr.bin/rpcgen/rpc_main.c
Modified: head/usr.bin/rpcgen/rpc_main.c
==============================================================================
--- head/usr.bin/rpcgen/rpc_main.c Mon Feb 6 21:23:12 2012 (r231100)
+++ head/usr.bin/rpcgen/rpc_main.c Mon Feb 6 21:35:11 2012 (r231101)
@@ -290,7 +290,6 @@ prepend_cpp(void)
int idx = 1;
const char *var;
char *dupvar, *s, *t;
- struct stat buf;
if (CPP != NULL)
insarg(0, CPP);
@@ -306,11 +305,6 @@ prepend_cpp(void)
free(dupvar);
}
- if (stat(arglist[0], &buf) < 0) {
- warnx("cannot find C preprocessor: %s", arglist[0]);
- crash();
- }
-
insarg(idx, CPPFLAGS);
}
@@ -334,8 +328,8 @@ open_input(const char *infile, const cha
(void) close(1);
(void) dup2(pd[1], 1);
(void) close(pd[0]);
- execv(arglist[0], arglist);
- err(1, "execv");
+ execvp(arglist[0], arglist);
+ err(1, "execvp %s", arglist[0]);
case -1:
err(1, "fork");
}
More information about the svn-src-head
mailing list