- Make the msdos and non-msdos cpp handling use the same variable $RPCGEN_CPP
instead of one using $CPP and the other using $RPCGENCPP, following suit with RDIST_RSH, CVS_RSH, etc. and document it. - make the msdos environment variable take precedence over path search.
This commit is contained in:
parent
3fcec0e820
commit
e451ddaaa8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpc_main.c,v 1.29 2008/01/12 05:49:46 dholland Exp $ */
|
||||
/* $NetBSD: rpc_main.c,v 1.30 2008/01/15 20:04:48 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -39,7 +39,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
|
||||
#else
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.29 2008/01/12 05:49:46 dholland Exp $");
|
||||
__RCSID("$NetBSD: rpc_main.c,v 1.30 2008/01/15 20:04:48 christos Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -164,7 +164,7 @@ main(argc, argv)
|
||||
struct commandline cmd;
|
||||
|
||||
setprogname(argv[0]);
|
||||
if (!(CPP = getenv("CPP")))
|
||||
if (!(CPP = getenv("RPCGEN_CPP")))
|
||||
CPP = "/usr/bin/cpp";
|
||||
|
||||
(void) memset((char *) &cmd, 0, sizeof(struct commandline));
|
||||
@ -334,8 +334,8 @@ open_input(infile, define)
|
||||
char cppfile[MAXPATH];
|
||||
char *cpp;
|
||||
|
||||
if ((cpp = searchpath("cpp.exe")) == NULL
|
||||
&& (cpp = getenv("RPCGENCPP")) == NULL)
|
||||
if ((cpp = getenv("RPCGEN_CPP")) == NULL &&
|
||||
(cpp = searchpath("cpp.exe")) == NULL)
|
||||
cpp = DOSCPP;
|
||||
|
||||
putarg(0, cpp);
|
||||
@ -378,10 +378,9 @@ open_input(infile, define)
|
||||
(void) dup2(pd[1], 1);
|
||||
(void) close(pd[0]);
|
||||
execvp(arglist[0], arglist);
|
||||
err(1, "$CPP: %s", CPP);
|
||||
err(1, "$RPCGEN_CPP: %s", CPP);
|
||||
case -1:
|
||||
perror("fork");
|
||||
exit(1);
|
||||
err(1, "fork");
|
||||
}
|
||||
(void) close(pd[1]);
|
||||
fin = fdopen(pd[0], "r");
|
||||
|
@ -1,7 +1,7 @@
|
||||
.\" $NetBSD: rpcgen.1,v 1.19 2004/05/12 18:49:30 wiz Exp $
|
||||
.\" $NetBSD: rpcgen.1,v 1.20 2008/01/15 20:04:49 christos Exp $
|
||||
.\" from: @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89
|
||||
.\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved.
|
||||
.Dd May 12, 2004
|
||||
.Dd January 15, 2008
|
||||
.Dt RPCGEN 1
|
||||
.Sh NAME
|
||||
.Nm rpcgen
|
||||
@ -444,6 +444,11 @@ while the options
|
||||
and
|
||||
.Fl T
|
||||
are global and can be used with the other options.
|
||||
.Sh ENVIRONMENT
|
||||
If the
|
||||
.Ev RPCGEN_RSH
|
||||
environment variable is set, its value is used as the pathname of the
|
||||
C preprocessor to be run on the input file.
|
||||
.Sh NOTES
|
||||
The
|
||||
.Tn RPC
|
||||
|
Loading…
Reference in New Issue
Block a user