Fix rpcgen so that generated files are written to the current working
directory (instead of the same directory as the source files) and that #includes in those files do not contain the path to the source file. Obtained from: J.T. Conklin via NetBSD
This commit is contained in:
parent
4f749d2669
commit
5ec07232b9
@ -29,7 +29,7 @@
|
||||
*/
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)rpc_main.c 1.7 87/06/24 (C) 1987 SMI";*/
|
||||
static char rcsid[] = "$Id: rpc_main.c,v 1.1 1993/09/13 23:20:15 jtc Exp $";
|
||||
static char rcsid[] = "$Id: rpc_main.c,v 1.1 1994/08/07 18:01:31 wollman Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -109,16 +109,22 @@ main(argc, argv)
|
||||
}
|
||||
|
||||
/*
|
||||
* add extension to filename
|
||||
* strip path and add extension to filename
|
||||
*/
|
||||
static char *
|
||||
extendfile(file, ext)
|
||||
char *file;
|
||||
extendfile(path, ext)
|
||||
char *path;
|
||||
char *ext;
|
||||
{
|
||||
char *file;
|
||||
char *res;
|
||||
char *p;
|
||||
|
||||
if ((file = rindex(path, '/')) == NULL)
|
||||
file = path;
|
||||
else
|
||||
file++;
|
||||
|
||||
res = alloc(strlen(file) + strlen(ext) + 1);
|
||||
if (res == NULL) {
|
||||
abort();
|
||||
|
@ -29,7 +29,7 @@
|
||||
*/
|
||||
#ifndef lint
|
||||
/*static char sccsid[] = "from: @(#)rpc_svcout.c 1.6 87/06/24 (C) 1987 SMI";*/
|
||||
static char rcsid[] = "$Id: rpc_svcout.c,v 1.1 1993/09/13 23:20:19 jtc Exp $";
|
||||
static char rcsid[] = "$Id: rpc_svcout.c,v 1.1 1994/08/07 18:01:36 wollman Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -222,7 +222,7 @@ write_program(def, storage)
|
||||
f_print(fout, "\t}\n");
|
||||
|
||||
f_print(fout, "\tbzero((char *)&%s, sizeof(%s));\n", ARG, ARG);
|
||||
printif("getargs", TRANSP, "&", ARG);
|
||||
printif("getargs", TRANSP, "(caddr_t)&", ARG);
|
||||
printerr("decode", TRANSP);
|
||||
f_print(fout, "\t\treturn;\n");
|
||||
f_print(fout, "\t}\n");
|
||||
@ -235,7 +235,7 @@ write_program(def, storage)
|
||||
printerr("systemerr", TRANSP);
|
||||
f_print(fout, "\t}\n");
|
||||
|
||||
printif("freeargs", TRANSP, "&", ARG);
|
||||
printif("freeargs", TRANSP, "(caddr_t)&", ARG);
|
||||
f_print(fout, "\t\t(void)fprintf(stderr, \"unable to free arguments\\n\");\n");
|
||||
f_print(fout, "\t\texit(1);\n");
|
||||
f_print(fout, "\t}\n");
|
||||
|
Loading…
Reference in New Issue
Block a user