CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: christos Date: Tue Jun 18 21:31:35 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpc_svcout.c Log Message: Add prototype for the foo_freeresult() functions used in the thread-safe versions of the code (Anthony Mallet) To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/rpcgen/rpc_svcout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpc_svcout.c diff -u src/usr.bin/rpcgen/rpc_svcout.c:1.31 src/usr.bin/rpcgen/rpc_svcout.c:1.32 --- src/usr.bin/rpcgen/rpc_svcout.c:1.31 Sat Nov 7 20:59:31 2015 +++ src/usr.bin/rpcgen/rpc_svcout.c Tue Jun 18 17:31:35 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_svcout.c,v 1.31 2015/11/08 01:59:31 christos Exp $ */ +/* $NetBSD: rpc_svcout.c,v 1.32 2024/06/18 21:31:35 christos 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 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI"; #else -__RCSID("$NetBSD: rpc_svcout.c,v 1.31 2015/11/08 01:59:31 christos Exp $"); +__RCSID("$NetBSD: rpc_svcout.c,v 1.32 2024/06/18 21:31:35 christos Exp $"); #endif #endif @@ -353,7 +353,18 @@ write_program(definition *def, const cha pvname(def->def_name, vp->vers_num); f_print(fout, "(struct svc_req *%s, ", RQSTP); f_print(fout, "SVCXPRT *%s);\n", TRANSP); + + if (Mflag) { + if (storage != NULL) { +f_print(fout, "%s ", storage); + } + f_print(fout, "int "); + pvname(def->def_name, vp->vers_num); + f_print(fout, "_freeresult" + "(SVCXPRT *, xdrproc_t, caddr_t);\n"); + } f_print(fout, "\n"); + if (storage != NULL) { f_print(fout, "%s ", storage); }
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: christos Date: Tue Jun 18 21:31:35 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpc_svcout.c Log Message: Add prototype for the foo_freeresult() functions used in the thread-safe versions of the code (Anthony Mallet) To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/usr.bin/rpcgen/rpc_svcout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: uwe Date: Mon Jun 17 01:28:31 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpcgen.1 Log Message: rpcgen(1): brush up markup a bit To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/rpcgen/rpcgen.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpcgen.1 diff -u src/usr.bin/rpcgen/rpcgen.1:1.25 src/usr.bin/rpcgen/rpcgen.1:1.26 --- src/usr.bin/rpcgen/rpcgen.1:1.25 Sun Jun 16 22:21:57 2024 +++ src/usr.bin/rpcgen/rpcgen.1 Mon Jun 17 01:28:31 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: rpcgen.1,v 1.25 2024/06/16 22:21:57 rillig Exp $ +.\" $NetBSD: rpcgen.1,v 1.26 2024/06/17 01:28:31 uwe Exp $ .\" from: @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89 .\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved. .Dd December 14, 2013 @@ -12,7 +12,7 @@ .Ar infile .Nm .Op Fl AaBbILMNTv -.Op Fl D Ar name Op =value +.Op Fl D Ar name Ns Op Li = Ns Ar value .Op Fl i Ar size .Op Fl K Ar secs .Op Fl Y Ar pathname @@ -23,9 +23,9 @@ .Fl l Li | .Fl m Li | .Fl t Li | -.Fl S\ Li | -.Fl S\ -.\" .Fl S\ +.Fl \ Li | +.Fl \ +.\" .Fl \ .Op Fl o Ar outfile .Op Ar infile .Nm @@ -72,14 +72,14 @@ it will also generate the dispatch table in .Pa proto_tbl.i . With the -.Fl S\ +.Fl \ option, it will also generate sample code which would illustrate how to use the remote procedures on the client side. This code would be created in .Pa proto_client.c . With the -.Fl S\ +.Fl \ option, it will also generate a sample server code which would illustrate how to write the remote procedures. @@ -87,10 +87,12 @@ This code would be created in .Pa proto_server.c . .Pp The server created can be started both by the port monitors -(for example, -.Em inetd +.Po +for example, +.Xr inetd 8 or -.Em listen ) +.Xr listen 1M \" sic! System V +.Pc or by itself. When it is started by a port monitor, it creates servers only for the transport for which @@ -114,7 +116,7 @@ file. the transports are chosen at run time and not at compile time. When the server is self-started, it backgrounds itself by default. -A special define symbol +A special preprocessor symbol .Dv RPC_SVC_FG can be used to run the server process in foreground. .Pp @@ -123,7 +125,7 @@ for the creation of more sophisticated .Tn RPC servers. These features include support for user provided -.Li #defines +.Li #define Ns s and .Tn RPC dispatch tables. @@ -131,12 +133,14 @@ The entries in the .Tn RPC dispatch table contain: .Pp +.\" XXX: uwe: -dash has too much space after the dash and causes the +.\" first item to exceed the page width in text mode. .Bl -inset -offset indent -compact -.It + +.It - pointers to the service routine corresponding to that procedure, -.It + +.It - a pointer to the input and output arguments, -.It + +.It - the size of these routines .El .Pp @@ -164,7 +168,7 @@ executed with the .Fl n option, it creates a server for the transport specified by -.Em netid . +.Ar netid . If .Ar infile is not specified, @@ -180,7 +184,7 @@ For each type of output file, defines a special preprocessor symbol for use by the .Nm programmer: -.Bl -tag -width RPC_CLNT +.Bl -tag -offset indent -width Dv .It Dv RPC_HDR defined when compiling into header files .It Dv RPC_XDR @@ -198,7 +202,7 @@ dispatch tables .El .Pp Any line beginning with -.Sq % +.Ql % is passed directly into the output file, uninterpreted by .Nm . @@ -208,7 +212,7 @@ For every data type referred to in .Nm assumes that there exists a routine with the string -.Dq xdr_ +.Ql xdr_ prepended to the name of the data type. If this routine does not exist in the .Tn RPC/XDR @@ -218,7 +222,7 @@ allows customization of .Tn XDR routines. .Sh OPTIONS -.Bl -tag -width indent +.Bl -tag -width Fl .It Fl A Generate an .Fn svc_caller @@ -226,16 +230,24 @@ function. .It Fl a Generate all the files including sample code for client and server side. .It Fl B -Generate BSD cplusplus macros (__BEGIN_DECLS, __END_DECLS). +Generate BSD cplusplus macros +.Pq Dv __BEGIN_DECLS , Dv __END_DECLS . .It Fl b -Compile stubs in "backwards compatible" mode, disabling support for +Compile stubs in +.Dq backwards compatible +mode, disabling support for transport-independent RPC. +.Bd -filled -offset indent +.Em Note : The .Fl b -should always be specified when generating files for +should +.Em always +be specified when generating files for .Nx , since there is no transport-independent RPC support in .Nx . +.Ed .It Fl c Compile into .Tn XDR @@ -244,12 +256,12 @@ routines. Define a symbol .Dv name . Equivalent to the -.Dv #define +.Li #define directive in the source. If no -.Dv value +.Ar value is given, -.Dv value +.Ar value is defined as 1. This option may be specified more than once. .It Fl h @@ -284,16 +296,16 @@ That interval can be changed using the .Fl K
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: uwe Date: Mon Jun 17 01:28:31 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpcgen.1 Log Message: rpcgen(1): brush up markup a bit To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.bin/rpcgen/rpcgen.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: rillig Date: Sun Jun 16 22:21:57 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpcgen.1 Log Message: rpcgen.1: add missing punctuation To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/rpcgen/rpcgen.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: rillig Date: Sun Jun 16 22:21:57 UTC 2024 Modified Files: src/usr.bin/rpcgen: rpcgen.1 Log Message: rpcgen.1: add missing punctuation To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/usr.bin/rpcgen/rpcgen.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpcgen.1 diff -u src/usr.bin/rpcgen/rpcgen.1:1.24 src/usr.bin/rpcgen/rpcgen.1:1.25 --- src/usr.bin/rpcgen/rpcgen.1:1.24 Sun Dec 15 09:18:14 2013 +++ src/usr.bin/rpcgen/rpcgen.1 Sun Jun 16 22:21:57 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: rpcgen.1,v 1.24 2013/12/15 09:18:14 wiz Exp $ +.\" $NetBSD: rpcgen.1,v 1.25 2024/06/16 22:21:57 rillig Exp $ .\" from: @(#)rpcgen.new.1 1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89 .\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved. .Dd December 14, 2013 @@ -174,7 +174,7 @@ accepts the standard input. The C preprocessor, .Xr cpp 1 is run on the input file before it is actually interpreted by -.Nm +.Nm . For each type of output file, .Nm defines a special preprocessor symbol for use by the
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: tnn Date: Mon Aug 7 21:12:02 UTC 2023 Modified Files: src/usr.bin/rpcgen: rpc_cout.c Log Message: rpcgen: don't pass length of source to string copy operation Altough the prior code can't fail, GCC complains about the practice. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/rpcgen/rpc_cout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/rpcgen/rpc_cout.c diff -u src/usr.bin/rpcgen/rpc_cout.c:1.38 src/usr.bin/rpcgen/rpc_cout.c:1.39 --- src/usr.bin/rpcgen/rpc_cout.c:1.38 Sat Jan 23 02:33:09 2016 +++ src/usr.bin/rpcgen/rpc_cout.c Mon Aug 7 21:12:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rpc_cout.c,v 1.38 2016/01/23 02:33:09 dholland Exp $ */ +/* $NetBSD: rpc_cout.c,v 1.39 2023/08/07 21:12:02 tnn 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 @@ -38,7 +38,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.38 2016/01/23 02:33:09 dholland Exp $"); +__RCSID("$NetBSD: rpc_cout.c,v 1.39 2023/08/07 21:12:02 tnn Exp $"); #endif #endif @@ -186,7 +186,9 @@ print_ifopen(int indent, const char *nam 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); + strlcpy(_t_kludge, name, sizeof(_t_kludge)); + char *underscore = strchr(_t_kludge, '_'); + *underscore = 0; name = _t_kludge; } tabify(fout, indent);
CVS commit: src/usr.bin/rpcgen
Module Name:src Committed By: tnn Date: Mon Aug 7 21:12:02 UTC 2023 Modified Files: src/usr.bin/rpcgen: rpc_cout.c Log Message: rpcgen: don't pass length of source to string copy operation Altough the prior code can't fail, GCC complains about the practice. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/usr.bin/rpcgen/rpc_cout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/rpcgen
On Sat, May 09, 2015 at 11:16:51PM +, David A. Holland wrote: Module Name: src Committed By: dholland Date: Sat May 9 23:16:51 UTC 2015 Modified Files: src/usr.bin/rpcgen: rpc_cout.c rpc_util.c Log Message: Use errx when malloc fails, and also don't cast the return value of malloc/realloc. emalloc? Joerg