Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/rpcgen Enable the TI-RPC switch by default. Add a kl...



details:   https://anonhg.NetBSD.org/src/rev/67fa4a4c87b9
branches:  trunk
changeset: 487101:67fa4a4c87b9
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Jun 02 23:30:17 2000 +0000

description:
Enable the TI-RPC switch by default. Add a kludge that Sun appears to
use for the names of the XDR functions to take care of rpc*_t.

diffstat:

 usr.bin/rpcgen/rpc_cout.c |  15 +++++++++++++--
 usr.bin/rpcgen/rpc_hout.c |   6 +++---
 usr.bin/rpcgen/rpc_main.c |   8 +++-----
 3 files changed, 19 insertions(+), 10 deletions(-)

diffs (99 lines):

diff -r 25ab03f4e77c -r 67fa4a4c87b9 usr.bin/rpcgen/rpc_cout.c
--- a/usr.bin/rpcgen/rpc_cout.c Fri Jun 02 23:23:27 2000 +0000
+++ b/usr.bin/rpcgen/rpc_cout.c Fri Jun 02 23:30:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_cout.c,v 1.15 1998/12/19 21:19:11 christos Exp $   */
+/*     $NetBSD: rpc_cout.c,v 1.16 2000/06/02 23:30:17 fvdl 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_cout.c 1.13 89/02/22 (C) 1987 SMI";
 #else
-__RCSID("$NetBSD: rpc_cout.c,v 1.15 1998/12/19 21:19:11 christos Exp $");
+__RCSID("$NetBSD: rpc_cout.c,v 1.16 2000/06/02 23:30:17 fvdl Exp $");
 #endif
 #endif
 
@@ -193,6 +193,17 @@
        int     indent;
        char   *name;
 {
+       char _t_kludge[32];
+
+       /*
+        * XXX Solaris seems to strip the _t. No idea why.
+        */
+       if (!strcmp(name, "rpcprog_t") || !strcmp(name, "rpcvers_t") ||
+           !strcmp(name, "rpcproc_t") || !strcmp(name, "rpcprot_t") ||
+           !strcmp(name, "rpcport_t") || !strcmp(name, "rpcpinline_t")) {
+               strncpy(_t_kludge, name, strlen(name) - 2);
+               name = _t_kludge;
+       }
        tabify(fout, indent);
        f_print(fout, "if (!xdr_%s(xdrs", name);
 }
diff -r 25ab03f4e77c -r 67fa4a4c87b9 usr.bin/rpcgen/rpc_hout.c
--- a/usr.bin/rpcgen/rpc_hout.c Fri Jun 02 23:23:27 2000 +0000
+++ b/usr.bin/rpcgen/rpc_hout.c Fri Jun 02 23:30:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_hout.c,v 1.11 1998/10/19 00:43:59 wsanchez Exp $   */
+/*     $NetBSD: rpc_hout.c,v 1.12 2000/06/02 23:30:17 fvdl 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.11 1998/10/19 00:43:59 wsanchez Exp $");
+__RCSID("$NetBSD: rpc_hout.c,v 1.12 2000/06/02 23:30:17 fvdl Exp $");
 #endif
 #endif
 
@@ -241,7 +241,7 @@
        char   *name;
        char   *num;
 {
-       f_print(fout, "#define %s ((u_long)%s)\n", name, num);
+       f_print(fout, "#define %s %s\n", name, num);
 }
 
 static int
diff -r 25ab03f4e77c -r 67fa4a4c87b9 usr.bin/rpcgen/rpc_main.c
--- a/usr.bin/rpcgen/rpc_main.c Fri Jun 02 23:23:27 2000 +0000
+++ b/usr.bin/rpcgen/rpc_main.c Fri Jun 02 23:30:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc_main.c,v 1.15 1998/12/19 21:19:12 christos Exp $   */
+/*     $NetBSD: rpc_main.c,v 1.16 2000/06/02 23:30:18 fvdl Exp $       */
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -35,7 +35,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.15 1998/12/19 21:19:12 christos Exp $");
+__RCSID("$NetBSD: rpc_main.c,v 1.16 2000/06/02 23:30:18 fvdl Exp $");
 #endif
 #endif
 
@@ -130,7 +130,7 @@
 int     newstyle;              /* newstyle of passing arguments (by value) */
 int     Cflag = 0;             /* ANSI C syntax */
 static int allfiles;           /* generate all files */
-int     tirpcflag = 0;         /* generating code for tirpc, by default */
+int     tirpcflag = 1;         /* generating code for tirpc, by default */
 
 #ifdef __MSDOS__
 static char *dos_cppfile = NULL;
@@ -643,8 +643,6 @@
                f_print(fout, "#include <sys/types.h>\n");
 
        f_print(fout, "#include <memory.h>\n");
-       if (tirpcflag)
-               f_print(fout, "#include <stropts.h>\n");
 
        if (inetdflag || !tirpcflag) {
                f_print(fout, "#include <sys/socket.h>\n");



Home | Main Index | Thread Index | Old Index