aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/rpcgen
Commit message (Collapse)AuthorAgeFilesLines
* packages: rename elftoolchain to toolchain, add more thingsLexi Winter2025-05-281-0/+1
| | | | | | | | | | | | | | Rename the existing "elftoolchain" package to "toolchain", and move everything which is gated by MK_TOOLCHAIN (e.g. lex, yacc, ...) to the toolchain package. This means we have one package called "toolchain" which contains all the development-related utilities which are not compilers or already part of some other package (e.g., llvm). Reviewed by: des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50286
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* sccs: Manual changesWarner Losh2023-11-2710-64/+0
| | | | | | | | | | | | | | | For the uncommon items: Go through the tree and remove sccs tags that didn't fit any nice pattern. If in the neighborhood, other SCM tags were removed when they were detritis of long-ago CVS somehow in the early mists of the project. Some adjacent copyrights stringswere removed (they duplicated the copyright notices in the file). This also removed non-standard formations of omission of SCCS tags (usually by adding an extra #if 0 somewhere. After this commit, a number of strings tagged with the 'what' @(#) prefix remain, but they are primarily copyright notices. Sponsored by: Netflix
* usr.bin: Remove ancient SCCS tags.Warner Losh2023-11-2714-24/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* Remove $FreeBSD$: one-line nroff patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1610-20/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* rpcgen: Perform shell-style word expansion on RPCGEN_CPPJessica Clarke2023-07-141-8/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until recently, CPP has been a list of space-separated words, with no quotes, backslashes or other characters with special meaning to a shell. However, as of 8fad2cda93c7, (escaped) quotes appear in CPP, and the rudimentary parser in rpcgen is insufficient, since it will leave the escaped quotes as escaped rather than performing one level of expansion as would be done by a shell (whether in a script or a Makefile). Rather than hack around this in all the places RPCGEN_CPP gets set, implement proper expansion inside rpcgen. Note that this only deals with a subset of shell syntax, since we don't handle any of: | & ; < > ( ) $ ` * ? [ # ˜ = % having special meaning (with the exception of how a backslash behaves inside double quotes, where \$ means a literal $ inside double quotes but \a means a literal \a), instead using their literal value, but those are all reasonable restrictions, and can be worked around by avoiding their use; what's important is that we get the quoting and splitting right. This fixes -Winvalid-pp-token spew during build${libcompat}. Reviewed by: brooks Fixes: 8fad2cda93c7 ("bsd.compat.mk: Provide new CPP and sub-make variables") Differential Revision: https://reviews.freebsd.org/D41013
* rpcgen: Clarify behaviour for idxJessica Clarke2023-07-131-4/+4
| | | | | | The re-initialisation of idx in the later else branch is a bit hidden, and results in deviation from the earlier two paths. Use more consistent code instead to make it abundantly clear what's going on.
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* Additions to targets/pseudo/host-toolsSimon J. Gerraty2023-04-272-0/+17
| | | | | More tools needed to be built for Linux. These are the ones that "just work".
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* rpcgen: Unindent a line not guarded by if (mtflag).John Baldwin2022-12-051-1/+1
| | | | | | | | | mtflag is used to add pthread mutex locking around operations to make them thread-safe. Setting the state to _SERVED is not conditional on locking. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37541
* rpcgen: Don't free() a pointer after realloc().John Baldwin2022-12-051-1/+0
| | | | | | | | A successful realloc() already frees the old pointer. Reported by: GCC -Wuse-after-free Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37540
* rpcgen: make compiler arglist allocation dynamicBrooks Davis2019-10-151-31/+30
| | | | | | | | | | | | | | | | | | Limit argmax to an absurdly large value prevent overflow (no overflow possible on FreeBSD due to ARG_MAX). In CheriBSD we exceed the 19 non-NULL arguments in the static array. Add a simple size doubling allocator and increase the default to 32. GC remnants of support for fixed arguments. Reviewed by: archardson (prior version), James Clarke (prior version) MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D21971 Notes: svn path=/head/; revision=353569
* Free some variables before they go out of scope.Warner Losh2017-12-281-1/+5
| | | | | | | CID: 92074, 270099 Notes: svn path=/head/; revision=327266
* Plug two resource leaks.Warner Losh2017-12-282-0/+2
| | | | | | | CID: 92077, 92074 Notes: svn path=/head/; revision=327265
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* rpcgen(1): Check getrlimit() return for generated code.Pedro F. Giffuni2017-01-121-2/+7
| | | | | | | | Obtained from: NetBSD (CVS rev 1.27, 1.28) MFC after: 1 week Notes: svn path=/head/; revision=311981
* rpcgen(1): Avoid unused variable warning on generated code.Pedro F. Giffuni2017-01-111-1/+2
| | | | | | | | | | | | Avoid "unused variable 'i'" warnings in generated .c files by only emitting the "int i;" for non-opaque arrays. Opaque arrays use xdr_opaque() rather than iterating over the array. Obtained from: OpenBSD (CVS rev 1.28) MFC after: 1 week Notes: svn path=/head/; revision=311947
* Remove dead code in rpc_parse.cAlan Somers2017-01-041-10/+0
| | | | | | | | | | | | | | It's been dead ever since it was imported from TI-RPC in 1995. The dead code is still present in Illumos today, but was removed from NetBSD in 2006. Reported by: Coverity CID: 270097 Obtained from: NetBSD MFC after: 4 weeks Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=311292
* Use nitems() from sys/param.h.Marcelo Araujo2016-08-161-2/+2
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=304226
* rpcgen(1): Tag crash() routine as __dead2 for static analyzersConrad Meyer2016-05-122-2/+2
| | | | | | | | | Suggested by: Coverity CID: 1305464 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299509
* Use NULL for pointers.Marcelo Araujo2016-04-181-1/+1
| | | | | | | | | | strrchr(3) will return NULL if the character does not appears in the string. MFC after: 2 weeks. Notes: svn path=/head/; revision=298183
* Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni2016-04-155-6/+6
| | | | Notes: svn path=/head/; revision=298089
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-1/+1
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-192-2/+3
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge headSimon J. Gerraty2014-04-282-1/+6
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync from headSimon J. Gerraty2012-11-043-4/+4
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | rpcgen: fix use use of strcmpEitan Adler2015-04-191-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | strcmp only guarantee that it will return at least 1 if the string B is greater than that of string A. Notes: svn path=/head/; revision=281724
* | | | Fix some rpcgen sample file issues.Bryan Drewery2014-06-062-2/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * -Sc was generating code without a return type on main. * -Sm was generating an unusable clean target due to undefined RM. * -Sm was generating clean target with extra preceding space. PR: 185582 Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=267174
* | | mdoc: minor paragraph fixes.Joel Dahl2014-02-081-1/+0
| | | | | | | | | | | | Notes: svn path=/head/; revision=261634
* | | Generate client sample code which compiles without warnings.Doug Rabson2013-12-261-0/+6
| |/ |/| | | | | | | | | | | For 'rpcgen -a', generate a makefile where 'make clean all' works. Notes: svn path=/head/; revision=259914
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-193-4/+4
|/ | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. Notes: svn path=/head/; revision=241737
* In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), soDimitry Andric2012-02-061-8/+2
| | | | | | | | | | | rpcgen will search the current PATH for the preprocessor. This makes it possible to run a preprocessor built during the cross-tools stage of buildworld. MFC after: 1 week Notes: svn path=/head/; revision=231101
* Amend r231079 by properly shifting up the existing arguments inDimitry Andric2012-02-061-1/+1
| | | | | | | | | | | rpc_main.c's insarg() function. I had forgotten to put this in my patch queue, sorry. Pointy hat to: me MFC after: 1 week Notes: svn path=/head/; revision=231080
* Let rpcgen(1) support an environment variable RPCGEN_CPP to find the CDimitry Andric2012-02-062-31/+47
| | | | | | | | | | | | | | | | | | | | | preprocessor to run. Previously, it always ran /usr/bin/cpp, unless you used the -Y option, and even then you could not set the basename. It also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this is obsolete, and has been removed. Note that setting RPCGEN_CPP to a command with arguments is supported, though the command line parsing is simplistic. However, setting it to e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc and clang in -E mode will consider files with unknown extensions (such as .x) as object files, and attempt to link them. This could be worked around by also adding "-x c", but it is much safer to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead. MFC after: 1 week Notes: svn path=/head/; revision=231079
* In usr.bin/rpcgen/rpc_main.c, properly check the return value ofDimitry Andric2012-02-051-3/+5
| | | | | | | | | strlcpy(), in addition to checking that of strlcat(). MFC after: 1 week Notes: svn path=/head/; revision=231054
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-6/+2
| | | | | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls. Notes: svn path=/head/; revision=229403
* Spelling fixes for usr.bin/Ulrich Spörlein2011-12-301-1/+1
| | | | Notes: svn path=/head/; revision=228992
* Use strlcpy().Xin LI2011-07-111-15/+11
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=223922
* Fix clang warnings.Ben Laurie2011-05-183-4/+4
| | | | | | | | | Note: these were actually bugs (printf with no format string). Approved by: philip (mentor) Notes: svn path=/head/; revision=222080