Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/rpcgen fix the function prototypes in the generated ...



details:   https://anonhg.NetBSD.org/src/rev/6b61d1793349
branches:  trunk
changeset: 487414:6b61d1793349
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 07 13:53:07 2000 +0000

description:
fix the function prototypes in the generated header file (the second
arg should have been a pointer); without this you'd get a complaint
about a mismatch between the prototype in the header file and the
function declaration in foo_xdr.c.

fix by Vltteri Vuorikoski%datafellows.com@localhost <altteri.Vuorikoski%datafellows.com@localhost>
in [bin/6788], with some cosmetic mods by me.

diffstat:

 usr.bin/rpcgen/rpc_hout.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r 8c767808b427 -r 6b61d1793349 usr.bin/rpcgen/rpc_hout.c
--- a/usr.bin/rpcgen/rpc_hout.c Wed Jun 07 13:50:40 2000 +0000
+++ b/usr.bin/rpcgen/rpc_hout.c Wed Jun 07 13:53:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_hout.c,v 1.12 2000/06/02 23:30:17 fvdl Exp $       */
+/*     $NetBSD: rpc_hout.c,v 1.13 2000/06/07 13:53:07 lukem Exp $      */
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_hout.c,v 1.12 2000/06/02 23:30:17 fvdl Exp $");
+__RCSID("$NetBSD: rpc_hout.c,v 1.13 2000/06/07 13:53:07 lukem Exp $");
 #endif
 #endif
 
@@ -131,11 +131,11 @@
        f_print(fout, "#ifdef __cplusplus\n");
        f_print(fout, "extern \"C\" bool_t xdr_%s(XDR *, %s%s);\n",
            name,
-           name, pointerp ? ("*") : "");
+           name, pointerp ? (" *") : "");
        f_print(fout, "#elif __STDC__\n");
        f_print(fout, "extern  bool_t xdr_%s(XDR *, %s%s);\n",
            name,
-           name, pointerp ? ("*") : "");
+           name, pointerp ? (" *") : "");
        f_print(fout, "#else /* Old Style C */\n");
        f_print(fout, "bool_t xdr_%s();\n", name);
        f_print(fout, "#endif /* Old Style C */\n\n");
@@ -176,7 +176,7 @@
                        }
                        f_print(fout, "};\n");
                        f_print(fout, "typedef struct %s %s;\n", name, name);
-                       pxdrfuncdecl(name, NULL);
+                       pxdrfuncdecl(name, 1);
                        f_print(fout, "\n");
                }
        }



Home | Main Index | Thread Index | Old Index