Commit Graph

44 Commits

Author SHA1 Message Date
kamil 21207296f6 Prefer error messages resolved from errno over handwritten ones. 2015-09-20 16:57:13 +00:00
kamil ca8a5c231b 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.
2015-09-20 16:39:04 +00:00
dholland ceecfabaa7 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.
2015-05-09 23:12:57 +00:00
dholland d1ac143f58 #if 0 code should still compile :-) 2015-05-09 22:58:22 +00:00
christos 8cde9e3d9b modernize:
- make crash() called atexit
	- use err/errx
	- remove __P
2015-05-09 21:44:47 +00:00
wiz 95452ff947 Sync usage and option descriptions with manpage. 2013-12-15 09:18:31 +00:00
christos 0213edf018 - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
2013-12-15 00:40:17 +00:00
joerg 2c7fa37363 Add more __dead. 2013-08-12 14:03:18 +00:00
dholland e9067f113d WARNS=5 2013-08-11 08:03:10 +00:00
joerg 8ca7e152f2 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.
2013-06-05 13:54:26 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
lukem f10a8652a4 fix -Wshadow issue 2009-04-13 06:42:25 +00:00
christos f3e1b062a3 indentation police. 2008-03-08 19:49:08 +00:00
christos 915f599cbf From FreeBSD via Jukka Salmi: Don't coredump on stdin. 2008-02-29 22:27:15 +00:00
christos e451ddaaa8 - 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.
2008-01-15 20:04:48 +00:00
dholland cbae618808 sizeof(char) is always 1. Conversely, however, CHAR_BIT is not always 8.
reviewed: mrg
2008-01-12 05:49:46 +00:00
elad 6bceef66d3 - plug leak in generate_guard()
- plug leak in h_output(), coverity cid 100
2006-03-20 16:58:13 +00:00
dsl d0ad315f4f Add (unsigned char) cast to ctype functions 2004-11-01 21:39:32 +00:00
jmc b2f782612f 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
2004-06-20 22:20:14 +00:00
christos b1f894b9cc add a 'v' flag to display a version number so that our usage matches with
everyone else's rpcgen.
2004-05-12 15:59:54 +00:00
martin e6583feed7 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.
2003-08-05 21:26:55 +00:00
itojun 347022e133 use bounded string op - some remains 2003-07-14 11:52:24 +00:00
tv 9fbd88883c 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.
2002-01-31 22:43:33 +00:00
tv a328e34106 Make almost all tools compile and run properly on non-NetBSD hosts. (In
particular, most tools now run correctly on Solaris 7.)
2002-01-29 10:20:28 +00:00
mycroft b174b0ec84 Sample client needs stdio.h for printf() prototype. 2001-03-21 05:52:11 +00:00
mycroft b1bad8f693 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.
2001-03-21 00:30:39 +00:00
cgd 040de26f85 call setprogname(argv[0]) at start of main() 2001-02-21 00:06:22 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
fvdl 21a52aab9e 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.
2000-06-02 23:30:17 +00:00
christos e4ac7024d0 extra braces, char -> unsigned char 1998-12-19 21:19:11 +00:00
lukem 99071d1bef KNFify, generate prototypes, etc (to shut up WARNS on generated code) 1997-10-18 10:53:37 +00:00
lukem 03e194f678 - 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
1997-10-17 15:51:48 +00:00
christos 935794817d - 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.
1997-10-11 21:01:26 +00:00
mycroft eefe653830 Clean up some minor white space nonsense in the output. 1997-10-09 15:13:19 +00:00
tls 9d225a1783 RCS ID police 1997-01-09 20:18:21 +00:00
pk 8f3621c4b6 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.
]
1996-02-19 11:12:43 +00:00
cgd e9b16ab034 pull stdlib.h and string.h in, for protos, where necessary 1995-08-29 23:05:49 +00:00
pk ee0767da08 Always distinguish client and server worker routines (used to be the
case only when compiling in ANSI (`-C') mode).
1995-06-24 14:59:41 +00:00
pk 71a0fb455d Clean up import & propagate NetBSD changes.
Add RCS Ids.
Fix a number of bugs.
Note: this version supports ANSI C code generation.
1995-06-11 21:49:50 +00:00
jtc 8f9bfdc56a 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.
1994-01-20 18:21:56 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft f19d90d7fe Cleanup for GCC 2. 1993-04-19 07:28:01 +00:00
cgd b7ecca3b78 made CPP point to the right place. should check these things before commit. 1993-04-04 12:37:24 +00:00
glass 8f0abce1cd Added rpcgen(1) 1993-04-03 00:51:49 +00:00