Date: Mon, 6 Feb 2012 21:35:11 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r231101 - head/usr.bin/rpcgen Message-ID: <201202062135.q16LZBhS054643@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202062135.q16LZBhS054643>