Home | History | Annotate | only in /src/usr.bin/rpcgen
History log of /src/usr.bin/rpcgen
RevisionDateAuthorComments
 1.15 03-Jun-2023  lukem bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
GCC_NO_warning
to
CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
 1.14 13-Oct-2019  mrg introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints. many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
 1.13 11-Aug-2013  dholland branches: 1.13.26;
WARNS=5
 1.12 14-Apr-2009  lukem branches: 1.12.6; 1.12.12;
Enable WARNS=4 by default for usr.bin, except for:
awk bdes checknr compile_et error gss hxtool kgetcred kinit
klist ldd less lex locale login m4 man menuc mk_cmds
mklocale msgc openssl rpcgen rpcinfo sdiff spell ssh
string2key telnet tn3270 verify_krb5_conf xlint
 1.11 18-May-2003  lukem branches: 1.11.42;
Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),
there's no need to special-case .include-ing it.
 1.10 14-Aug-2001  tv Add hooks to allow toolchain bits to be reachover-built at the top level.
 1.9 21-Mar-2001  mycroft Remove -g.
 1.8 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.7 23-Oct-1997  lukem remove CFLAGS+=-g
 1.6 19-Oct-1997  lukem branches: 1.6.2;
remove WARNS=1
 1.5 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 23-Aug-1993  jtc rpcgen is just a protocol compiler, it doesn't need -lrpc
 1.2 02-Aug-1993  mycroft Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.6.2.1 08-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.11.42.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.14 11-Aug-2013  dholland WARNS=5
 1.13 20-Jun-2004  jmc branches: 1.13.50; 1.13.56;
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.12 31-Jan-2002  tv branches: 1.12.4;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.11 26-Sep-2001  kleink Remove an extraneous opening brace from newstyle output, apparently missed
in rev. 1.6; fixes PR misc/14066.
 1.10 21-Mar-2001  mycroft Make `-N' and `-M' work together.
Fix more KNF and ANSI glitches.
 1.9 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.8 18-Oct-1997  lukem branches: 1.8.12;
KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.7 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.6 09-Oct-1997  mycroft More KNF.
 1.5 06-Jun-1997  jtk remove spurious comma in newstyle structure return case
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 06-Mar-1995  cgd convert to use memset, rather than bzero. From Luke Mewburn.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.8.12.1 27-Oct-2001  he Pull up revision 1.11 (via patch, requested by kleink):
Remove an extraneous opening brace from newstyle output.
Fixes PR#14066.
 1.12.4.1 22-Jun-2004  tron Pull up revision 1.13 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.13.56.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.50.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.39 07-Aug-2023  tnn rpcgen: don't pass length of source to string copy operation

Altough the prior code can't fail, GCC complains about the practice.
 1.38 23-Jan-2016  dholland u_int -> unsigned int, in some of the output.

In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
 1.37 20-Sep-2015  kamil Prefer error messages resolved from errno over handwritten ones.
 1.36 09-May-2015  dholland Use errx when malloc fails, and also don't cast the return value of
malloc/realloc.
 1.35 09-May-2015  dholland one crash -> errx Christos missed
 1.34 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.33 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.32 12-Aug-2013  christos CID 1062241: simplify free for coverity
 1.31 11-Aug-2013  dholland WARNS=5
 1.30 31-Aug-2011  plunky branches: 1.30.2; 1.30.8;
NULL does not need a cast
 1.29 11-May-2006  mrg xdr sucks. sprinkle some (void *) casts into it's functions taking void **,
and shut up GCC4.
 1.28 04-Apr-2006  christos Coverity CID 28: Fix resource leak.
 1.27 01-Nov-2004  dsl Add (unsigned char) cast to ctype functions
 1.26 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.25 16-Oct-2003  itojun branches: 1.25.2;
safer use of realloc
 1.24 11-Jun-2002  itojun err/errx/warn/warnx do not need \n at the end
 1.23 08-Jun-2002  yamt make auto const variables static.
 1.22 06-Feb-2002  christos Make sure that we set *objp back to the decoded argument; pointed by
by Ben Harris.
 1.21 05-Feb-2002  christos Deal with other sizeof() return issues. We usually cast it to u_int, because
this is what the rpc function argument passing expects, or use socklen_t
as appropriate...
 1.20 05-Feb-2002  christos - Cast pointer casts to (void *) first to shut-up lint
- Deal with variable size enums, by generating assignment to an enum_t variable.
- Use f_print everywhere instead of fprintf - when in Rome...
- I don't understand the value of the unexplained hack. Use IXDR_{U_,}INT32
instead of IXDR_{U_,}LONG.

With those changes our generated librpcsvc files pass lint.
 1.19 31-Jan-2002  tv Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
 1.18 29-Jan-2002  tv Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
 1.17 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.16 02-Jun-2000  fvdl branches: 1.16.2;
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.
 1.15 19-Dec-1998  christos branches: 1.15.2; 1.15.8;
extra braces, char -> unsigned char
 1.14 25-Aug-1998  ross Add { and } to shut up egcs. Reformat the more questionable code.
 1.13 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.12 17-Oct-1997  lukem - don't generate register variables
- always include syslog.h if -L; remove test for #ifdef SYSLOG
- create ANSI C function prototype in server write_program()
- clean up .Nm usage in man page
- document -L in man page
 1.11 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.10 09-Oct-1997  mycroft Fix more white space lossage.
 1.9 09-Oct-1997  mycroft Output the declaration for the loop index variable in the same block as the
rest of the vector inline code.
 1.8 09-Oct-1997  mycroft Fix another white space glitch.
 1.7 09-Oct-1997  mycroft Make the output more KNF-like, and only output the inlining variables when
needed.
 1.6 01-Oct-1996  cgd treat arrays used with XDR_INLINE as arrays of 'int32_t's, rather than
arrays of 'long's.
 1.5 29-Aug-1995  cgd pull stdlib.h and string.h in, for protos, where necessary
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.15.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.15.2.1 19-Oct-2000  he Pull up revision 1.17 (requested by he):
Format string cleanup.
 1.16.2.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.25.2.1 22-Jun-2004  tron Pull up revision 1.26 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.30.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.30.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25 23-Jan-2016  dholland u_int -> unsigned int, in some of the output.

In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
 1.24 20-Sep-2015  kamil Fix NULL pointer dereference

After the last function improvements there is invalid plist dereference
at the beginning of the second for () external loop. Move the proper check
inside the internal secound for () loop, after plist reinitialization.
 1.23 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.22 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.21 11-Aug-2013  dholland WARNS=5
 1.20 20-Jun-2004  jmc branches: 1.20.50; 1.20.56;
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.19 11-Jun-2002  itojun branches: 1.19.2;
err/errx/warn/warnx do not need \n at the end
 1.18 05-Feb-2002  christos Don't spit out a trailing comma as the last member of an enum.
 1.17 31-Jan-2002  tv Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
 1.16 29-Jan-2002  tv Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
 1.15 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.14 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.13 07-Jun-2000  lukem branches: 1.13.2;
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 <altteri.Vuorikoski@datafellows.com>
in [bin/6788], with some cosmetic mods by me.
 1.12 02-Jun-2000  fvdl 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.
 1.11 19-Oct-1998  wsanchez branches: 1.11.2; 1.11.8;
Remove spurious return
 1.10 08-Oct-1998  wsanchez Add return 0 after errx in to quiet the compiler
 1.9 11-Feb-1998  lukem revert; we can't break the existing ABI and API
 1.8 10-Feb-1998  lukem output explicit types (int16_t, int32_t, etc) rather than (short, long, ...)
 1.7 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.6 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.5 09-Oct-1997  mycroft Clean up some minor white space nonsense in the output.
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.11.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.2.1 19-Oct-2000  he Pull up revision 1.14 (requested by he):
Format string cleanup.
 1.13.2.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.19.2.1 22-Jun-2004  tron Pull up revision 1.20 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.20.56.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.50.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.45 04-Mar-2022  andvar fix few typos in comments for word "because".
 1.44 20-Sep-2015  kamil Prefer error messages resolved from errno over handwritten ones.
 1.43 20-Sep-2015  kamil Correct #ifdef/#endif header file guards generator for files with names
other than alphanumerical.

For example, for a file named config-subscriber.x we were generating a
symbol '_CONFIG-SUBSCRIBER_H'.

Since now all non alphanumerical characters will be converted to '_' and we
will prevent from generating symbols starting with "__", what's reserved
for the internal compiler code parsers and generators.
 1.42 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.41 09-May-2015  dholland #if 0 code should still compile :-)
 1.40 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.39 15-Dec-2013  wiz Sync usage and option descriptions with manpage.
 1.38 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.37 12-Aug-2013  joerg Add more __dead.
 1.36 11-Aug-2013  dholland WARNS=5
 1.35 05-Jun-2013  joerg If /usr/bin/cpp is not executable and RPCGEN_CPP was not set, try
/usr/bin/clang-cpp. This allows rpcgen to work in a clang-only release
build. Document hack to be resolved when the final decision about
/usr/bin/cpp and friends is made.
 1.34 31-Aug-2011  plunky branches: 1.34.2; 1.34.8;
NULL does not need a cast
 1.33 13-Apr-2009  lukem fix -Wshadow issue
 1.32 08-Mar-2008  christos branches: 1.32.10;
indentation police.
 1.31 29-Feb-2008  christos From FreeBSD via Jukka Salmi: Don't coredump on stdin.
 1.30 15-Jan-2008  christos branches: 1.30.2;
- Make the msdos and non-msdos cpp handling use the same variable $RPCGEN_CPP
instead of one using $CPP and the other using $RPCGENCPP, following suit with
RDIST_RSH, CVS_RSH, etc. and document it.
- make the msdos environment variable take precedence over path search.
 1.29 12-Jan-2008  dholland sizeof(char) is always 1. Conversely, however, CHAR_BIT is not always 8.
reviewed: mrg
 1.28 20-Mar-2006  elad branches: 1.28.12;
- plug leak in generate_guard()
- plug leak in h_output(), coverity cid 100
 1.27 01-Nov-2004  dsl Add (unsigned char) cast to ctype functions
 1.26 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.25 12-May-2004  christos add a 'v' flag to display a version number so that our usage matches with
everyone else's rpcgen.
 1.24 05-Aug-2003  martin branches: 1.24.2;
Remove special case handling for $CPP and use execvp() instead.
Patch from Hiramatsu Yoshifumi in PR bin/22311, with minor cosmetic
adjustment suggested by Luke Mewburn. OK'd by Frank van der Linden.
 1.23 14-Jul-2003  itojun use bounded string op - some remains
 1.22 31-Jan-2002  tv branches: 1.22.2;
Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
 1.21 29-Jan-2002  tv Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
 1.20 21-Mar-2001  mycroft Sample client needs stdio.h for printf() prototype.
 1.19 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.18 21-Feb-2001  cgd call setprogname(argv[0]) at start of main()
 1.17 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.16 02-Jun-2000  fvdl branches: 1.16.2;
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.
 1.15 19-Dec-1998  christos branches: 1.15.2; 1.15.8;
extra braces, char -> unsigned char
 1.14 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.13 17-Oct-1997  lukem - don't generate register variables
- always include syslog.h if -L; remove test for #ifdef SYSLOG
- create ANSI C function prototype in server write_program()
- clean up .Nm usage in man page
- document -L in man page
 1.12 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.11 09-Oct-1997  mycroft Clean up some minor white space nonsense in the output.
 1.10 09-Jan-1997  tls RCS ID police
 1.9 19-Feb-1996  pk Convey rpcgen's version into generated header files. This allows programs
to contain support for previous (and future) versions of rpcgen.

[ Note: the current version generates some function prototype templates
differently from rpcgen pre-dating June 1995.
]
 1.8 29-Aug-1995  cgd pull stdlib.h and string.h in, for protos, where necessary
 1.7 24-Jun-1995  pk Always distinguish client and server worker routines (used to be the
case only when compiling in ANSI (`-C') mode).
 1.6 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.5 20-Jan-1994  jtc Generated files were placed in the same directory as the source file
(instead of the current working directory) and #include directives
contained the path of the source file.
 1.4 01-Aug-1993  mycroft Add RCS identifiers.
 1.3 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.2 04-Apr-1993  cgd made CPP point to the right place. should check these things before commit.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.15.8.1 23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.15.2.1 19-Oct-2000  he Pull up revision 1.17 (requested by he):
Format string cleanup.
 1.16.2.2 07-Apr-2004  jmc Pullup rev 1.24 (requested by martin in ticket #124)

Remove special case handling for $CPP and use execvp() instead.
PR#22311
 1.16.2.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.22.2.1 15-Mar-2004  jmc Pullup rev 1.24 (requested by martin in ticket #1619)

Remove special case handling for $CPP and use execvp() instead.
 1.24.2.2 22-Jun-2004  tron Pull up revision 1.26 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.24.2.1 14-May-2004  jdc Pull up revision 1.25 (requested by christos in ticket #320).

add a 'v' flag to display a version number so that our usage matches with
everyone else's rpcgen.
 1.28.12.1 23-Mar-2008  matt sync with HEAD
 1.30.2.1 24-Mar-2008  keiichi sync with head.
 1.32.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.34.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.34.8.1 23-Jun-2013  tls resync from head
 1.34.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23 11-Jan-2022  andvar fix few typos in comments.
 1.22 23-Jan-2016  dholland u_int -> unsigned int, in some of the output.

In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
 1.21 09-May-2015  dholland Remove pointless casts.
 1.20 09-May-2015  dholland Make error() printflike instead of using sprintf before calling it.
 1.19 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.18 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.17 11-Aug-2013  dholland WARNS=5
 1.16 06-May-2009  ginsbach branches: 1.16.6; 1.16.12;
Add support for hyper and quad keywords. (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.) [From FreeBSD and OpenSolaris]
 1.15 04-Apr-2006  christos branches: 1.15.30;
Coverity CID 97: Remove dead code.
 1.14 20-Mar-2006  elad plug leak, coverity cid 98.
 1.13 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.12 05-Feb-2002  christos branches: 1.12.4;
cast ~0 to (u_int) because it is aimed at the size argument of the xdr function.
 1.11 31-Jan-2002  tv Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.10 15-Dec-1999  bouyer Bump a static char array from 8 to 255. Avoids rpcgen core dumps on some
long struct name.
XXX There are a lot of static arrays in there, bounds should be checked
XXX more carrefuly. All of them seems big enouth (>100) for normal use, though.
 1.9 11-Feb-1998  lukem branches: 1.9.2; 1.9.6;
revert; we can't break the existing ABI and API
 1.8 10-Feb-1998  lukem output explicit types (int16_t, int32_t, etc) rather than (short, long, ...)
 1.7 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.6 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.5 29-Aug-1995  cgd pull stdlib.h and string.h in, for protos, where necessary
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1 16-Dec-1999  he Pull up revision 1.10 (requested by bouyer):
Avoid rpcgen coredumps with a structure argument bigger than 8.
 1.12.4.1 22-Jun-2004  tron Pull up revision 1.13 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.15.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.16.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.5 11-Aug-2013  dholland WARNS=5
 1.4 11-Oct-1997  christos branches: 1.4.70; 1.4.76;
- Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.3 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.4.76.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.70.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.12 11-Aug-2013  dholland WARNS=5
 1.11 06-Jul-2004  mycroft branches: 1.11.50; 1.11.56;
Fix function calls in the sample server to use the right function name.
From PR 4411.
 1.10 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.9 31-Jan-2002  tv branches: 1.9.4;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.8 21-Mar-2001  mycroft Make `-N' and `-M' work together.
Fix more KNF and ANSI glitches.
 1.7 21-Mar-2001  mycroft Remove an unneeded variable.
 1.6 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.5 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.4 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.3 09-Oct-1997  mycroft Clean up some minor white space nonsense in the output.
 1.2 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.1 11-Jun-1995  pk branches: 1.1.1;
Initial revision
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.9.4.2 10-Jul-2004  tron Pull up revision 1.11 (requested by mycroft in ticket #615):
Fix function calls in the sample server to use the right function name.
From PR 4411.
 1.9.4.1 22-Jun-2004  tron Pull up revision 1.10 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.11.56.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.50.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15 09-May-2015  dholland Make error() printflike instead of using sprintf before calling it.
 1.14 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.13 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.12 11-Aug-2013  dholland WARNS=5
 1.11 06-May-2009  ginsbach branches: 1.11.6; 1.11.12;
Add support for hyper and quad keywords. (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.) [From FreeBSD and OpenSolaris]
 1.10 20-Mar-2006  elad branches: 1.10.30;
plug leak, coverity cid 94.
 1.9 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.8 31-Jan-2002  tv branches: 1.8.4;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.7 19-Dec-1998  christos extra braces, char -> unsigned char
 1.6 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.5 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.4 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.8.4.1 22-Jun-2004  tron Pull up revision 1.9 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.10.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.11.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.9 11-Aug-2013  dholland WARNS=5
 1.8 06-May-2009  ginsbach branches: 1.8.6; 1.8.12;
Add support for hyper and quad keywords. (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.) [From FreeBSD and OpenSolaris]
 1.7 27-Oct-2003  lukem branches: 1.7.42;
Overhaul how `build.sh tools' are used:

* Rename "config.h" to "nbtool_config.h" and
HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
This makes in more obvious in the source when we're using
tools/compat/config.h versus "standard autoconf" config.h

* Consistently move the inclusion of nbtool_config.h to before
<sys/cdefs.h> so that the former can provide __RCSID() (et al),
and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
to the top of the source files (for the general case).
 1.6 31-Jan-2002  tv Roll in fixes to permit cross-compiling from non-NetBSD hosts. This
round has been tested on Solaris/x86 and Linux hosts.

* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
 1.5 29-Jan-2002  tv Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
 1.4 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.3 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.7.42.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.8.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32 18-Jun-2024  christos Add prototype for the foo_freeresult() functions used in the thread-safe
versions of the code (Anthony Mallet)
 1.31 08-Nov-2015  christos Delete extra declaration of svc_fdset... And some commented out code.
This badly needs some modernization.
 1.30 20-Sep-2015  kamil Correct newstyle code generation

For newstyle we used to generate oldstyle code. This bug has been fixed in
FreeBSD on 13 Dec 1995 by wpaul.

https://github.com/freebsd/freebsd/commit/15a1e09c3d41cb01afc70a2ea4d20c5a0d09348a

Reviewed by <christos>, <pgoyette>
 1.29 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.28 09-May-2015  dholland Also check the other emitted getrlimit call for failure.
 1.27 09-May-2015  christos CID 1225082: Check getrlimit() return
 1.26 15-Dec-2013  christos Put back the extra prototype for main(); some programs #define main to
something else, so we need the extra prototype.
 1.25 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.24 11-Aug-2013  dholland WARNS=5
 1.23 31-Aug-2011  plunky branches: 1.23.2; 1.23.8;
NULL does not need a cast
 1.22 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.21 26-Sep-2003  wiz branches: 1.21.2;
Definition, not defintion. From miod@openbsd.
 1.20 14-Jul-2003  itojun use bounded string op - some remains
 1.19 25-Jun-2003  christos In no-main mode [rpcgen -C -m], don't declare _rpcfoo variables static.
Let the main program declare them extern if it wants, otherwise we get
link failures for variables not defined.
 1.18 20-Jan-2003  simonb The Double-Semi-Colon Police.
 1.17 31-Oct-2002  christos PR/18866: David A. Holland: missing const keyword in rpcgen output
 1.16 05-Feb-2002  christos Deal with other sizeof() return issues. We usually cast it to u_int, because
this is what the rpc function argument passing expects, or use socklen_t
as appropriate...
 1.15 31-Jan-2002  tv Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.14 21-Mar-2001  mycroft Make `-N' and `-M' work together.
Fix more KNF and ANSI glitches.
 1.13 21-Mar-2001  mycroft Fix a couple of things that disagree with Solaris.
 1.12 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.11 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.10 18-Oct-1997  lukem branches: 1.10.4; 1.10.12;
KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.9 17-Oct-1997  lukem - don't generate register variables
- always include syslog.h if -L; remove test for #ifdef SYSLOG
- create ANSI C function prototype in server write_program()
- clean up .Nm usage in man page
- document -L in man page
 1.8 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.7 24-Jun-1995  pk Always distinguish client and server worker routines (used to be the
case only when compiling in ANSI (`-C') mode).
 1.6 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.5 06-Mar-1995  cgd convert to use memset, rather than bzero. From Luke Mewburn.
 1.4 24-Dec-1994  cgd casts, so that output is a bit happier with prototyped rpc headers.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.10.12.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.10.4.1 19-Oct-2000  he Pull up revision 1.11 (requested by he):
Format string cleanup.
 1.21.2.1 22-Jun-2004  tron Pull up revision 1.22 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.23.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15 23-Jan-2016  dholland u_int -> unsigned int, in some of the output.

In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
 1.14 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.13 11-Aug-2013  dholland WARNS=5
 1.12 31-Aug-2011  plunky branches: 1.12.2; 1.12.8;
NULL does not need a cast
 1.11 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.10 05-Feb-2002  christos branches: 1.10.4;
Deal with other sizeof() return issues. We usually cast it to u_int, because
this is what the rpc function argument passing expects, or use socklen_t
as appropriate...
 1.9 31-Jan-2002  tv Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.8 11-Oct-2000  is More format string cleanup by sommerfeld.
 1.7 18-Oct-1997  lukem branches: 1.7.4; 1.7.12;
KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.6 11-Oct-1997  mycroft And a little more...
 1.5 11-Oct-1997  mycroft Fix the format of the output slightly.
 1.4 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.3 24-Jun-1995  pk Always distinguish client and server worker routines (used to be the
case only when compiling in ANSI (`-C') mode).
 1.2 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.1 11-Jun-1995  pk branches: 1.1.1;
Initial revision
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.7.12.1 18-Oct-2000  tv Pullup usr.bin string format fixes [is].
See "cvs log" for explicit revision numbers per file, from sommerfeld.
 1.7.4.1 19-Oct-2000  he Pull up revision 1.8 (requested by he):
Format string cleanup.
 1.10.4.1 22-Jun-2004  tron Pull up revision 1.11 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.12.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.18 20-Sep-2015  kamil Prefer error messages resolved from errno over handwritten ones.
 1.17 09-May-2015  dholland Make error() printflike instead of using sprintf before calling it.
 1.16 09-May-2015  dholland Use errx when malloc fails, and also don't cast the return value of
malloc/realloc.
 1.15 09-May-2015  dholland Polish the error messages.

Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
 1.14 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.13 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.12 11-Aug-2013  dholland WARNS=5
 1.11 31-Aug-2011  plunky branches: 1.11.2; 1.11.8;
NULL does not need a cast
 1.10 20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
 1.9 31-Jan-2002  tv branches: 1.9.4;
Protect __RCSID and __COPYRIGHT from being invoked if not defined.
 1.8 18-Oct-1997  lukem KNFify, generate prototypes, etc (to shut up WARNS on generated code)
 1.7 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.6 29-Aug-1995  cgd pull stdlib.h and string.h in, for protos, where necessary
 1.5 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.4 06-Mar-1995  cgd convert to use memset, rather than bzero. From Luke Mewburn.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Cleanup for GCC 2.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.9.4.1 22-Jun-2004  tron Pull up revision 1.10 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
 1.11.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12 13-May-2015  joerg Mark error as dead.
 1.11 09-May-2015  dholland Make error() printflike instead of using sprintf before calling it.
 1.10 09-May-2015  dholland Use proper (enough) parentheses in macro expansion.
 1.9 09-May-2015  christos modernize:
- make crash() called atexit
- use err/errx
- remove __P
 1.8 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.7 12-Aug-2013  joerg Add more __dead.
 1.6 11-Aug-2013  dholland WARNS=5
 1.5 21-Mar-2001  mycroft branches: 1.5.58; 1.5.64;
Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.4 11-Oct-1997  christos - Rename "inline" variable to "doinline" so that we don't need -ansi
- Fix gcc warnings and add netbsd rcsid's
- add WARNS to the Makefile
- Add errx() to unhandled cases where appropriate.
 1.3 11-Jun-1995  pk Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.5.64.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.58.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26 17-Jun-2024  uwe rpcgen(1): brush up markup a bit
 1.25 16-Jun-2024  rillig rpcgen.1: add missing punctuation
 1.24 15-Dec-2013  wiz Standardize SYNOPSIS. Sort option descriptions and remove duplicates.
 1.23 15-Dec-2013  christos - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
 1.22 11-Mar-2009  joerg branches: 1.22.6; 1.22.12;
Fix markup
 1.21 19-Jan-2008  hubertf branches: 1.21.12;
It's RPCGEN_CPP, not RPCGEN_RSH
Pointed out on tech-userlevel by Anthony Mallet <anthony.mallet@useless-ficus.net>
 1.20 15-Jan-2008  christos - Make the msdos and non-msdos cpp handling use the same variable $RPCGEN_CPP
instead of one using $CPP and the other using $RPCGENCPP, following suit with
RDIST_RSH, CVS_RSH, etc. and document it.
- make the msdos environment variable take precedence over path search.
 1.19 12-May-2004  wiz branches: 1.19.18;
Sort options; drop trailing space and a superfluous s.
 1.18 12-May-2004  christos One step closer to reality:
- missing flags described
- synopsis was wrong
- explain -b better
 1.17 12-May-2004  kleink No need to document -b twice; from mrg.
 1.16 11-May-2004  kleink Sync with reality: -b hasn't been the default for almost 4 years.
 1.15 25-Feb-2003  wiz branches: 1.15.2;
.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.14 06-Jan-2003  wiz Bump date for -b, -I addition; drop trailing whitespace; separate SEE ALSO
entries with a comma.
 1.13 05-Jan-2003  sommerfeld Document some previously undocumented options.
 1.12 30-Sep-2002  grant New sentence, new line.
 1.11 08-Dec-2001  wiz Use Sx, use standard headers, drop a .Pp.
 1.10 04-Apr-2001  wiz Update date (-M added some time ago). Markup and punctuation fixes.
Move SEE ALSO section in correct place.
 1.9 21-Mar-2001  mycroft Add a -M flag, for generating thread-safe stubs, per RedHat.
Also clean up some KNF and ANSI C glitches in -Sc and -Ss output.
 1.8 28-Apr-1998  fair Fix man to mdoc conversion mistakes, mostly of the form ^\.[A-Z][A-Z]
 1.7 17-Oct-1997  lukem - don't generate register variables
- always include syslog.h if -L; remove test for #ifdef SYSLOG
- create ANSI C function prototype in server write_program()
- clean up .Nm usage in man page
- document -L in man page
 1.6 09-Jan-1997  tls RCS ID police
 1.5 11-Jun-1995  pk branches: 1.5.2;
Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
 1.4 01-Aug-1993  mycroft Add RCS indentifiers.
 1.3 10-Jun-1993  jtc convert manpages to -mandoc macros
 1.2 03-May-1993  mycroft s/\\(lq/``/;s/\\(rq/''/
 1.1 03-Apr-1993  glass branches: 1.1.1;
Added rpcgen(1)
 1.1.1.1 11-Jun-1995  pk Newer version of rpcgen from Sun's TIRPC release.
 1.5.2.1 05-Dec-1995  jtc environmental -> environment
 1.15.2.3 14-May-2004  jdc Pull up revision 1.18 (requested by christos in ticket #320).

One step closer to reality:
- missing flags described
- synopsis was wrong
- explain -b better
 1.15.2.2 13-May-2004  jdc Pull up revision 1.17 (requested by kleink in ticket #317)

No need to document -b twice; from mrg.
 1.15.2.1 12-May-2004  jmc Pullup rev 1.16 (requested by kleink in ticket #314)

Sync with reality: -b hasn't been the default for almost 4 years.
 1.19.18.1 23-Mar-2008  matt sync with HEAD
 1.21.12.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.22.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed