summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-06-06 17:38:37 +0000
committerbdrewery <bdrewery@FreeBSD.org>2014-06-06 17:38:37 +0000
commit62b9eccfc3b1f1171b36982a45f8e49ef52c8e6b (patch)
tree07f2421ebc3aa48508add47fb27dfdfc94d0099b /usr.bin
parentba820990ea98d46071114256fb6121e782284b45 (diff)
downloadFreeBSD-src-62b9eccfc3b1f1171b36982a45f8e49ef52c8e6b.zip
FreeBSD-src-62b9eccfc3b1f1171b36982a45f8e49ef52c8e6b.tar.gz
Fix some rpcgen sample file issues.
* -Sc was generating code without a return type on main. * -Sm was generating an unusable clean target due to undefined RM. * -Sm was generating clean target with extra preceding space. PR: 185582 Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com> MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rpcgen/rpc_main.c4
-rw-r--r--usr.bin/rpcgen/rpc_sample.c1
2 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c
index bf53a28..b7b255a 100644
--- a/usr.bin/rpcgen/rpc_main.c
+++ b/usr.bin/rpcgen/rpc_main.c
@@ -878,8 +878,8 @@ $(TARGETS_SVC.c) \n\n");
f_print(fout, "\t$(CC) -o $(CLIENT) $(OBJECTS_CLNT) \
$(LDLIBS) \n\n");
f_print(fout, "$(SERVER) : $(OBJECTS_SVC) \n");
- f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n ");
- f_print(fout, "clean:\n\t $(RM) -f core $(TARGETS) $(OBJECTS_CLNT) \
+ f_print(fout, "\t$(CC) -o $(SERVER) $(OBJECTS_SVC) $(LDLIBS)\n\n");
+ f_print(fout, "clean:\n\t rm -f core $(TARGETS) $(OBJECTS_CLNT) \
$(OBJECTS_SVC) $(CLIENT) $(SERVER)\n\n");
}
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index 3a4e392..6a2bef8 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -270,6 +270,7 @@ write_sample_clnt_main(void)
version_list *vp;
f_print(fout, "\n\n");
+ f_print(fout, "int\n");
f_print(fout, "main(int argc, char *argv[])\n{\n");
f_print(fout, "\tchar *host;");
OpenPOWER on IntegriCloud