mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Generate client sample code which compiles without warnings.
For 'rpcgen -a', generate a makefile where 'make clean all' works.
This commit is contained in:
parent
0673132dcb
commit
7c31e86bcb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259914
|
@ -776,6 +776,8 @@ clnt_output(const char *infile, const char *define, int extend, const char *outf
|
|||
free(include);
|
||||
} else
|
||||
f_print(fout, "#include <rpc/rpc.h>\n");
|
||||
f_print(fout, "#include <stdio.h>\n");
|
||||
f_print(fout, "#include <stdlib.h>\n");
|
||||
tell = ftell(fout);
|
||||
while ( (def = get_definition()) ) {
|
||||
has_program += write_sample_clnt(def);
|
||||
|
@ -863,6 +865,10 @@ static void mkfile_output(struct commandline *cmd)
|
|||
f_print(fout, "all : $(CLIENT) $(SERVER)\n\n");
|
||||
f_print(fout, "$(TARGETS) : $(SOURCES.x) \n");
|
||||
f_print(fout, "\trpcgen $(RPCGENFLAGS) $(SOURCES.x)\n\n");
|
||||
if (allfiles) {
|
||||
f_print(fout, "\trpcgen -Sc $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", clientname);
|
||||
f_print(fout, "\trpcgen -Ss $(RPCGENFLAGS) $(SOURCES.x) -o %s\n\n", servername);
|
||||
}
|
||||
f_print(fout, "$(OBJECTS_CLNT) : $(SOURCES_CLNT.c) $(SOURCES_CLNT.h) \
|
||||
$(TARGETS_CLNT.c) \n\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue