You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
(15) |
Apr
(7) |
May
(14) |
Jun
(21) |
Jul
|
Aug
|
Sep
|
Oct
(13) |
Nov
(10) |
Dec
|
| 2010 |
Jan
|
Feb
(13) |
Mar
(39) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
(56) |
| 2011 |
Jan
(4) |
Feb
(15) |
Mar
(24) |
Apr
(1) |
May
(1) |
Jun
(45) |
Jul
(22) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(3) |
Dec
(1) |
| 2012 |
Jan
|
Feb
(23) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(9) |
Aug
(4) |
Sep
|
Oct
|
Nov
(77) |
Dec
|
| 2013 |
Jan
(1) |
Feb
(6) |
Mar
(10) |
Apr
(10) |
May
(14) |
Jun
(1) |
Jul
(8) |
Aug
(3) |
Sep
(9) |
Oct
(4) |
Nov
(43) |
Dec
(26) |
| 2014 |
Jan
(8) |
Feb
(2) |
Mar
(13) |
Apr
(3) |
May
(11) |
Jun
(2) |
Jul
(16) |
Aug
(12) |
Sep
(1) |
Oct
(1) |
Nov
(9) |
Dec
(66) |
| 2015 |
Jan
(6) |
Feb
(16) |
Mar
(11) |
Apr
(58) |
May
(84) |
Jun
(96) |
Jul
(62) |
Aug
(48) |
Sep
(76) |
Oct
(35) |
Nov
(19) |
Dec
|
| 2016 |
Jan
(10) |
Feb
(12) |
Mar
(16) |
Apr
(16) |
May
(17) |
Jun
(16) |
Jul
|
Aug
(14) |
Sep
(2) |
Oct
(1) |
Nov
(34) |
Dec
(2) |
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(3) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
|
Nov
(10) |
Dec
(2) |
| 2018 |
Jan
(23) |
Feb
(16) |
Mar
(17) |
Apr
(26) |
May
(16) |
Jun
(43) |
Jul
(32) |
Aug
(13) |
Sep
(17) |
Oct
(10) |
Nov
(3) |
Dec
(7) |
| 2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(9) |
Jul
(2) |
Aug
|
Sep
(12) |
Oct
(21) |
Nov
(8) |
Dec
(12) |
| 2020 |
Jan
(24) |
Feb
(8) |
Mar
(1) |
Apr
(18) |
May
(14) |
Jun
(24) |
Jul
(9) |
Aug
|
Sep
|
Oct
(5) |
Nov
(3) |
Dec
(3) |
| 2021 |
Jan
|
Feb
(5) |
Mar
(4) |
Apr
|
May
(6) |
Jun
(5) |
Jul
(1) |
Aug
(15) |
Sep
(1) |
Oct
|
Nov
|
Dec
(4) |
| 2022 |
Jan
(5) |
Feb
(7) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(15) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(6) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(2) |
Dec
|
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(19) |
Sep
(2) |
Oct
(18) |
Nov
(4) |
Dec
(2) |
| 2025 |
Jan
(4) |
Feb
(12) |
Mar
|
Apr
|
May
(5) |
Jun
(12) |
Jul
(5) |
Aug
(42) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2026 |
Jan
(13) |
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Steve D. <st...@re...> - 2026-04-27 15:13:18
|
Hello, On 4/27/26 7:04 AM, Lionel Cons wrote: > Did any of the libtirpc forks ever implemented RDMA support? No... It is more of a kernel thing than an library thing, if I'm understanding your question. steved. |
|
From: Lionel C. <lio...@gm...> - 2026-04-27 11:04:15
|
Did any of the libtirpc forks ever implemented RDMA support? Lionel |
|
From: Steve D. <st...@re...> - 2026-02-14 21:29:16
|
Hello, My apologies for the delayed response... On 1/27/26 4:33 PM, Markus Mayer via Libtirpc-devel wrote: > Hello again, > > Any thoughts or updates on this? > > I believe that getrpcbyname() and getrpcbynumber() should be enabled > without the user having to specify "--enable-rpcdb", especially since > the build error that results from omitting it will only be found later > on when building rpcbind, by which point it might become quite a > hassle to identify the root cause and the fix. > > Maybe a "--disable-rpcdb" flag would be more appropriate for those who > want to explicitly disable this functionality. I am assuming most > users would want it to be enabled, so that should be the default. > > If that sounds undesirable, "--enable-rpcdb" could be retained, with > the intention of enabling /etc/rpc support, but without it affecting > whether getrpcbyname() and getrpcbynumber() are provided by libtirpc. > Instead, it should rely on "configure" to make that call, just like it > used to. I do understand your point... My question is what would break if --enable-rpcdb defaulted to yes, instead of no? steved. > > Thanks, > -Markus > > On Thu, 8 Jan 2026 at 14:44, Markus Mayer <mm...@br...> wrote: >> >> Hi all, >> >> We have come across a build issue with libtirpc-1.3.7 that was not >> present with libtirpc-1.3.6. It happens only with a certain toolchain >> / libc combination and is due to the introduction of the >> "--enable-rpcdb" configure option.[1] >> >> The build is now failing with our LLVM + musl-libc toolchain. As far >> as I can tell, the issue isn't related to LLVM but caused by the fact >> that musl-libc does not provide getrpcbyname() and getrpcbynumber(). >> Specifically, rpcbind will fail to link with the new libtirpc. The >> error looks like this: >> >> gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 >> -O2 -g0 -I/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/include/tirpc >> -o rpcinfo src/rpcinfo.o >> -L/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/lib >> -ltirpc >> ld.lld: error: undefined symbol: getrpcbynumber >>>>> referenced by security.c >>>>> src/security.o:(logit) >> clang-13: error: linker command failed with exit code 1 (use -v to see >> invocation) >> make[2]: *** [Makefile:534: rpcbind] Error 1 >> make[2]: *** Waiting for unfinished jobs.... >> ld.lld: error: undefined symbol: getrpcbynumber >>>>> referenced by rpcinfo.c >>>>> src/rpcinfo.o:(main) >>>>> referenced by rpcinfo.c >>>>> src/rpcinfo.o:(main) >>>>> referenced by rpcinfo.c >>>>> src/rpcinfo.o:(pmapdump) >>>>> referenced 3 more times >> >> ld.lld: error: undefined symbol: getrpcbyname >>>>> referenced by rpcinfo.c >>>>> src/rpcinfo.o:(getprognum) >> clang-13: error: linker command failed with exit code 1 (use -v to see >> invocation) >> >> So, while the build error happens with rpcbind, the root cause lies >> with libtirpc. >> >> With libtirpc-1.3.6, this was not an issue, because it would detect at >> configure time that it needed to provide getrpcbyname() & co, and so >> rpcbind would link just fine. Configure in 1.3.7 is still detecting >> correctly that getrpcbyname() & co. are missing, but it will do >> nothing about it unless "--enable-rpcdb" is given on the command line. >> Without "--enable-rpcdb", getrpcent.c will not be compiled in, >> regardless of configure's findings, so the missing functions will not >> be provided, and the link stage of rpcbind will fail. >> >> Of course, this can be worked around by specifying "--enable-rpcdb" >> when calling "configure" for libtirpc, but it is still a regression. >> The build of another tool (rpcbind), which has remained unchanged, >> suddenly fails, because libtirpc was upgraded from 1.3.6 to 1.3.7. >> >> If I understand the commit message correctly, the change in question >> was introduced to fix linker issues, specifically with LLD. Curiously, >> we are now *experiencing* linker issues with LLD as a result of this >> change (not that it is LLD's fault at all in this case). >> >> Is there a way the original goal of the fix can be preserved while at >> the same time also not causing the kind of linker problem we are >> seeing? Would it work to have "configure" enable getrpcent.c whenever >> it detects getrpcbyname() & co are missing without requiring a flag >> given by the user? It doesn't seem right that it correctly detects the >> functions are missing, but still won't include them, even though it >> could. >> >> Please let me know if there are some things I should try out or some >> experiments I should run. >> >> Thanks, >> -Markus >> >> [1] https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commitdiff;h=7cea8ad66aec > > > _______________________________________________ > Libtirpc-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libtirpc-devel > |
|
From: Markus M. <mm...@br...> - 2026-01-27 22:29:16
|
Hello again, Any thoughts or updates on this? I believe that getrpcbyname() and getrpcbynumber() should be enabled without the user having to specify "--enable-rpcdb", especially since the build error that results from omitting it will only be found later on when building rpcbind, by which point it might become quite a hassle to identify the root cause and the fix. Maybe a "--disable-rpcdb" flag would be more appropriate for those who want to explicitly disable this functionality. I am assuming most users would want it to be enabled, so that should be the default. If that sounds undesirable, "--enable-rpcdb" could be retained, with the intention of enabling /etc/rpc support, but without it affecting whether getrpcbyname() and getrpcbynumber() are provided by libtirpc. Instead, it should rely on "configure" to make that call, just like it used to. Thanks, -Markus On Thu, 8 Jan 2026 at 14:44, Markus Mayer <mm...@br...> wrote: > > Hi all, > > We have come across a build issue with libtirpc-1.3.7 that was not > present with libtirpc-1.3.6. It happens only with a certain toolchain > / libc combination and is due to the introduction of the > "--enable-rpcdb" configure option.[1] > > The build is now failing with our LLVM + musl-libc toolchain. As far > as I can tell, the issue isn't related to LLVM but caused by the fact > that musl-libc does not provide getrpcbyname() and getrpcbynumber(). > Specifically, rpcbind will fail to link with the new libtirpc. The > error looks like this: > > gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 > -O2 -g0 -I/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/include/tirpc > -o rpcinfo src/rpcinfo.o > -L/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/lib > -ltirpc > ld.lld: error: undefined symbol: getrpcbynumber > >>> referenced by security.c > >>> src/security.o:(logit) > clang-13: error: linker command failed with exit code 1 (use -v to see > invocation) > make[2]: *** [Makefile:534: rpcbind] Error 1 > make[2]: *** Waiting for unfinished jobs.... > ld.lld: error: undefined symbol: getrpcbynumber > >>> referenced by rpcinfo.c > >>> src/rpcinfo.o:(main) > >>> referenced by rpcinfo.c > >>> src/rpcinfo.o:(main) > >>> referenced by rpcinfo.c > >>> src/rpcinfo.o:(pmapdump) > >>> referenced 3 more times > > ld.lld: error: undefined symbol: getrpcbyname > >>> referenced by rpcinfo.c > >>> src/rpcinfo.o:(getprognum) > clang-13: error: linker command failed with exit code 1 (use -v to see > invocation) > > So, while the build error happens with rpcbind, the root cause lies > with libtirpc. > > With libtirpc-1.3.6, this was not an issue, because it would detect at > configure time that it needed to provide getrpcbyname() & co, and so > rpcbind would link just fine. Configure in 1.3.7 is still detecting > correctly that getrpcbyname() & co. are missing, but it will do > nothing about it unless "--enable-rpcdb" is given on the command line. > Without "--enable-rpcdb", getrpcent.c will not be compiled in, > regardless of configure's findings, so the missing functions will not > be provided, and the link stage of rpcbind will fail. > > Of course, this can be worked around by specifying "--enable-rpcdb" > when calling "configure" for libtirpc, but it is still a regression. > The build of another tool (rpcbind), which has remained unchanged, > suddenly fails, because libtirpc was upgraded from 1.3.6 to 1.3.7. > > If I understand the commit message correctly, the change in question > was introduced to fix linker issues, specifically with LLD. Curiously, > we are now *experiencing* linker issues with LLD as a result of this > change (not that it is LLD's fault at all in this case). > > Is there a way the original goal of the fix can be preserved while at > the same time also not causing the kind of linker problem we are > seeing? Would it work to have "configure" enable getrpcent.c whenever > it detects getrpcbyname() & co are missing without requiring a flag > given by the user? It doesn't seem right that it correctly detects the > functions are missing, but still won't include them, even though it > could. > > Please let me know if there are some things I should try out or some > experiments I should run. > > Thanks, > -Markus > > [1] https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commitdiff;h=7cea8ad66aec |
|
From: Yair L. <yai...@gm...> - 2026-01-26 19:24:31
|
The reason I'm proposing this solution is to get feedback from other members - I would not classify it as "putting the cart before the horse". If the team/community prefer that that TIRPC should stay "frozen" - with the exact same set of features/API that were approved in RFC 4506/1832 (2006, 1995), and that the path for approval is via RFCs - that's is clear feedback for my proposal. Thanks for you input/feedback, Yair On Mon, Jan 26, 2026 at 5:07 PM Chuck Lever <chu...@or...> wrote: > On 1/26/26 3:14 AM, Yair Lenga wrote: > > Hi. > > > > I agree with you about the "long chain to pull". There is no practical > > option of changing the RFC, or to convince ALL the implementations out > > there to accept new functions. > > > > On the flip side, I believe that there is value in enhancing the library > > (in a way that does not break backward compatibility). The benefit I see > > (for this improvement, and potentially other improvements) is for > > actively developed applications, which are based on actively > > developed distributions (Ubunton, RedHat, ...). > > Linux is not the only implementation of TI-RPC. Adding a non-standard > API to the Linux TI-RPC library will make any application that uses it > non-portable, unless the other TI-RPC implementations also adopt it. > > The whole point of the structure of the libtirpc API is that it provides > a /portable/ RPC API. Clearly we can provide any API we like on Linux. > The value of libtirpc is that it aligns well with the same APIs on > other platforms. > > I'd like to see demonstration that the benefit of providing this helper > API outweighs the costs to developers for having to deal with a feature > that is available only on one platform. I bet libtirpc might already > have one or two Linux-only features. It would be helpful to contrast and > compare so that we can get a sense of what value is added by them and > that we then remain consistent with already-established patterns. > > > > So I can see two options - I can make another fork of TIRPC - enhance > > it, and hope that users will find the change, evaluate it and will take > > the risk of jumping from a vendor supported version into unknown fork > > (VERY UNLIKELY), or try to work with the main TIRPC repos which are used > > by most platform - and get the change accepted - which is what I'm > > trying to do. > > > > You are correct that making it part of RPCGEN (as opposed to using > > #define macros) will make it easier to adapt this function. I believe > > Thorsten Kukuk, who took over maintaining RPCGEN (when glibc removed the > > RPCGEN/SUNRPC) is on this mailing list. I am very HOPEFUL that there can > > be a similar path to also evolve RPCGEN - but this is not required for > > this feature to be usable. > > > > Emphasizing: > > * No plan to get TIRPC/RPCGEN to "compete" with protobuf, AVRO or any of > > the other modern implementations. Goal is to extend the life of existing > > applications that use RPCGEN/SUNRPC - to benefit from significant > > performance improvements with minimal effort, without having to go > > through massive rewriting. > > * I've already implemented the changes on my own systems (with forked > > RPCGEN). My motivation is make it easy for other application to leverage > > those benefits with minimal effort. > > So adding a new API to a library because only you feel it might be > useful is putting the cart before the horse. Let's see some demand for > it first. Otherwise the risk for us is that we have added something that > will become nothing more than community technical debt. > > > -- > Chuck Lever > |
|
From: Chuck L. <chu...@or...> - 2026-01-26 15:07:25
|
On 1/26/26 3:14 AM, Yair Lenga wrote: > Hi. > > I agree with you about the "long chain to pull". There is no practical > option of changing the RFC, or to convince ALL the implementations out > there to accept new functions. > > On the flip side, I believe that there is value in enhancing the library > (in a way that does not break backward compatibility). The benefit I see > (for this improvement, and potentially other improvements) is for > actively developed applications, which are based on actively > developed distributions (Ubunton, RedHat, ...). Linux is not the only implementation of TI-RPC. Adding a non-standard API to the Linux TI-RPC library will make any application that uses it non-portable, unless the other TI-RPC implementations also adopt it. The whole point of the structure of the libtirpc API is that it provides a /portable/ RPC API. Clearly we can provide any API we like on Linux. The value of libtirpc is that it aligns well with the same APIs on other platforms. I'd like to see demonstration that the benefit of providing this helper API outweighs the costs to developers for having to deal with a feature that is available only on one platform. I bet libtirpc might already have one or two Linux-only features. It would be helpful to contrast and compare so that we can get a sense of what value is added by them and that we then remain consistent with already-established patterns. > So I can see two options - I can make another fork of TIRPC - enhance > it, and hope that users will find the change, evaluate it and will take > the risk of jumping from a vendor supported version into unknown fork > (VERY UNLIKELY), or try to work with the main TIRPC repos which are used > by most platform - and get the change accepted - which is what I'm > trying to do. > > You are correct that making it part of RPCGEN (as opposed to using > #define macros) will make it easier to adapt this function. I believe > Thorsten Kukuk, who took over maintaining RPCGEN (when glibc removed the > RPCGEN/SUNRPC) is on this mailing list. I am very HOPEFUL that there can > be a similar path to also evolve RPCGEN - but this is not required for > this feature to be usable. > > Emphasizing: > * No plan to get TIRPC/RPCGEN to "compete" with protobuf, AVRO or any of > the other modern implementations. Goal is to extend the life of existing > applications that use RPCGEN/SUNRPC - to benefit from significant > performance improvements with minimal effort, without having to go > through massive rewriting. > * I've already implemented the changes on my own systems (with forked > RPCGEN). My motivation is make it easy for other application to leverage > those benefits with minimal effort. So adding a new API to a library because only you feel it might be useful is putting the cart before the horse. Let's see some demand for it first. Otherwise the risk for us is that we have added something that will become nothing more than community technical debt. -- Chuck Lever |
|
From: Yair L. <yai...@gm...> - 2026-01-26 08:15:09
|
Hi.
I agree with you about the "long chain to pull". There is no practical
option of changing the RFC, or to convince ALL the implementations out
there to accept new functions.
On the flip side, I believe that there is value in enhancing the library
(in a way that does not break backward compatibility). The benefit I see
(for this improvement, and potentially other improvements) is for actively
developed applications, which are based on actively developed distributions
(Ubunton, RedHat, ...).
So I can see two options - I can make another fork of TIRPC - enhance it,
and hope that users will find the change, evaluate it and will take the
risk of jumping from a vendor supported version into unknown fork (VERY
UNLIKELY), or try to work with the main TIRPC repos which are used by most
platform - and get the change accepted - which is what I'm trying to do.
You are correct that making it part of RPCGEN (as opposed to using #define
macros) will make it easier to adapt this function. I believe Thorsten
Kukuk, who took over maintaining RPCGEN (when glibc removed the
RPCGEN/SUNRPC) is on this mailing list. I am very HOPEFUL that there can be
a similar path to also evolve RPCGEN - but this is not required for this
feature to be usable.
Emphasizing:
* No plan to get TIRPC/RPCGEN to "compete" with protobuf, AVRO or any of
the other modern implementations. Goal is to extend the life of existing
applications that use RPCGEN/SUNRPC - to benefit from significant
performance improvements with minimal effort, without having to go through
massive rewriting.
* I've already implemented the changes on my own systems (with forked
RPCGEN). My motivation is make it easy for other application to leverage
those benefits with minimal effort.
Regards,
Yair
On Sun, Jan 25, 2026 at 7:33 PM Chuck Lever <chu...@or...> wrote:
> There are multiple independent implementations of the TI-RPC API
> on various operating systems. Are you planning to introduce this
> new feature for those as well?
>
> RPC applications that use special features that are not available
> everywhere immediately become non-portable.
>
> There is no standard fixed-string type in the XDR language (RFC
> 4506 appendix II) . Do you have plans to modify rpcgen to recognize
> the new type and generate code for it?
>
> I think you should provide the facility you need for your own
> application. The process of creating a fixed-string standard type
> (updating RFC 4506) and then getting other TI-RPC implementations
> to adopt it, then creating documentation... that's a very long
> chain to pull.
>
>
> On 1/24/26 3:52 AM, Yair Lenga wrote:
> > Chuck,
> >
> > Thanks for feedback.
> >
> > From my experience, the behavior of the array serialization is
> understood by experienced developers with understanding of the underlining
> protocol. But this is not true for the “average” c developer, who view the
> rpcgen/xdr as a “black box”. For those, very easy to fall into the “trap” I
> described, resulting in inefficient network transfer, with no clear
> documented alternative.
> >
> > The xdr-string that you mentioned works only with dynamically allocated
> strings (malloc based). In many application, the overhead of
> strdup/free/malloc, and the complexities for remembering to free any string
> / risk of leaking memory are too high, and there is strong preference to
> use char [n] - no malloc, no leaks, simple strcpy/strlcpy. The
> xdr-fixed-string will extend the benefit of this encoding to char[x]
> strings.
> >
> > Just an example. In financial application the type “currency”, will be
> char[4] - 16 bytes with xdr-array, 8 bytes for xdr-string and the new
> xdr-fixed string.
> >
> > Out of curiosity - are you using xdr/rpc in an application context ? I’m
> trying to get a feeling of how many applications are “out there” using
> rpcgen/xdr.
> >
> > Regards,
> > Yair.
> >
> > Sent from my iPad
> >
> >> On Jan 23, 2026, at 20:47, Chuck Lever via Libtirpc-devel <
> lib...@li...> wrote:
> >>
> >> On 1/22/26 4:00 AM, Yair Lenga wrote:
> >>> David Hayden suggested that I will post additional information about
> the
> >>> motivation for the new xdr_fixedstring.
> >>>
> >>> The main motivation for putting xdr-fixedstring is efficiency. In my
> >>> project we are using rpc for Hugh speed communication between c
> >>> programs. Most developers do not understand the underlying encoding so
> >>> that will write
> >>>
> >>> Struct Foo {
> >>> Char s[100]
> >>> }
> >>>
> >>> To represent a string without realizing this will result in send 400
> >>> bytes on the wire, even for
> >>> Strcpy(Foo.s, "USD")
> >>> clnt_call(..., &foo...)
> >>
> >> This behavior might be because that is how rpcgen deals with arrays
> >> defined the way you do it here.
> >>
> >> Each array element is aligned to 32-bits. So any element type that is
> >> shorter than that, or whose size is not aligned to 4 octets, wastes
> >> space in the wire representation.
> >>
> >> IMHO libtirpc should stick with providing the XDR types that are
> >> defined and specified in RFC 4506. That will provide the best
> >> guarantee of interoperability between heterogeneous platforms.
> >>
> >>
> >>> With xdr_fixedstring on foo.s, - it gets compacted to 8 bytes (1 int
> for
> >>> the size, then 1 int for 3 bytes, zero padded). Very similar encoding
> >>> like the xdr_wrapstring - in term of size. In my project, when we moved
> >>> to the fixedstring xdr functions, we have realized dramatic performance
> >>> improvement - order of magnitude. At this time, the solution need some
> >>> "support" - we use macro on the ".x" to simplify the flow for
> >>> developers, so that they can write
> >>>
> >>> Struct Foo {
> >>> fixedchar(s, 100) ;
> >>> }
> >>>
> >>> Which gets translated to xdr_fixedstring(xdrs, obj->s, sizeof(obj->s))
> >>> in the generated stub. No magic - just some C macros.
> >>
> >> There is a string type specified in RFC 4506 that does not have
> >> the array packing problem. Can that be used instead?
>
> --
> Chuck Lever
>
|
|
From: Chuck L. <chu...@or...> - 2026-01-25 17:34:01
|
There are multiple independent implementations of the TI-RPC API
on various operating systems. Are you planning to introduce this
new feature for those as well?
RPC applications that use special features that are not available
everywhere immediately become non-portable.
There is no standard fixed-string type in the XDR language (RFC
4506 appendix II) . Do you have plans to modify rpcgen to recognize
the new type and generate code for it?
I think you should provide the facility you need for your own
application. The process of creating a fixed-string standard type
(updating RFC 4506) and then getting other TI-RPC implementations
to adopt it, then creating documentation... that's a very long
chain to pull.
On 1/24/26 3:52 AM, Yair Lenga wrote:
> Chuck,
>
> Thanks for feedback.
>
> From my experience, the behavior of the array serialization is understood by experienced developers with understanding of the underlining protocol. But this is not true for the “average” c developer, who view the rpcgen/xdr as a “black box”. For those, very easy to fall into the “trap” I described, resulting in inefficient network transfer, with no clear documented alternative.
>
> The xdr-string that you mentioned works only with dynamically allocated strings (malloc based). In many application, the overhead of strdup/free/malloc, and the complexities for remembering to free any string / risk of leaking memory are too high, and there is strong preference to use char [n] - no malloc, no leaks, simple strcpy/strlcpy. The xdr-fixed-string will extend the benefit of this encoding to char[x] strings.
>
> Just an example. In financial application the type “currency”, will be char[4] - 16 bytes with xdr-array, 8 bytes for xdr-string and the new xdr-fixed string.
>
> Out of curiosity - are you using xdr/rpc in an application context ? I’m trying to get a feeling of how many applications are “out there” using rpcgen/xdr.
>
> Regards,
> Yair.
>
> Sent from my iPad
>
>> On Jan 23, 2026, at 20:47, Chuck Lever via Libtirpc-devel <lib...@li...> wrote:
>>
>> On 1/22/26 4:00 AM, Yair Lenga wrote:
>>> David Hayden suggested that I will post additional information about the
>>> motivation for the new xdr_fixedstring.
>>>
>>> The main motivation for putting xdr-fixedstring is efficiency. In my
>>> project we are using rpc for Hugh speed communication between c
>>> programs. Most developers do not understand the underlying encoding so
>>> that will write
>>>
>>> Struct Foo {
>>> Char s[100]
>>> }
>>>
>>> To represent a string without realizing this will result in send 400
>>> bytes on the wire, even for
>>> Strcpy(Foo.s, "USD")
>>> clnt_call(..., &foo...)
>>
>> This behavior might be because that is how rpcgen deals with arrays
>> defined the way you do it here.
>>
>> Each array element is aligned to 32-bits. So any element type that is
>> shorter than that, or whose size is not aligned to 4 octets, wastes
>> space in the wire representation.
>>
>> IMHO libtirpc should stick with providing the XDR types that are
>> defined and specified in RFC 4506. That will provide the best
>> guarantee of interoperability between heterogeneous platforms.
>>
>>
>>> With xdr_fixedstring on foo.s, - it gets compacted to 8 bytes (1 int for
>>> the size, then 1 int for 3 bytes, zero padded). Very similar encoding
>>> like the xdr_wrapstring - in term of size. In my project, when we moved
>>> to the fixedstring xdr functions, we have realized dramatic performance
>>> improvement - order of magnitude. At this time, the solution need some
>>> "support" - we use macro on the ".x" to simplify the flow for
>>> developers, so that they can write
>>>
>>> Struct Foo {
>>> fixedchar(s, 100) ;
>>> }
>>>
>>> Which gets translated to xdr_fixedstring(xdrs, obj->s, sizeof(obj->s))
>>> in the generated stub. No magic - just some C macros.
>>
>> There is a string type specified in RFC 4506 that does not have
>> the array packing problem. Can that be used instead?
--
Chuck Lever
|
|
From: Yair L. <yai...@gm...> - 2026-01-24 08:52:46
|
Chuck,
Thanks for feedback.
From my experience, the behavior of the array serialization is understood by experienced developers with understanding of the underlining protocol. But this is not true for the “average” c developer, who view the rpcgen/xdr as a “black box”. For those, very easy to fall into the “trap” I described, resulting in inefficient network transfer, with no clear documented alternative.
The xdr-string that you mentioned works only with dynamically allocated strings (malloc based). In many application, the overhead of strdup/free/malloc, and the complexities for remembering to free any string / risk of leaking memory are too high, and there is strong preference to use char [n] - no malloc, no leaks, simple strcpy/strlcpy. The xdr-fixed-string will extend the benefit of this encoding to char[x] strings.
Just an example. In financial application the type “currency”, will be char[4] - 16 bytes with xdr-array, 8 bytes for xdr-string and the new xdr-fixed string.
Out of curiosity - are you using xdr/rpc in an application context ? I’m trying to get a feeling of how many applications are “out there” using rpcgen/xdr.
Regards,
Yair.
Sent from my iPad
> On Jan 23, 2026, at 20:47, Chuck Lever via Libtirpc-devel <lib...@li...> wrote:
>
> On 1/22/26 4:00 AM, Yair Lenga wrote:
>> David Hayden suggested that I will post additional information about the
>> motivation for the new xdr_fixedstring.
>>
>> The main motivation for putting xdr-fixedstring is efficiency. In my
>> project we are using rpc for Hugh speed communication between c
>> programs. Most developers do not understand the underlying encoding so
>> that will write
>>
>> Struct Foo {
>> Char s[100]
>> }
>>
>> To represent a string without realizing this will result in send 400
>> bytes on the wire, even for
>> Strcpy(Foo.s, "USD")
>> clnt_call(..., &foo...)
>
> This behavior might be because that is how rpcgen deals with arrays
> defined the way you do it here.
>
> Each array element is aligned to 32-bits. So any element type that is
> shorter than that, or whose size is not aligned to 4 octets, wastes
> space in the wire representation.
>
> IMHO libtirpc should stick with providing the XDR types that are
> defined and specified in RFC 4506. That will provide the best
> guarantee of interoperability between heterogeneous platforms.
>
>
>> With xdr_fixedstring on foo.s, - it gets compacted to 8 bytes (1 int for
>> the size, then 1 int for 3 bytes, zero padded). Very similar encoding
>> like the xdr_wrapstring - in term of size. In my project, when we moved
>> to the fixedstring xdr functions, we have realized dramatic performance
>> improvement - order of magnitude. At this time, the solution need some
>> "support" - we use macro on the ".x" to simplify the flow for
>> developers, so that they can write
>>
>> Struct Foo {
>> fixedchar(s, 100) ;
>> }
>>
>> Which gets translated to xdr_fixedstring(xdrs, obj->s, sizeof(obj->s))
>> in the generated stub. No magic - just some C macros.
>
> There is a string type specified in RFC 4506 that does not have
> the array packing problem. Can that be used instead?
>
>
>> Hope this explanation/example provides useful context..
>>
>> Thanks,
>> Yair
>>
>> On Sat, Jan 17, 2026 at 10:03 PM Yair Lenga <yai...@gm...
>> <mailto:yai...@gm...>> wrote:
>>
>> Hi,
>>
>> Attached is the patch for xdr_fixedstring. Will appreciate if you
>> can take a look at it.
>>
>> I need some points for:
>> * Which file should have the man entry (could not find where
>> xdr_string, xdr_wrapstring are defined)
>> * What should I do with the map file - (src/libtirpc.map.in <http://
>> libtirpc.map.in>). Add a new entry at the end with new version ?
>> * Test cases - is there a place to commit ?
>>
>> Yair
>>
>> On Sat, Jan 17, 2026 at 6:31 PM Yair Lenga <yai...@gm...
>> <mailto:yai...@gm...>> wrote:
>>
>> Steve,
>>
>> It's been a long time since my proposal - but I'm still
>> interested in this improvement. We are being forced to update
>> our system, including alignment with tirpc.
>> I've pulled the code from git://git.linux-nfs.org/projects/
>> steved/libtirpc.git <http://git.linux-nfs.org/projects/steved/
>> libtirpc.git>
>> But I'm not exactly sure how to build.
>>
>> Following from autgen.sh - I've installed automake, libtool, and
>> I opted out from gssapi (--disable-gssapi) - got the library to
>> work.
>> Anything else I'm missing ?
>>
>> For the commit - do you want me to commit a feature branch - add
>> PR, or just a patch file. Not sure if anything changed since 2022.
>>
>> Regards,
>> Yair
>>
>> On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...
>> <mailto:st...@re...>> wrote:
>>
>>
>>
>>> On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote:
>>>
>>> Hi,
>>>
>>>> On Sun, Jul 17, Steve Dickson wrote:
>>>
>>>> Hey!
>>>>
>>>>> On 7/17/22 12:33 AM, Yair Lenga wrote:
>>>
>>>>> It will be implemented by new xdr function:
>>>>>
>>>>> bool_t
>>>>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp;
>> u_int maxsize;
>>>>>
>>>>> Note that when deserializing, EVERY character beyond the
>> length will be
>>>>> set to null to result in consistent behavior.
>>>>>
>>>>> Implementation is about 50 lines of addition code to
>> rpcgen, and 30
>>>>> lines of code to the xdr code (above function).
>>>>>
>>>>> Looking for feedback.
>>>>>
>>>> A couple thoughts... One, is there a man page?
>>>> Secondly if we add this function does the SONAME
>>>> need to be bumped?
>>>
>>> If you add a function, you need to assign a new symbol
>> version to it,
>>> but you don't need to bump the SONAME.
>>> You only need to bump the SONAME, if you change a function
>> interface
>>> in an incompatible way or if you remove a function.
>> Thank you for that clarification!
>>
>> Yair, please feel free to post the needed patches.
>>
>> steved.
>>
>>
>>
>> _______________________________________________
>> Libtirpc-devel mailing list
>> Lib...@li...
>> https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
>
>
> --
> Chuck Lever
>
>
> _______________________________________________
> Libtirpc-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
|
|
From: Chuck L. <chu...@or...> - 2026-01-23 18:47:13
|
On 1/22/26 4:00 AM, Yair Lenga wrote:
> David Hayden suggested that I will post additional information about the
> motivation for the new xdr_fixedstring.
>
> The main motivation for putting xdr-fixedstring is efficiency. In my
> project we are using rpc for Hugh speed communication between c
> programs. Most developers do not understand the underlying encoding so
> that will write
>
> Struct Foo {
> Char s[100]
> }
>
> To represent a string without realizing this will result in send 400
> bytes on the wire, even for
> Strcpy(Foo.s, "USD")
> clnt_call(..., &foo...)
This behavior might be because that is how rpcgen deals with arrays
defined the way you do it here.
Each array element is aligned to 32-bits. So any element type that is
shorter than that, or whose size is not aligned to 4 octets, wastes
space in the wire representation.
IMHO libtirpc should stick with providing the XDR types that are
defined and specified in RFC 4506. That will provide the best
guarantee of interoperability between heterogeneous platforms.
> With xdr_fixedstring on foo.s, - it gets compacted to 8 bytes (1 int for
> the size, then 1 int for 3 bytes, zero padded). Very similar encoding
> like the xdr_wrapstring - in term of size. In my project, when we moved
> to the fixedstring xdr functions, we have realized dramatic performance
> improvement - order of magnitude. At this time, the solution need some
> "support" - we use macro on the ".x" to simplify the flow for
> developers, so that they can write
>
> Struct Foo {
> fixedchar(s, 100) ;
> }
>
> Which gets translated to xdr_fixedstring(xdrs, obj->s, sizeof(obj->s))
> in the generated stub. No magic - just some C macros.
There is a string type specified in RFC 4506 that does not have
the array packing problem. Can that be used instead?
> Hope this explanation/example provides useful context..
>
> Thanks,
> Yair
>
> On Sat, Jan 17, 2026 at 10:03 PM Yair Lenga <yai...@gm...
> <mailto:yai...@gm...>> wrote:
>
> Hi,
>
> Attached is the patch for xdr_fixedstring. Will appreciate if you
> can take a look at it.
>
> I need some points for:
> * Which file should have the man entry (could not find where
> xdr_string, xdr_wrapstring are defined)
> * What should I do with the map file - (src/libtirpc.map.in <http://
> libtirpc.map.in>). Add a new entry at the end with new version ?
> * Test cases - is there a place to commit ?
>
> Yair
>
> On Sat, Jan 17, 2026 at 6:31 PM Yair Lenga <yai...@gm...
> <mailto:yai...@gm...>> wrote:
>
> Steve,
>
> It's been a long time since my proposal - but I'm still
> interested in this improvement. We are being forced to update
> our system, including alignment with tirpc.
> I've pulled the code from git://git.linux-nfs.org/projects/
> steved/libtirpc.git <http://git.linux-nfs.org/projects/steved/
> libtirpc.git>
> But I'm not exactly sure how to build.
>
> Following from autgen.sh - I've installed automake, libtool, and
> I opted out from gssapi (--disable-gssapi) - got the library to
> work.
> Anything else I'm missing ?
>
> For the commit - do you want me to commit a feature branch - add
> PR, or just a patch file. Not sure if anything changed since 2022.
>
> Regards,
> Yair
>
> On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...
> <mailto:st...@re...>> wrote:
>
>
>
> On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote:
> >
> > Hi,
> >
> > On Sun, Jul 17, Steve Dickson wrote:
> >
> >> Hey!
> >>
> >> On 7/17/22 12:33 AM, Yair Lenga wrote:
> >
> >>> It will be implemented by new xdr function:
> >>>
> >>> bool_t
> >>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp;
> u_int maxsize;
> >>>
> >>> Note that when deserializing, EVERY character beyond the
> length will be
> >>> set to null to result in consistent behavior.
> >>>
> >>> Implementation is about 50 lines of addition code to
> rpcgen, and 30
> >>> lines of code to the xdr code (above function).
> >>>
> >>> Looking for feedback.
> >>>
> >> A couple thoughts... One, is there a man page?
> >> Secondly if we add this function does the SONAME
> >> need to be bumped?
> >
> > If you add a function, you need to assign a new symbol
> version to it,
> > but you don't need to bump the SONAME.
> > You only need to bump the SONAME, if you change a function
> interface
> > in an incompatible way or if you remove a function.
> Thank you for that clarification!
>
> Yair, please feel free to post the needed patches.
>
> steved.
>
>
>
> _______________________________________________
> Libtirpc-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libtirpc-devel
--
Chuck Lever
|
|
From: Steve D. <st...@re...> - 2026-01-23 14:35:35
|
On 10/6/25 2:52 PM, Trond Myklebust wrote:
> From: Trond Myklebust<tro...@ha...>
>
> Both functions are listed as part of the official API in the libtirpc
> manpages. However they are not listed as being exported, and therefore
> do not turn up in the shared library.
>
> Signed-off-by: Trond Myklebust<tro...@ha...>
Committed.... sorry it took so long.
steved.
> ---
> src/libtirpc.map | 5 +++++
> src/libtirpc.map.in | 5 +++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/src/libtirpc.map b/src/libtirpc.map
> index 479b4ff044b5..0d0f2f4cdf75 100644
> --- a/src/libtirpc.map
> +++ b/src/libtirpc.map
> @@ -295,6 +295,11 @@ TIRPC_0.3.3 {
> svc_max_pollfd;
> } TIRPC_0.3.2;
>
> +TIRPC_1.3.7 {
> + authdes_getucred;
> + rpc_gss_getcred;
> +} TIRPC_0.3.3;
> +
> TIRPC_PRIVATE {
> global:
> __libc_clntudp_bufcreate;
> diff --git a/src/libtirpc.map.in b/src/libtirpc.map.in
> index 6cf563b443b1..6c0b9b2e8bac 100644
> --- a/src/libtirpc.map.in
> +++ b/src/libtirpc.map.in
> @@ -295,6 +295,11 @@ TIRPC_0.3.3 {
> svc_max_pollfd;
> } TIRPC_0.3.2;
>
> +TIRPC_1.3.7 {
> + authdes_getucred;
> + rpc_gss_getcred;
> +} TIRPC_0.3.3;
> +
> TIRPC_PRIVATE {
> global:
> __libc_clntudp_bufcreate;
> -- 2.51.0
>
|
|
From: Yair L. <yai...@gm...> - 2026-01-22 09:00:49
|
David Hayden suggested that I will post additional information about the
motivation for the new xdr_fixedstring.
The main motivation for putting xdr-fixedstring is efficiency. In my
project we are using rpc for Hugh speed communication between c programs.
Most developers do not understand the underlying encoding so that will write
Struct Foo {
Char s[100]
}
To represent a string without realizing this will result in send 400 bytes
on the wire, even for
Strcpy(Foo.s, "USD")
clnt_call(..., &foo...)
With xdr_fixedstring on foo.s, - it gets compacted to 8 bytes (1 int for
the size, then 1 int for 3 bytes, zero padded). Very similar encoding like
the xdr_wrapstring - in term of size. In my project, when we moved to the
fixedstring xdr functions, we have realized dramatic performance
improvement - order of magnitude. At this time, the solution need some
"support" - we use macro on the ".x" to simplify the flow for developers,
so that they can write
Struct Foo {
fixedchar(s, 100) ;
}
Which gets translated to xdr_fixedstring(xdrs, obj->s, sizeof(obj->s)) in
the generated stub. No magic - just some C macros.
Hope this explanation/example provides useful context..
Thanks,
Yair
On Sat, Jan 17, 2026 at 10:03 PM Yair Lenga <yai...@gm...> wrote:
> Hi,
>
> Attached is the patch for xdr_fixedstring. Will appreciate if you can take
> a look at it.
>
> I need some points for:
> * Which file should have the man entry (could not find where xdr_string,
> xdr_wrapstring are defined)
> * What should I do with the map file - (src/libtirpc.map.in). Add a new
> entry at the end with new version ?
> * Test cases - is there a place to commit ?
>
> Yair
>
> On Sat, Jan 17, 2026 at 6:31 PM Yair Lenga <yai...@gm...> wrote:
>
>> Steve,
>>
>> It's been a long time since my proposal - but I'm still interested in
>> this improvement. We are being forced to update our system, including
>> alignment with tirpc.
>> I've pulled the code from git://
>> git.linux-nfs.org/projects/steved/libtirpc.git
>> But I'm not exactly sure how to build.
>>
>> Following from autgen.sh - I've installed automake, libtool, and I opted
>> out from gssapi (--disable-gssapi) - got the library to work.
>> Anything else I'm missing ?
>>
>> For the commit - do you want me to commit a feature branch - add PR, or
>> just a patch file. Not sure if anything changed since 2022.
>>
>> Regards,
>> Yair
>>
>> On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...> wrote:
>>
>>>
>>>
>>> On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote:
>>> >
>>> > Hi,
>>> >
>>> > On Sun, Jul 17, Steve Dickson wrote:
>>> >
>>> >> Hey!
>>> >>
>>> >> On 7/17/22 12:33 AM, Yair Lenga wrote:
>>> >
>>> >>> It will be implemented by new xdr function:
>>> >>>
>>> >>> bool_t
>>> >>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp; u_int
>>> maxsize;
>>> >>>
>>> >>> Note that when deserializing, EVERY character beyond the length will
>>> be
>>> >>> set to null to result in consistent behavior.
>>> >>>
>>> >>> Implementation is about 50 lines of addition code to rpcgen, and 30
>>> >>> lines of code to the xdr code (above function).
>>> >>>
>>> >>> Looking for feedback.
>>> >>>
>>> >> A couple thoughts... One, is there a man page?
>>> >> Secondly if we add this function does the SONAME
>>> >> need to be bumped?
>>> >
>>> > If you add a function, you need to assign a new symbol version to it,
>>> > but you don't need to bump the SONAME.
>>> > You only need to bump the SONAME, if you change a function interface
>>> > in an incompatible way or if you remove a function.
>>> Thank you for that clarification!
>>>
>>> Yair, please feel free to post the needed patches.
>>>
>>> steved.
>>>
>>>
|
|
From: David H. <dh...@op...> - 2026-01-18 19:03:16
|
I’m sorry I didn’t see this proposal earlier. My bad. What’s the justification for putting xdr_fixedstring() in libtirpc rather than in your application? Thanks, Dave From: Yair Lenga <yai...@gm...> Sent: Saturday, January 17, 2026 11:31 AM To: Steve Dickson <st...@re...> Cc: Thorsten Kukuk <ku...@su...>; lib...@li... Subject: [EXTERNAL] - Re: [Libtirpc-devel] Proposed enhancement to libtiroc CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. If you feel that the email is suspicious, please report it using PhishAlarm. Steve, It's been a long time since my proposal - but I'm still interested in this improvement. We are being forced to update our system, including alignment with tirpc. I've pulled the code from git://git.linux-nfs.org/projects/steved/libtirpc.git<https://urldefense.com/v3/__http:/git.linux-nfs.org/projects/steved/libtirpc.git__;!!Obbck6kTJA!fNstzzAIWziPmmZTVITCae__iNLT77ZVJT0x8-KMXixElWPiDEw1wv05jUj0W4xfjuX6wqtZHQoxdK_FHzoU$> But I'm not exactly sure how to build. Following from autgen.sh - I've installed automake, libtool, and I opted out from gssapi (--disable-gssapi) - got the library to work. Anything else I'm missing ? For the commit - do you want me to commit a feature branch - add PR, or just a patch file. Not sure if anything changed since 2022. Regards, Yair On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...<mailto:st...@re...>> wrote: On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote: > > Hi, > > On Sun, Jul 17, Steve Dickson wrote: > >> Hey! >> >> On 7/17/22 12:33 AM, Yair Lenga wrote: > >>> It will be implemented by new xdr function: >>> >>> bool_t >>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp; u_int maxsize; >>> >>> Note that when deserializing, EVERY character beyond the length will be >>> set to null to result in consistent behavior. >>> >>> Implementation is about 50 lines of addition code to rpcgen, and 30 >>> lines of code to the xdr code (above function). >>> >>> Looking for feedback. >>> >> A couple thoughts... One, is there a man page? >> Secondly if we add this function does the SONAME >> need to be bumped? > > If you add a function, you need to assign a new symbol version to it, > but you don't need to bump the SONAME. > You only need to bump the SONAME, if you change a function interface > in an incompatible way or if you remove a function. Thank you for that clarification! Yair, please feel free to post the needed patches. steved. |
|
From: Yair L. <yai...@gm...> - 2026-01-17 20:03:45
|
Hi, Attached is the patch for xdr_fixedstring. Will appreciate if you can take a look at it. I need some points for: * Which file should have the man entry (could not find where xdr_string, xdr_wrapstring are defined) * What should I do with the map file - (src/libtirpc.map.in). Add a new entry at the end with new version ? * Test cases - is there a place to commit ? Yair On Sat, Jan 17, 2026 at 6:31 PM Yair Lenga <yai...@gm...> wrote: > Steve, > > It's been a long time since my proposal - but I'm still interested in this > improvement. We are being forced to update our system, including alignment > with tirpc. > I've pulled the code from git:// > git.linux-nfs.org/projects/steved/libtirpc.git > But I'm not exactly sure how to build. > > Following from autgen.sh - I've installed automake, libtool, and I opted > out from gssapi (--disable-gssapi) - got the library to work. > Anything else I'm missing ? > > For the commit - do you want me to commit a feature branch - add PR, or > just a patch file. Not sure if anything changed since 2022. > > Regards, > Yair > > On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...> wrote: > >> >> >> On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote: >> > >> > Hi, >> > >> > On Sun, Jul 17, Steve Dickson wrote: >> > >> >> Hey! >> >> >> >> On 7/17/22 12:33 AM, Yair Lenga wrote: >> > >> >>> It will be implemented by new xdr function: >> >>> >> >>> bool_t >> >>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp; u_int maxsize; >> >>> >> >>> Note that when deserializing, EVERY character beyond the length will >> be >> >>> set to null to result in consistent behavior. >> >>> >> >>> Implementation is about 50 lines of addition code to rpcgen, and 30 >> >>> lines of code to the xdr code (above function). >> >>> >> >>> Looking for feedback. >> >>> >> >> A couple thoughts... One, is there a man page? >> >> Secondly if we add this function does the SONAME >> >> need to be bumped? >> > >> > If you add a function, you need to assign a new symbol version to it, >> > but you don't need to bump the SONAME. >> > You only need to bump the SONAME, if you change a function interface >> > in an incompatible way or if you remove a function. >> Thank you for that clarification! >> >> Yair, please feel free to post the needed patches. >> >> steved. >> >> |
|
From: Yair L. <yai...@gm...> - 2026-01-17 16:31:49
|
Steve, It's been a long time since my proposal - but I'm still interested in this improvement. We are being forced to update our system, including alignment with tirpc. I've pulled the code from git:// git.linux-nfs.org/projects/steved/libtirpc.git But I'm not exactly sure how to build. Following from autgen.sh - I've installed automake, libtool, and I opted out from gssapi (--disable-gssapi) - got the library to work. Anything else I'm missing ? For the commit - do you want me to commit a feature branch - add PR, or just a patch file. Not sure if anything changed since 2022. Regards, Yair On Fri, Aug 5, 2022 at 6:35 PM Steve Dickson <st...@re...> wrote: > > > On 8/4/22 4:01 AM, Thorsten Kukuk via Libtirpc-devel wrote: > > > > Hi, > > > > On Sun, Jul 17, Steve Dickson wrote: > > > >> Hey! > >> > >> On 7/17/22 12:33 AM, Yair Lenga wrote: > > > >>> It will be implemented by new xdr function: > >>> > >>> bool_t > >>> xdr_fuxedstring(xdrs, sp, maxsize) XDR *xdrs; char *sp; u_int maxsize; > >>> > >>> Note that when deserializing, EVERY character beyond the length will be > >>> set to null to result in consistent behavior. > >>> > >>> Implementation is about 50 lines of addition code to rpcgen, and 30 > >>> lines of code to the xdr code (above function). > >>> > >>> Looking for feedback. > >>> > >> A couple thoughts... One, is there a man page? > >> Secondly if we add this function does the SONAME > >> need to be bumped? > > > > If you add a function, you need to assign a new symbol version to it, > > but you don't need to bump the SONAME. > > You only need to bump the SONAME, if you change a function interface > > in an incompatible way or if you remove a function. > Thank you for that clarification! > > Yair, please feel free to post the needed patches. > > steved. > > |
|
From: Markus M. <mm...@br...> - 2026-01-08 23:08:02
|
Hi all, We have come across a build issue with libtirpc-1.3.7 that was not present with libtirpc-1.3.6. It happens only with a certain toolchain / libc combination and is due to the introduction of the "--enable-rpcdb" configure option.[1] The build is now failing with our LLVM + musl-libc toolchain. As far as I can tell, the issue isn't related to LLVM but caused by the fact that musl-libc does not provide getrpcbyname() and getrpcbynumber(). Specifically, rpcbind will fail to link with the new libtirpc. The error looks like this: gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -I/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/include/tirpc -o rpcinfo src/rpcinfo.o -L/local/users/jenkins/workspace.o/buildroot_linux-5.4_llvm/output/stbllvm-13.0-0.6/arm/host/bin/../arm-buildroot-linux-musleabihf/sysroot/usr/lib -ltirpc ld.lld: error: undefined symbol: getrpcbynumber >>> referenced by security.c >>> src/security.o:(logit) clang-13: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:534: rpcbind] Error 1 make[2]: *** Waiting for unfinished jobs.... ld.lld: error: undefined symbol: getrpcbynumber >>> referenced by rpcinfo.c >>> src/rpcinfo.o:(main) >>> referenced by rpcinfo.c >>> src/rpcinfo.o:(main) >>> referenced by rpcinfo.c >>> src/rpcinfo.o:(pmapdump) >>> referenced 3 more times ld.lld: error: undefined symbol: getrpcbyname >>> referenced by rpcinfo.c >>> src/rpcinfo.o:(getprognum) clang-13: error: linker command failed with exit code 1 (use -v to see invocation) So, while the build error happens with rpcbind, the root cause lies with libtirpc. With libtirpc-1.3.6, this was not an issue, because it would detect at configure time that it needed to provide getrpcbyname() & co, and so rpcbind would link just fine. Configure in 1.3.7 is still detecting correctly that getrpcbyname() & co. are missing, but it will do nothing about it unless "--enable-rpcdb" is given on the command line. Without "--enable-rpcdb", getrpcent.c will not be compiled in, regardless of configure's findings, so the missing functions will not be provided, and the link stage of rpcbind will fail. Of course, this can be worked around by specifying "--enable-rpcdb" when calling "configure" for libtirpc, but it is still a regression. The build of another tool (rpcbind), which has remained unchanged, suddenly fails, because libtirpc was upgraded from 1.3.6 to 1.3.7. If I understand the commit message correctly, the change in question was introduced to fix linker issues, specifically with LLD. Curiously, we are now *experiencing* linker issues with LLD as a result of this change (not that it is LLD's fault at all in this case). Is there a way the original goal of the fix can be preserved while at the same time also not causing the kind of linker problem we are seeing? Would it work to have "configure" enable getrpcent.c whenever it detects getrpcbyname() & co are missing without requiring a flag given by the user? It doesn't seem right that it correctly detects the functions are missing, but still won't include them, even though it could. Please let me know if there are some things I should try out or some experiments I should run. Thanks, -Markus [1] https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commitdiff;h=7cea8ad66aec |
|
From: David H. <dh...@op...> - 2025-09-09 16:03:10
|
This might not be a libtirpc program, but maybe someone here can shed some light on the problem.
"rpcinfo -b <prognum> <versnum>" sends a broadcast to RPC service routine 0 for the given program and version number. The problem is that none of our servers on Redhat 8.10 (and, I think, other redhat versions) responds to it. We have lots of Solaris hosts and they all respond as they should.
Does anyone know why this might be happening? ifconfig shows that broadcast is enabled.
Thanks,
Dave
{ctp114-vE8_7.3.B6 /xdds/ctp} uname -a
Linux ctp114.xpedite.com 4.18.0-553.el8_10.x86_64 #1 SMP Fri May 10 15:19:13 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
{ctp114-vE8_7.3.B6 /xdds/ctp} nslookup ctp114
Server: 137.236.30.91
Address: 137.236.30.91#53
Non-authoritative answer:
Name: ctp114.xpedite.com
Address: 137.236.145.114
{ctp114-vE8_7.3.B6 /xdds/ctp} rpcinfo
program version netid address service owner
...
660000001 1 udp 0.0.0.0.220.126 - 1138
660000001 1 tcp 0.0.0.0.239.158 - 1138
600706300 2 udp 0.0.0.0.214.55 - 1138
600706300 2 tcp 0.0.0.0.232.88 - 1138
{ctp114-vE8_7.3.B6 /xdds/ctp} rpcinfo -b 660000001 1 > /tmp/foo
{ctp114-vE8_7.3.B6 /xdds/ctp} head /tmp/foo
137.236.145.77.24.158 tf-vqa3fdcv-q001.xreach.com
137.236.145.244.24.158 tf-vfdc-d003.resldap.net
137.236.145.77.24.158 tf-vqa3fdcv-q001.xreach.com
...
{ctp114-vE8_7.3.B6 /xdds/ctp} grep 137.236.145.114 /tmp/foo
{ctp114-vE8_7.3.B6 /xdds/ctp}
|
|
From: Steve D. <st...@re...> - 2025-08-25 15:31:15
|
Hello, The 1.2.7 version of libtirpc has just been release. Mostly cosmetic changes to remove warnings that come with newer compilers A memory bug fix and version support updated A new release just in time for the upcoming bakeathon. The tarball: https://sourceforge.net/projects/libtirpc/files/libtirpc/1.3.7/libtirpc-1.3.7.tar.bz2 Release notes: https://sourceforge.net/projects/libtirpc/files/libtirpc/1.3.7/Release-1-3-7.txt The git tree is at: git://linux-nfs.org/~steved/libtirpc steved. |
|
From: Steve D. <st...@re...> - 2025-08-25 15:05:20
|
On 8/18/25 11:08 AM, Steve Dickson via Libtirpc-devel wrote:
> With newer compilers (gcc 15.1.1) -Wold-style-definition
> flag is set by default which causes warnings for
> most of the functions in these files.
>
> warning: old-style function definition [-Wold-style-definition]
>
> The warnings are remove by converting the old-style
> function definitions into modern-style definitions
>
> Signed-off-by: Steve Dickson <st...@re...>
Committed... (tag: libtirpc-1-3-7-rc4)
steved.
> ---
> src/xdr.c | 224 ++++++++++++++++++++++----------------------
> src/xdr_array.c | 26 ++---
> src/xdr_float.c | 12 +--
> src/xdr_mem.c | 74 +++++++--------
> src/xdr_rec.c | 121 +++++++++++-------------
> src/xdr_reference.c | 20 ++--
> src/xdr_sizeof.c | 30 ++----
> src/xdr_stdio.c | 54 +++++------
> 8 files changed, 270 insertions(+), 291 deletions(-)
>
> diff --git a/src/xdr.c b/src/xdr.c
> index 28d1382..27b5d8d 100644
> --- a/src/xdr.c
> +++ b/src/xdr.c
> @@ -66,9 +66,9 @@ static const char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 };
> * Not a filter, but a convenient utility nonetheless
> */
> void
> -xdr_free(proc, objp)
> - xdrproc_t proc;
> - void *objp;
> +xdr_free(
> + xdrproc_t proc,
> + void *objp)
> {
> XDR x;
>
> @@ -91,9 +91,9 @@ xdr_void(void)
> * XDR integers
> */
> bool_t
> -xdr_int(xdrs, ip)
> - XDR *xdrs;
> - int *ip;
> +xdr_int(
> + XDR *xdrs,
> + int *ip)
> {
> long l;
>
> @@ -121,9 +121,9 @@ xdr_int(xdrs, ip)
> * XDR unsigned integers
> */
> bool_t
> -xdr_u_int(xdrs, up)
> - XDR *xdrs;
> - u_int *up;
> +xdr_u_int(
> + XDR *xdrs,
> + u_int *up)
> {
> u_long l;
>
> @@ -153,9 +153,9 @@ xdr_u_int(xdrs, up)
> * same as xdr_u_long - open coded to save a proc call!
> */
> bool_t
> -xdr_long(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdr_long(
> + XDR *xdrs,
> + long *lp)
> {
> switch (xdrs->x_op) {
> case XDR_ENCODE:
> @@ -174,9 +174,9 @@ xdr_long(xdrs, lp)
> * same as xdr_long - open coded to save a proc call!
> */
> bool_t
> -xdr_u_long(xdrs, ulp)
> - XDR *xdrs;
> - u_long *ulp;
> +xdr_u_long(
> + XDR *xdrs,
> + u_long *ulp)
> {
> switch (xdrs->x_op) {
> case XDR_ENCODE:
> @@ -196,9 +196,9 @@ xdr_u_long(xdrs, ulp)
> * same as xdr_u_int32_t - open coded to save a proc call!
> */
> bool_t
> -xdr_int32_t(xdrs, int32_p)
> - XDR *xdrs;
> - int32_t *int32_p;
> +xdr_int32_t(
> + XDR *xdrs,
> + int32_t *int32_p)
> {
> long l;
>
> @@ -227,9 +227,9 @@ xdr_int32_t(xdrs, int32_p)
> * same as xdr_int32_t - open coded to save a proc call!
> */
> bool_t
> -xdr_u_int32_t(xdrs, u_int32_p)
> - XDR *xdrs;
> - u_int32_t *u_int32_p;
> +xdr_u_int32_t(
> + XDR *xdrs,
> + u_int32_t *u_int32_p)
> {
> u_long l;
>
> @@ -258,9 +258,9 @@ xdr_u_int32_t(xdrs, u_int32_p)
> * XDR unsigned 32-bit integers
> */
> bool_t
> -xdr_uint32_t(xdrs, uint32_p)
> - XDR *xdrs;
> - uint32_t *uint32_p;
> +xdr_uint32_t(
> + XDR *xdrs,
> + uint32_t *uint32_p)
> {
> return (xdr_u_int32_t(xdrs, (u_int32_t *)uint32_p));
> }
> @@ -270,9 +270,9 @@ xdr_uint32_t(xdrs, uint32_p)
> * XDR short integers
> */
> bool_t
> -xdr_short(xdrs, sp)
> - XDR *xdrs;
> - short *sp;
> +xdr_short(
> + XDR *xdrs,
> + short *sp)
> {
> long l;
>
> @@ -300,9 +300,9 @@ xdr_short(xdrs, sp)
> * XDR unsigned short integers
> */
> bool_t
> -xdr_u_short(xdrs, usp)
> - XDR *xdrs;
> - u_short *usp;
> +xdr_u_short(
> + XDR *xdrs,
> + u_short *usp)
> {
> u_long l;
>
> @@ -331,9 +331,9 @@ xdr_u_short(xdrs, usp)
> * XDR 16-bit integers
> */
> bool_t
> -xdr_int16_t(xdrs, int16_p)
> - XDR *xdrs;
> - int16_t *int16_p;
> +xdr_int16_t(
> + XDR *xdrs,
> + int16_t *int16_p)
> {
> long l;
>
> @@ -361,9 +361,9 @@ xdr_int16_t(xdrs, int16_p)
> * XDR unsigned 16-bit integers
> */
> bool_t
> -xdr_u_int16_t(xdrs, u_int16_p)
> - XDR *xdrs;
> - u_int16_t *u_int16_p;
> +xdr_u_int16_t(
> + XDR *xdrs,
> + u_int16_t *u_int16_p)
> {
> u_long l;
>
> @@ -392,9 +392,9 @@ xdr_u_int16_t(xdrs, u_int16_p)
> * XDR unsigned 16-bit integers
> */
> bool_t
> -xdr_uint16_t(xdrs, uint16_p)
> - XDR *xdrs;
> - uint16_t *uint16_p;
> +xdr_uint16_t(
> + XDR *xdrs,
> + uint16_t *uint16_p)
> {
> return (xdr_u_int16_t(xdrs, (u_int16_t *)uint16_p));
> }
> @@ -404,9 +404,9 @@ xdr_uint16_t(xdrs, uint16_p)
> * XDR 8-bit integers
> */
> bool_t
> -xdr_int8_t(xdrs, int8_p)
> - XDR *xdrs;
> - int8_t *int8_p;
> +xdr_int8_t(
> + XDR *xdrs,
> + int8_t *int8_p)
> {
> long l;
>
> @@ -435,9 +435,9 @@ xdr_int8_t(xdrs, int8_p)
> * XDR unsigned 8-bit integers
> */
> bool_t
> -xdr_u_int8_t(xdrs, uint8_p)
> - XDR *xdrs;
> - uint8_t *uint8_p;
> +xdr_u_int8_t(
> + XDR *xdrs,
> + uint8_t *uint8_p)
> {
> u_long l;
>
> @@ -466,9 +466,9 @@ xdr_u_int8_t(xdrs, uint8_p)
> * XDR unsigned 8-bit integers
> */
> bool_t
> -xdr_uint8_t(xdrs, uint8_p)
> - XDR *xdrs;
> - uint8_t *uint8_p;
> +xdr_uint8_t(
> + XDR *xdrs,
> + uint8_t *uint8_p)
> {
> return (xdr_u_int8_t(xdrs, (uint8_t *)uint8_p));
> }
> @@ -478,9 +478,9 @@ xdr_uint8_t(xdrs, uint8_p)
> * XDR a char
> */
> bool_t
> -xdr_char(xdrs, cp)
> - XDR *xdrs;
> - char *cp;
> +xdr_char(
> + XDR *xdrs,
> + char *cp)
> {
> int i;
>
> @@ -496,9 +496,9 @@ xdr_char(xdrs, cp)
> * XDR an unsigned char
> */
> bool_t
> -xdr_u_char(xdrs, cp)
> - XDR *xdrs;
> - u_char *cp;
> +xdr_u_char(
> + XDR *xdrs,
> + u_char *cp)
> {
> u_int u;
>
> @@ -514,9 +514,9 @@ xdr_u_char(xdrs, cp)
> * XDR booleans
> */
> bool_t
> -xdr_bool(xdrs, bp)
> - XDR *xdrs;
> - bool_t *bp;
> +xdr_bool(
> + XDR *xdrs,
> + bool_t *bp)
> {
> long lb;
>
> @@ -544,9 +544,9 @@ xdr_bool(xdrs, bp)
> * XDR enumerations
> */
> bool_t
> -xdr_enum(xdrs, ep)
> - XDR *xdrs;
> - enum_t *ep;
> +xdr_enum(
> + XDR *xdrs,
> + enum_t *ep)
> {
> enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
>
> @@ -570,10 +570,10 @@ xdr_enum(xdrs, ep)
> * cp points to the opaque object and cnt gives the byte length.
> */
> bool_t
> -xdr_opaque(xdrs, cp, cnt)
> - XDR *xdrs;
> - caddr_t cp;
> - u_int cnt;
> +xdr_opaque(
> + XDR *xdrs,
> + caddr_t cp,
> + u_int cnt)
> {
> u_int rndup;
> static int crud[BYTES_PER_XDR_UNIT];
> @@ -622,11 +622,11 @@ xdr_opaque(xdrs, cp, cnt)
> * If *cpp is NULL maxsize bytes are allocated
> */
> bool_t
> -xdr_bytes(xdrs, cpp, sizep, maxsize)
> - XDR *xdrs;
> - char **cpp;
> - u_int *sizep;
> - u_int maxsize;
> +xdr_bytes(
> + XDR *xdrs,
> + char **cpp,
> + u_int *sizep,
> + u_int maxsize)
> {
> char *sp = *cpp; /* sp is the actual string pointer */
> u_int nodesize;
> @@ -687,9 +687,9 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
> * Implemented here due to commonality of the object.
> */
> bool_t
> -xdr_netobj(xdrs, np)
> - XDR *xdrs;
> - struct netobj *np;
> +xdr_netobj(
> + XDR *xdrs,
> + struct netobj *np)
> {
>
> return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ));
> @@ -707,12 +707,12 @@ xdr_netobj(xdrs, np)
> * If there is no specific or default routine an error is returned.
> */
> bool_t
> -xdr_union(xdrs, dscmp, unp, choices, dfault)
> - XDR *xdrs;
> - enum_t *dscmp; /* enum to decide which arm to work on */
> - char *unp; /* the union itself */
> - const struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
> - xdrproc_t dfault; /* default xdr routine */
> +xdr_union(
> + XDR *xdrs,
> + enum_t *dscmp, /* enum to decide which arm to work on */
> + char *unp, /* the union itself */
> + const struct xdr_discrim *choices, /* [value, xdr proc] for each arm */
> + xdrproc_t dfault) /* default xdr routine */
> {
> enum_t dscm;
>
> @@ -756,10 +756,10 @@ xdr_union(xdrs, dscmp, unp, choices, dfault)
> * of the string as specified by a protocol.
> */
> bool_t
> -xdr_string(xdrs, cpp, maxsize)
> - XDR *xdrs;
> - char **cpp;
> - u_int maxsize;
> +xdr_string(
> + XDR *xdrs,
> + char **cpp,
> + u_int maxsize)
> {
> char *sp = *cpp; /* sp is the actual string pointer */
> u_int size;
> @@ -839,9 +839,9 @@ xdr_string(xdrs, cpp, maxsize)
> * routines like clnt_call
> */
> bool_t
> -xdr_wrapstring(xdrs, cpp)
> - XDR *xdrs;
> - char **cpp;
> +xdr_wrapstring(
> + XDR *xdrs,
> + char **cpp)
> {
> return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
> }
> @@ -858,9 +858,9 @@ xdr_wrapstring(xdrs, cpp)
> * XDR 64-bit integers
> */
> bool_t
> -xdr_int64_t(xdrs, llp)
> - XDR *xdrs;
> - int64_t *llp;
> +xdr_int64_t(
> + XDR *xdrs,
> + int64_t *llp)
> {
> u_long ul[2];
>
> @@ -892,9 +892,9 @@ xdr_int64_t(xdrs, llp)
> * XDR unsigned 64-bit integers
> */
> bool_t
> -xdr_u_int64_t(xdrs, ullp)
> - XDR *xdrs;
> - u_int64_t *ullp;
> +xdr_u_int64_t(
> + XDR *xdrs,
> + u_int64_t *ullp)
> {
> u_long ul[2];
>
> @@ -926,9 +926,9 @@ xdr_u_int64_t(xdrs, ullp)
> * XDR unsigned 64-bit integers
> */
> bool_t
> -xdr_uint64_t(xdrs, ullp)
> - XDR *xdrs;
> - uint64_t *ullp;
> +xdr_uint64_t(
> + XDR *xdrs,
> + uint64_t *ullp)
> {
> return (xdr_u_int64_t(xdrs, (u_int64_t *)ullp));
> }
> @@ -938,9 +938,9 @@ xdr_uint64_t(xdrs, ullp)
> * XDR hypers
> */
> bool_t
> -xdr_hyper(xdrs, llp)
> - XDR *xdrs;
> - longlong_t *llp;
> +xdr_hyper(
> + XDR *xdrs,
> + longlong_t *llp)
> {
>
> /*
> @@ -955,9 +955,9 @@ xdr_hyper(xdrs, llp)
> * XDR unsigned hypers
> */
> bool_t
> -xdr_u_hyper(xdrs, ullp)
> - XDR *xdrs;
> - u_longlong_t *ullp;
> +xdr_u_hyper(
> + XDR *xdrs,
> + u_longlong_t *ullp)
> {
>
> /*
> @@ -972,9 +972,9 @@ xdr_u_hyper(xdrs, ullp)
> * XDR longlong_t's
> */
> bool_t
> -xdr_longlong_t(xdrs, llp)
> - XDR *xdrs;
> - longlong_t *llp;
> +xdr_longlong_t(
> + XDR *xdrs,
> + longlong_t *llp)
> {
>
> /*
> @@ -989,9 +989,9 @@ xdr_longlong_t(xdrs, llp)
> * XDR u_longlong_t's
> */
> bool_t
> -xdr_u_longlong_t(xdrs, ullp)
> - XDR *xdrs;
> - u_longlong_t *ullp;
> +xdr_u_longlong_t(
> + XDR *xdrs,
> + u_longlong_t *ullp)
> {
>
> /*
> @@ -1005,9 +1005,9 @@ xdr_u_longlong_t(xdrs, ullp)
> * XDR quad_t
> */
> bool_t
> -xdr_quad_t(xdrs, llp)
> - XDR *xdrs;
> - int64_t *llp;
> +xdr_quad_t(
> + XDR *xdrs,
> + int64_t *llp)
> {
> return (xdr_int64_t(xdrs, (int64_t *)llp));
> }
> @@ -1017,9 +1017,9 @@ xdr_quad_t(xdrs, llp)
> * XDR u_quad_t
> */
> bool_t
> -xdr_u_quad_t(xdrs, ullp)
> - XDR *xdrs;
> - u_int64_t *ullp;
> +xdr_u_quad_t(
> + XDR *xdrs,
> + u_int64_t *ullp)
> {
> return (xdr_u_int64_t(xdrs, (u_int64_t *)ullp));
> }
> diff --git a/src/xdr_array.c b/src/xdr_array.c
> index 7fc8fb8..d95512b 100644
> --- a/src/xdr_array.c
> +++ b/src/xdr_array.c
> @@ -55,13 +55,13 @@
> * xdr procedure to call to handle each element of the array.
> */
> bool_t
> -xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
> - XDR *xdrs;
> - caddr_t *addrp; /* array pointer */
> - u_int *sizep; /* number of elements */
> - u_int maxsize; /* max numberof elements */
> - u_int elsize; /* size in bytes of each element */
> - xdrproc_t elproc; /* xdr routine to handle each element */
> +xdr_array(
> + XDR *xdrs,
> + caddr_t *addrp, /* array pointer */
> + u_int *sizep, /* number of elements */
> + u_int maxsize, /* max numberof elements */
> + u_int elsize, /* size in bytes of each element */
> + xdrproc_t elproc) /* xdr routine to handle each element */
> {
> u_int i;
> caddr_t target = *addrp;
> @@ -133,12 +133,12 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
> * > xdr_elem: routine to XDR each element
> */
> bool_t
> -xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
> - XDR *xdrs;
> - char *basep;
> - u_int nelem;
> - u_int elemsize;
> - xdrproc_t xdr_elem;
> +xdr_vector(
> + XDR *xdrs,
> + char *basep,
> + u_int nelem,
> + u_int elemsize,
> + xdrproc_t xdr_elem)
> {
> u_int i;
> char *elptr;
> diff --git a/src/xdr_float.c b/src/xdr_float.c
> index c86d516..280f606 100644
> --- a/src/xdr_float.c
> +++ b/src/xdr_float.c
> @@ -95,9 +95,9 @@ static struct sgl_limits {
> #endif /* vax */
>
> bool_t
> -xdr_float(xdrs, fp)
> - XDR *xdrs;
> - float *fp;
> +xdr_float(
> + XDR *xdrs,
> + float *fp)
> {
> #ifndef IEEEFP
> struct ieee_single is;
> @@ -197,9 +197,9 @@ static struct dbl_limits {
>
>
> bool_t
> -xdr_double(xdrs, dp)
> - XDR *xdrs;
> - double *dp;
> +xdr_double(
> + XDR *xdrs,
> + double *dp)
> {
> #ifdef IEEEFP
> int32_t *i32p;
> diff --git a/src/xdr_mem.c b/src/xdr_mem.c
> index ecdc932..9ece51f 100644
> --- a/src/xdr_mem.c
> +++ b/src/xdr_mem.c
> @@ -88,11 +88,11 @@ static const struct xdr_ops xdrmem_ops_unaligned = {
> * memory buffer.
> */
> void
> -xdrmem_create(xdrs, addr, size, op)
> - XDR *xdrs;
> - char *addr;
> - u_int size;
> - enum xdr_op op;
> +xdrmem_create(
> + XDR *xdrs,
> + char *addr,
> + u_int size,
> + enum xdr_op op)
> {
>
> xdrs->x_op = op;
> @@ -104,16 +104,15 @@ xdrmem_create(xdrs, addr, size, op)
>
> /*ARGSUSED*/
> static void
> -xdrmem_destroy(xdrs)
> - XDR *xdrs;
> +xdrmem_destroy(XDR *xdrs)
> {
>
> }
>
> static bool_t
> -xdrmem_getlong_aligned(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrmem_getlong_aligned(
> + XDR *xdrs,
> + long *lp)
> {
>
> if (xdrs->x_handy < sizeof(int32_t))
> @@ -125,9 +124,9 @@ xdrmem_getlong_aligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_putlong_aligned(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrmem_putlong_aligned(
> + XDR *xdrs,
> + const long *lp)
> {
>
> if (xdrs->x_handy < sizeof(int32_t))
> @@ -139,9 +138,9 @@ xdrmem_putlong_aligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_getlong_unaligned(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrmem_getlong_unaligned(
> + XDR *xdrs,
> + long *lp)
> {
> u_int32_t l;
>
> @@ -155,9 +154,9 @@ xdrmem_getlong_unaligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_putlong_unaligned(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrmem_putlong_unaligned(
> + XDR *xdrs,
> + const long *lp)
> {
> u_int32_t l;
>
> @@ -171,10 +170,10 @@ xdrmem_putlong_unaligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrmem_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
>
> if (xdrs->x_handy < len)
> @@ -186,10 +185,10 @@ xdrmem_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrmem_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrmem_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
>
> if (xdrs->x_handy < len)
> @@ -201,8 +200,7 @@ xdrmem_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrmem_getpos(xdrs)
> - XDR *xdrs;
> +xdrmem_getpos(XDR *xdrs)
> {
>
> /* XXX w/64-bit pointers, u_int not enough! */
> @@ -210,9 +208,9 @@ xdrmem_getpos(xdrs)
> }
>
> static bool_t
> -xdrmem_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrmem_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
> char *newaddr = xdrs->x_base + pos;
> char *lastaddr = (char *)xdrs->x_private + xdrs->x_handy;
> @@ -225,9 +223,9 @@ xdrmem_setpos(xdrs, pos)
> }
>
> static int32_t *
> -xdrmem_inline_aligned(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrmem_inline_aligned(
> + XDR *xdrs,
> + u_int len)
> {
> int32_t *buf = 0;
>
> @@ -241,9 +239,9 @@ xdrmem_inline_aligned(xdrs, len)
>
> /* ARGSUSED */
> static int32_t *
> -xdrmem_inline_unaligned(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrmem_inline_unaligned(
> + XDR *xdrs,
> + u_int len)
> {
>
> return (0);
> diff --git a/src/xdr_rec.c b/src/xdr_rec.c
> index 676cc82..f088062 100644
> --- a/src/xdr_rec.c
> +++ b/src/xdr_rec.c
> @@ -152,15 +152,15 @@ static bool_t realloc_stream(RECSTREAM *, int);
> * calls expect that they take an opaque handle rather than an fd.
> */
> void
> -xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
> - XDR *xdrs;
> - u_int sendsize;
> - u_int recvsize;
> - void *tcp_handle;
> +xdrrec_create(
> + XDR *xdrs,
> + u_int sendsize,
> + u_int recvsize,
> + void *tcp_handle,
> /* like read, but pass it a tcp_handle, not sock */
> - int (*readit)(void *, void *, int);
> + int (*readit)(void *, void *, int),
> /* like write, but pass it a tcp_handle, not sock */
> - int (*writeit)(void *, void *, int);
> + int (*writeit)(void *, void *, int))
> {
> RECSTREAM *rstrm = mem_alloc(sizeof(RECSTREAM));
>
> @@ -220,9 +220,9 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
> */
>
> static bool_t
> -xdrrec_getlong(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrrec_getlong(
> + XDR *xdrs,
> + long *lp)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int32_t *buflp = (int32_t *)(void *)(rstrm->in_finger);
> @@ -244,9 +244,9 @@ xdrrec_getlong(xdrs, lp)
> }
>
> static bool_t
> -xdrrec_putlong(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrrec_putlong(
> + XDR *xdrs,
> + const long *lp)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int32_t *dest_lp = ((int32_t *)(void *)(rstrm->out_finger));
> @@ -268,10 +268,10 @@ xdrrec_putlong(xdrs, lp)
> }
>
> static bool_t /* must manage buffers, fragments, and records */
> -xdrrec_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrrec_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int current;
> @@ -296,10 +296,10 @@ xdrrec_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrrec_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrrec_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> size_t current;
> @@ -322,8 +322,7 @@ xdrrec_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrrec_getpos(xdrs)
> - XDR *xdrs;
> +xdrrec_getpos(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> off_t pos;
> @@ -348,9 +347,9 @@ xdrrec_getpos(xdrs)
> }
>
> static bool_t
> -xdrrec_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrrec_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> u_int currpos = xdrrec_getpos(xdrs);
> @@ -387,9 +386,9 @@ xdrrec_setpos(xdrs, pos)
> }
>
> static int32_t *
> -xdrrec_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrrec_inline(
> + XDR *xdrs,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> int32_t *buf = NULL;
> @@ -419,8 +418,7 @@ xdrrec_inline(xdrs, len)
> }
>
> static void
> -xdrrec_destroy(xdrs)
> - XDR *xdrs;
> +xdrrec_destroy(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
>
> @@ -439,8 +437,7 @@ xdrrec_destroy(xdrs)
> * this procedure to guarantee proper record alignment.
> */
> bool_t
> -xdrrec_skiprecord(xdrs)
> - XDR *xdrs;
> +xdrrec_skiprecord(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> enum xprt_stat xstat;
> @@ -475,8 +472,7 @@ xdrrec_skiprecord(xdrs)
> * after consuming the rest of the current record.
> */
> bool_t
> -xdrrec_eof(xdrs)
> - XDR *xdrs;
> +xdrrec_eof(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
>
> @@ -499,9 +495,9 @@ xdrrec_eof(xdrs)
> * pipelined procedure calls.) TRUE => immmediate flush to tcp connection.
> */
> bool_t
> -xdrrec_endofrecord(xdrs, sendnow)
> - XDR *xdrs;
> - bool_t sendnow;
> +xdrrec_endofrecord(
> + XDR *xdrs,
> + bool_t sendnow)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> u_long len; /* fragment length */
> @@ -525,10 +521,10 @@ xdrrec_endofrecord(xdrs, sendnow)
> * Return true if a record is available in the buffer, false if not.
> */
> bool_t
> -__xdrrec_getrec(xdrs, statp, expectdata)
> - XDR *xdrs;
> - enum xprt_stat *statp;
> - bool_t expectdata;
> +__xdrrec_getrec(
> + XDR *xdrs,
> + enum xprt_stat *statp,
> + bool_t expectdata)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> ssize_t n;
> @@ -615,9 +611,9 @@ __xdrrec_getrec(xdrs, statp, expectdata)
> }
>
> bool_t
> -__xdrrec_setnonblock(xdrs, maxrec)
> - XDR *xdrs;
> - int maxrec;
> +__xdrrec_setnonblock(
> + XDR *xdrs,
> + int maxrec)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
>
> @@ -632,9 +628,9 @@ __xdrrec_setnonblock(xdrs, maxrec)
> * Internal useful routines
> */
> static bool_t
> -flush_out(rstrm, eor)
> - RECSTREAM *rstrm;
> - bool_t eor;
> +flush_out(
> + RECSTREAM *rstrm,
> + bool_t eor)
> {
> u_int32_t eormask = (eor == TRUE) ? LAST_FRAG : 0;
> u_int32_t len = (u_int32_t)((u_long)(rstrm->out_finger) -
> @@ -652,8 +648,7 @@ flush_out(rstrm, eor)
> }
>
> static bool_t /* knows nothing about records! Only about input buffers */
> -fill_input_buf(rstrm)
> - RECSTREAM *rstrm;
> +fill_input_buf(RECSTREAM *rstrm)
> {
> char *where;
> u_int32_t i;
> @@ -675,10 +670,10 @@ fill_input_buf(rstrm)
> }
>
> static bool_t /* knows nothing about records! Only about input buffers */
> -get_input_bytes(rstrm, addr, len)
> - RECSTREAM *rstrm;
> - char *addr;
> - int len;
> +get_input_bytes(
> + RECSTREAM *rstrm,
> + char *addr,
> + int len)
> {
> size_t current;
>
> @@ -708,8 +703,7 @@ get_input_bytes(rstrm, addr, len)
> }
>
> static bool_t /* next two bytes of the input stream are treated as a header */
> -set_input_fragment(rstrm)
> - RECSTREAM *rstrm;
> +set_input_fragment(RECSTREAM *rstrm)
> {
> u_int32_t header;
>
> @@ -734,9 +728,9 @@ set_input_fragment(rstrm)
> }
>
> static bool_t /* consumes input bytes; knows nothing about records! */
> -skip_input_bytes(rstrm, cnt)
> - RECSTREAM *rstrm;
> - long cnt;
> +skip_input_bytes(
> + RECSTREAM *rstrm,
> + long cnt)
> {
> u_int32_t current;
>
> @@ -756,8 +750,7 @@ skip_input_bytes(rstrm, cnt)
> }
>
> static u_int
> -fix_buf_size(s)
> - u_int s;
> +fix_buf_size(u_int s)
> {
>
> if (s < 100)
> @@ -769,9 +762,9 @@ fix_buf_size(s)
> * Reallocate the input buffer for a non-block stream.
> */
> static bool_t
> -realloc_stream(rstrm, size)
> - RECSTREAM *rstrm;
> - int size;
> +realloc_stream(
> + RECSTREAM *rstrm,
> + int size)
> {
> ptrdiff_t diff;
> char *buf;
> diff --git a/src/xdr_reference.c b/src/xdr_reference.c
> index 13f6410..9c7b24e 100644
> --- a/src/xdr_reference.c
> +++ b/src/xdr_reference.c
> @@ -58,11 +58,11 @@
> * proc is the routine to handle the referenced structure.
> */
> bool_t
> -xdr_reference(xdrs, pp, size, proc)
> - XDR *xdrs;
> - caddr_t *pp; /* the pointer to work on */
> - u_int size; /* size of the object pointed to */
> - xdrproc_t proc; /* xdr routine to handle the object */
> +xdr_reference(
> + XDR *xdrs,
> + caddr_t *pp, /* the pointer to work on */
> + u_int size, /* size of the object pointed to */
> + xdrproc_t proc) /* xdr routine to handle the object */
> {
> caddr_t loc = *pp;
> bool_t stat;
> @@ -115,11 +115,11 @@ xdr_reference(xdrs, pp, size, proc)
> *
> */
> bool_t
> -xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
> - XDR *xdrs;
> - char **objpp;
> - u_int obj_size;
> - xdrproc_t xdr_obj;
> +xdr_pointer(
> + XDR *xdrs,
> + char **objpp,
> + u_int obj_size,
> + xdrproc_t xdr_obj)
> {
>
> bool_t more_data;
> diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
> index 79d6707..af3c313 100644
> --- a/src/xdr_sizeof.c
> +++ b/src/xdr_sizeof.c
> @@ -44,9 +44,7 @@
>
> /* ARGSUSED */
> static bool_t
> -x_putlong(xdrs, longp)
> - XDR *xdrs;
> - long *longp;
> +x_putlong(XDR *xdrs, const long *longp)
> {
> xdrs->x_handy += BYTES_PER_XDR_UNIT;
> return (TRUE);
> @@ -54,36 +52,31 @@ x_putlong(xdrs, longp)
>
> /* ARGSUSED */
> static bool_t
> -x_putbytes(xdrs, bp, len)
> - XDR *xdrs;
> - char *bp;
> - u_int len;
> +x_putbytes(
> + XDR *xdrs,
> + const char *bp,
> + u_int len)
> {
> xdrs->x_handy += len;
> return (TRUE);
> }
>
> static u_int
> -x_getpostn(xdrs)
> - XDR *xdrs;
> +x_getpostn(XDR *xdrs)
> {
> return (xdrs->x_handy);
> }
>
> /* ARGSUSED */
> static bool_t
> -x_setpostn(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +x_setpostn(XDR *xdrs, u_int pos)
> {
> /* This is not allowed */
> return (FALSE);
> }
>
> static int32_t *
> -x_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +x_inline(XDR *xdrs, u_int len)
> {
> if (len == 0) {
> return (NULL);
> @@ -117,8 +110,7 @@ harmless()
> }
>
> static void
> -x_destroy(xdrs)
> - XDR *xdrs;
> +x_destroy(XDR *xdrs)
> {
> xdrs->x_handy = 0;
> xdrs->x_base = 0;
> @@ -130,9 +122,7 @@ x_destroy(xdrs)
> }
>
> unsigned long
> -xdr_sizeof(func, data)
> - xdrproc_t func;
> - void *data;
> +xdr_sizeof(xdrproc_t func, void *data)
> {
> XDR x;
> struct xdr_ops ops;
> diff --git a/src/xdr_stdio.c b/src/xdr_stdio.c
> index 846c7bf..699de39 100644
> --- a/src/xdr_stdio.c
> +++ b/src/xdr_stdio.c
> @@ -74,10 +74,10 @@ static const struct xdr_ops xdrstdio_ops = {
> * Operation flag is set to op.
> */
> void
> -xdrstdio_create(xdrs, file, op)
> - XDR *xdrs;
> - FILE *file;
> - enum xdr_op op;
> +xdrstdio_create(
> + XDR *xdrs,
> + FILE *file,
> + enum xdr_op op)
> {
>
> xdrs->x_op = op;
> @@ -92,17 +92,16 @@ xdrstdio_create(xdrs, file, op)
> * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
> */
> static void
> -xdrstdio_destroy(xdrs)
> - XDR *xdrs;
> +xdrstdio_destroy(XDR *xdrs)
> {
> (void)fflush((FILE *)xdrs->x_private);
> /* XXX: should we close the file ?? */
> }
>
> static bool_t
> -xdrstdio_getlong(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrstdio_getlong(
> + XDR *xdrs,
> + long *lp)
> {
> int32_t mycopy;
>
> @@ -114,9 +113,9 @@ xdrstdio_getlong(xdrs, lp)
> }
>
> static bool_t
> -xdrstdio_putlong(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrstdio_putlong(
> + XDR *xdrs,
> + const long *lp)
> {
> int32_t mycopy;
>
> @@ -132,10 +131,10 @@ xdrstdio_putlong(xdrs, lp)
> }
>
> static bool_t
> -xdrstdio_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrstdio_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
>
> if ((len != 0) && (fread(addr, (size_t)len, 1, (FILE *)xdrs->x_private) != 1))
> @@ -144,10 +143,10 @@ xdrstdio_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrstdio_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrstdio_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
>
> if ((len != 0) && (fwrite(addr, (size_t)len, 1,
> @@ -157,17 +156,16 @@ xdrstdio_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrstdio_getpos(xdrs)
> - XDR *xdrs;
> +xdrstdio_getpos(XDR *xdrs)
> {
>
> return ((u_int) ftell((FILE *)xdrs->x_private));
> }
>
> static bool_t
> -xdrstdio_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrstdio_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
>
> return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ?
> @@ -176,9 +174,9 @@ xdrstdio_setpos(xdrs, pos)
>
> /* ARGSUSED */
> static int32_t *
> -xdrstdio_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrstdio_inline(
> + XDR *xdrs,
> + u_int len)
> {
>
> /*
|
|
From: Steve D. <st...@re...> - 2025-08-25 15:04:37
|
On 8/12/25 2:08 PM, Khem Raj wrote:
> This patch adds conditional symbol versioning to libtirpc, allowing
> GSS-API, DES crypto, and RPC database symbols to be conditionally
> included in the version script based on build configuration.
>
> LLD is strict about undefined symbols referenced in a version script.
> Some libtirpc symbols (rpcsec_gss, old DES helpers, rpc database
> helpers) are optional and may not be built depending on configure
> options or missing deps. GNU ld tolerated this; LLD errors out.
>
> This change keeps the canonical symbol map in src/libtirpc.map, but
> adds a make-time rule to generate a filtered copy
> where names from disabled features are deleted. The lib is then linked
> against the generated linker map file.
>
> Fixes linking errors when these features are not available.
>
> Signed-off-by: Khem Raj <raj...@gm...>
Committed... (tag: libtirpc-1-3-7-rc4)
steved.
> ---
> v2: Fix access to generated libtirpc.map when Srcdir != Builddir
> v3: Fix problems where getrpcent.c was not being built with --enable-rpcdb
>
> configure.ac | 49 +++++++++++++++++++++++++++
> src/Makefile.am | 30 ++++++++++++----
> src/{libtirpc.map => libtirpc.map.in} | 48 +++++---------------------
> 3 files changed, 80 insertions(+), 47 deletions(-)
> rename src/{libtirpc.map => libtirpc.map.in} (84%)
>
> diff --git a/configure.ac b/configure.ac
> index e813b14..e79bf59 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -77,6 +77,19 @@ if test "x$enable_ipv6" != xno; then
> AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available])
> fi
>
> +# RPC database support
> +AC_ARG_ENABLE(rpcdb,
> + [AS_HELP_STRING([--enable-rpcdb], [Enable RPC Database support @<:@default=no@:>@])],
> + [], [enable_rpcdb=no])
> +AM_CONDITIONAL(RPCDB, test "x$enable_rpcdb" = xyes)
> +if test "x$enable_rpcdb" != "xno"; then
> + AC_CHECK_FUNCS([getrpcent getrpcbyname getrpcbynumber], [have_rpcdb=yes])
> +
> + if test "x$have_rpcdb" = "xyes"; then
> + AC_DEFINE([RPCDB], [1], [Define if RPC database support is available])
> + fi
> +fi
> +
> AC_ARG_ENABLE(symvers,
> [AS_HELP_STRING([--disable-symvers],[Disable symbol versioning @<:@default=no@:>@])],
> [],[enable_symvers=maybe])
> @@ -97,6 +110,33 @@ fi
>
> AM_CONDITIONAL(SYMVERS, test "x$enable_symvers" = xyes)
>
> +# Generate symbol lists for version script
> +if test "x$enable_gssapi" = "xyes"; then
> + GSS_SYMBOLS="_svcauth_gss; authgss_create; authgss_create_default; authgss_free_private_data; authgss_get_private_data; authgss_service; gss_log_debug; gss_log_hexdump; gss_log_status; rpc_gss_get_error; rpc_gss_get_mech_info; rpc_gss_get_mechanisms; rpc_gss_get_principal_name; rpc_gss_get_versions; rpc_gss_qop_to_num; rpc_gss_seccreate; rpc_gss_set_callback; rpc_gss_set_defaults; rpc_gss_set_svc_name; rpc_gss_svc_max_data_length;"
> +
> + GSS_SYMBOLS_031="svcauth_gss_get_principal; svcauth_gss_set_svc_name;"
> +else
> + GSS_SYMBOLS=""
> + GSS_SYMBOLS_031=""
> +fi
> +
> +if test "x$enable_authdes" = "xyes"; then
> + DES_SYMBOLS="cbc_crypt; ecb_crypt; xdr_authdes_cred; xdr_authdes_verf; xdr_rpc_gss_cred; xdr_rpc_gss_data; xdr_rpc_gss_init_args; xdr_rpc_gss_init_res;"
> +else
> + DES_SYMBOLS=""
> +fi
> +
> +if test "x$enable_rpcdb" = "xyes"; then
> + RPCDB_SYMBOLS="endrpcent; getrpcent; getrpcbynumber; getrpcbyname; setrpcent;"
> +else
> + RPCDB_SYMBOLS=""
> +fi
> +
> +AC_SUBST([GSS_SYMBOLS])
> +AC_SUBST([GSS_SYMBOLS_031])
> +AC_SUBST([DES_SYMBOLS])
> +AC_SUBST([RPCDB_SYMBOLS])
> +
> AC_CANONICAL_BUILD
> # Check for which host we are on and setup a few things
> # specifically based on the host
> @@ -167,7 +207,16 @@ AC_CHECK_FUNCS([getpeereid getrpcbyname getrpcbynumber setrpcent endrpcent getrp
> AC_CHECK_TYPES(struct rpcent,,, [
> #include <netdb.h>])
> AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
> +AC_CONFIG_FILES([src/libtirpc.map])
> AC_CONFIG_FILES([libtirpc.pc])
> AC_OUTPUT
>
> +# Configuration summary
> +AC_MSG_NOTICE([
> +libtirpc configuration summary:
> + GSS-API support: $enable_gssapi
> + DES crypto support: $enable_authdes
> + RPC database support: $enable_rpcdb
> + Symbol versioning: $enable_symvers
> +])
>
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 0cef093..cfda770 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -6,6 +6,9 @@
> ## anything like that.
>
> noinst_HEADERS = rpc_com.h debug.h
> +EXTRA_DIST = libtirpc.map.in
> +# Generated files
> +BUILT_SOURCES = libtirpc.map
>
> AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \
> -D_GNU_SOURCE -Wall -pipe
> @@ -15,10 +18,19 @@ lib_LTLIBRARIES = libtirpc.la
> libtirpc_la_LDFLAGS = @LDFLAG_NOUNDEFINED@ -no-undefined @PTHREAD_LIBS@
> libtirpc_la_LDFLAGS += -version-info @LT_VERSION_INFO@
>
> +# Generate version script from template
> +libtirpc.map: $(srcdir)/libtirpc.map.in
> + $(AM_V_GEN)$(SED) \
> + -e 's|@GSS_SYMBOLS@|$(GSS_SYMBOLS)|g' \
> + -e 's|@GSS_SYMBOLS_031@|$(GSS_SYMBOLS_031)|g' \
> + -e 's|@DES_SYMBOLS@|$(DES_SYMBOLS)|g' \
> + -e 's|@RPCDB_SYMBOLS@|$(RPCDB_SYMBOLS)|g' \
> + < $(srcdir)/libtirpc.map.in > $@ || rm -f $@
> +
> libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c \
> binddynport.c bindresvport.c \
> clnt_bcast.c clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \
> - clnt_vc.c rpc_dtablesize.c getnetconfig.c getnetpath.c getrpcent.c \
> + clnt_vc.c rpc_dtablesize.c getnetconfig.c getnetpath.c \
> getrpcport.c mt_misc.c pmap_clnt.c pmap_getmaps.c pmap_getport.c \
> pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
> rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
> @@ -34,19 +46,23 @@ endif
> libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
>
> if SYMVERS
> - libtirpc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libtirpc.map
> + libtirpc_la_LDFLAGS += -Wl,--version-script=$(builddir)/libtirpc.map
> endif
>
> ## Secure-RPC
> if GSS
> - libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c \
> - rpc_gss_utils.c
> - libtirpc_la_LIBADD = $(GSSAPI_LIBS)
> - libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
> +libtirpc_la_SOURCES += auth_gss.c authgss_prot.c svc_auth_gss.c rpc_gss_utils.c
> +libtirpc_la_LIBADD = $(GSSAPI_LIBS)
> +libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
> +endif
> +
> +# Conditionally add RPC database sources
> +if RPCDB
> +libtirpc_la_SOURCES += getrpcent.c
> endif
>
> libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
> libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
>
> -CLEANFILES = cscope.* *~
> +CLEANFILES = cscope.* libtirpc.map *~
> DISTCLEANFILES = Makefile.in
> diff --git a/src/libtirpc.map b/src/libtirpc.map.in
> similarity index 84%
> rename from src/libtirpc.map
> rename to src/libtirpc.map.in
> index 21d6065..6cf563b 100644
> --- a/src/libtirpc.map
> +++ b/src/libtirpc.map.in
> @@ -34,16 +34,10 @@ TIRPC_0.3.0 {
> _svcauth_none;
> _svcauth_short;
> _svcauth_unix;
> - _svcauth_gss;
>
> # a*
> authdes_create;
> authdes_seccreate;
> - authgss_create;
> - authgss_create_default;
> - authgss_free_private_data;
> - authgss_get_private_data;
> - authgss_service;
> authnone_create;
> authunix_create;
> authunix_create_default;
> @@ -54,7 +48,6 @@ TIRPC_0.3.0 {
>
> # c*
> callrpc;
> - cbc_crypt;
> clnt_broadcast;
> clnt_create;
> clnt_create_timed;
> @@ -79,10 +72,8 @@ TIRPC_0.3.0 {
> clntunix_create;
>
> # e*
> - ecb_crypt;
> endnetconfig;
> endnetpath;
> - endrpcent;
>
> # f*
> freenetconfigent;
> @@ -92,13 +83,7 @@ TIRPC_0.3.0 {
> getnetconfig;
> getnetconfigent;
> getnetpath;
> - getrpcent;
> - getrpcbynumber;
> - getrpcbyname;
> getrpcport;
> - gss_log_debug;
> - gss_log_hexdump;
> - gss_log_status;
>
> # n*
> nc_perror;
> @@ -118,21 +103,6 @@ TIRPC_0.3.0 {
> rpc_call;
> rpc_control;
> rpc_createerr;
> - rpc_gss_get_error;
> - rpc_gss_get_mech_info;
> - rpc_gss_get_mechanisms;
> - rpc_gss_get_principal_name;
> - rpc_gss_get_versions;
> - rpc_gss_getcred;
> - rpc_gss_is_installed;
> - rpc_gss_max_data_length;
> - rpc_gss_mech_to_oid;
> - rpc_gss_qop_to_num;
> - rpc_gss_seccreate;
> - rpc_gss_set_callback;
> - rpc_gss_set_defaults;
> - rpc_gss_set_svc_name;
> - rpc_gss_svc_max_data_length;
> rpc_nullproc;
> rpc_reg;
> rpcb_getaddr;
> @@ -147,7 +117,6 @@ TIRPC_0.3.0 {
> # s*
> setnetconfig;
> setnetpath;
> - setrpcent;
> svc_auth_reg;
> svc_create;
> svc_dg_create;
> @@ -194,8 +163,6 @@ TIRPC_0.3.0 {
> # x*
> xdr_accepted_reply;
> xdr_array;
> - xdr_authdes_cred;
> - xdr_authdes_verf;
> xdr_authunix_parms;
> xdr_bool;
> xdr_bytes;
> @@ -228,10 +195,6 @@ TIRPC_0.3.0 {
> xdr_replymsg;
> xdr_rmtcall_args;
> xdr_rmtcallres;
> - xdr_rpc_gss_cred;
> - xdr_rpc_gss_data;
> - xdr_rpc_gss_init_args;
> - xdr_rpc_gss_init_res;
> xdr_rpcb;
> xdr_rpcb_entry;
> xdr_rpcb_entry_list_ptr;
> @@ -275,14 +238,20 @@ TIRPC_0.3.0 {
> xdrstdio_create;
> xprt_register;
> xprt_unregister;
> + # GSS-API symbols (conditionally included)
> +@GSS_SYMBOLS@
> + # DES crypto symbols (conditionally included)
> +@DES_SYMBOLS@
> + # RPC database symbols (conditionally included)
> +@RPCDB_SYMBOLS@
>
> local:
> *;
> };
>
> TIRPC_0.3.1 {
> - svcauth_gss_get_principal;
> - svcauth_gss_set_svc_name;
> +# GSS-API symbols (conditionally included)
> +@GSS_SYMBOLS_031@
> } TIRPC_0.3.0;
>
> TIRPC_0.3.2 {
> @@ -290,7 +259,6 @@ TIRPC_0.3.2 {
> getpublicandprivatekey;
> getpublickey;
> host2netname;
> - key_call_destroy;
> key_decryptsession;
> key_decryptsession_pk;
> key_encryptsession;
>
|
|
From: Steve D. <st...@re...> - 2025-08-21 12:24:42
|
[Sorry for the repost... ]
steved.
On 8/18/25 11:08 AM, Steve Dickson via Libtirpc-devel wrote:
> With newer compilers (gcc 15.1.1) -Wold-style-definition
> flag is set by default which causes warnings for
> most of the functions in these files.
>
> warning: old-style function definition [-Wold-style-definition]
>
> The warnings are remove by converting the old-style
> function definitions into modern-style definitions
>
> Signed-off-by: Steve Dickson <st...@re...>
> ---
> src/xdr.c | 224 ++++++++++++++++++++++----------------------
> src/xdr_array.c | 26 ++---
> src/xdr_float.c | 12 +--
> src/xdr_mem.c | 74 +++++++--------
> src/xdr_rec.c | 121 +++++++++++-------------
> src/xdr_reference.c | 20 ++--
> src/xdr_sizeof.c | 30 ++----
> src/xdr_stdio.c | 54 +++++------
> 8 files changed, 270 insertions(+), 291 deletions(-)
>
> diff --git a/src/xdr.c b/src/xdr.c
> index 28d1382..27b5d8d 100644
> --- a/src/xdr.c
> +++ b/src/xdr.c
> @@ -66,9 +66,9 @@ static const char xdr_zero[BYTES_PER_XDR_UNIT] = { 0, 0, 0, 0 };
> * Not a filter, but a convenient utility nonetheless
> */
> void
> -xdr_free(proc, objp)
> - xdrproc_t proc;
> - void *objp;
> +xdr_free(
> + xdrproc_t proc,
> + void *objp)
> {
> XDR x;
>
> @@ -91,9 +91,9 @@ xdr_void(void)
> * XDR integers
> */
> bool_t
> -xdr_int(xdrs, ip)
> - XDR *xdrs;
> - int *ip;
> +xdr_int(
> + XDR *xdrs,
> + int *ip)
> {
> long l;
>
> @@ -121,9 +121,9 @@ xdr_int(xdrs, ip)
> * XDR unsigned integers
> */
> bool_t
> -xdr_u_int(xdrs, up)
> - XDR *xdrs;
> - u_int *up;
> +xdr_u_int(
> + XDR *xdrs,
> + u_int *up)
> {
> u_long l;
>
> @@ -153,9 +153,9 @@ xdr_u_int(xdrs, up)
> * same as xdr_u_long - open coded to save a proc call!
> */
> bool_t
> -xdr_long(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdr_long(
> + XDR *xdrs,
> + long *lp)
> {
> switch (xdrs->x_op) {
> case XDR_ENCODE:
> @@ -174,9 +174,9 @@ xdr_long(xdrs, lp)
> * same as xdr_long - open coded to save a proc call!
> */
> bool_t
> -xdr_u_long(xdrs, ulp)
> - XDR *xdrs;
> - u_long *ulp;
> +xdr_u_long(
> + XDR *xdrs,
> + u_long *ulp)
> {
> switch (xdrs->x_op) {
> case XDR_ENCODE:
> @@ -196,9 +196,9 @@ xdr_u_long(xdrs, ulp)
> * same as xdr_u_int32_t - open coded to save a proc call!
> */
> bool_t
> -xdr_int32_t(xdrs, int32_p)
> - XDR *xdrs;
> - int32_t *int32_p;
> +xdr_int32_t(
> + XDR *xdrs,
> + int32_t *int32_p)
> {
> long l;
>
> @@ -227,9 +227,9 @@ xdr_int32_t(xdrs, int32_p)
> * same as xdr_int32_t - open coded to save a proc call!
> */
> bool_t
> -xdr_u_int32_t(xdrs, u_int32_p)
> - XDR *xdrs;
> - u_int32_t *u_int32_p;
> +xdr_u_int32_t(
> + XDR *xdrs,
> + u_int32_t *u_int32_p)
> {
> u_long l;
>
> @@ -258,9 +258,9 @@ xdr_u_int32_t(xdrs, u_int32_p)
> * XDR unsigned 32-bit integers
> */
> bool_t
> -xdr_uint32_t(xdrs, uint32_p)
> - XDR *xdrs;
> - uint32_t *uint32_p;
> +xdr_uint32_t(
> + XDR *xdrs,
> + uint32_t *uint32_p)
> {
> return (xdr_u_int32_t(xdrs, (u_int32_t *)uint32_p));
> }
> @@ -270,9 +270,9 @@ xdr_uint32_t(xdrs, uint32_p)
> * XDR short integers
> */
> bool_t
> -xdr_short(xdrs, sp)
> - XDR *xdrs;
> - short *sp;
> +xdr_short(
> + XDR *xdrs,
> + short *sp)
> {
> long l;
>
> @@ -300,9 +300,9 @@ xdr_short(xdrs, sp)
> * XDR unsigned short integers
> */
> bool_t
> -xdr_u_short(xdrs, usp)
> - XDR *xdrs;
> - u_short *usp;
> +xdr_u_short(
> + XDR *xdrs,
> + u_short *usp)
> {
> u_long l;
>
> @@ -331,9 +331,9 @@ xdr_u_short(xdrs, usp)
> * XDR 16-bit integers
> */
> bool_t
> -xdr_int16_t(xdrs, int16_p)
> - XDR *xdrs;
> - int16_t *int16_p;
> +xdr_int16_t(
> + XDR *xdrs,
> + int16_t *int16_p)
> {
> long l;
>
> @@ -361,9 +361,9 @@ xdr_int16_t(xdrs, int16_p)
> * XDR unsigned 16-bit integers
> */
> bool_t
> -xdr_u_int16_t(xdrs, u_int16_p)
> - XDR *xdrs;
> - u_int16_t *u_int16_p;
> +xdr_u_int16_t(
> + XDR *xdrs,
> + u_int16_t *u_int16_p)
> {
> u_long l;
>
> @@ -392,9 +392,9 @@ xdr_u_int16_t(xdrs, u_int16_p)
> * XDR unsigned 16-bit integers
> */
> bool_t
> -xdr_uint16_t(xdrs, uint16_p)
> - XDR *xdrs;
> - uint16_t *uint16_p;
> +xdr_uint16_t(
> + XDR *xdrs,
> + uint16_t *uint16_p)
> {
> return (xdr_u_int16_t(xdrs, (u_int16_t *)uint16_p));
> }
> @@ -404,9 +404,9 @@ xdr_uint16_t(xdrs, uint16_p)
> * XDR 8-bit integers
> */
> bool_t
> -xdr_int8_t(xdrs, int8_p)
> - XDR *xdrs;
> - int8_t *int8_p;
> +xdr_int8_t(
> + XDR *xdrs,
> + int8_t *int8_p)
> {
> long l;
>
> @@ -435,9 +435,9 @@ xdr_int8_t(xdrs, int8_p)
> * XDR unsigned 8-bit integers
> */
> bool_t
> -xdr_u_int8_t(xdrs, uint8_p)
> - XDR *xdrs;
> - uint8_t *uint8_p;
> +xdr_u_int8_t(
> + XDR *xdrs,
> + uint8_t *uint8_p)
> {
> u_long l;
>
> @@ -466,9 +466,9 @@ xdr_u_int8_t(xdrs, uint8_p)
> * XDR unsigned 8-bit integers
> */
> bool_t
> -xdr_uint8_t(xdrs, uint8_p)
> - XDR *xdrs;
> - uint8_t *uint8_p;
> +xdr_uint8_t(
> + XDR *xdrs,
> + uint8_t *uint8_p)
> {
> return (xdr_u_int8_t(xdrs, (uint8_t *)uint8_p));
> }
> @@ -478,9 +478,9 @@ xdr_uint8_t(xdrs, uint8_p)
> * XDR a char
> */
> bool_t
> -xdr_char(xdrs, cp)
> - XDR *xdrs;
> - char *cp;
> +xdr_char(
> + XDR *xdrs,
> + char *cp)
> {
> int i;
>
> @@ -496,9 +496,9 @@ xdr_char(xdrs, cp)
> * XDR an unsigned char
> */
> bool_t
> -xdr_u_char(xdrs, cp)
> - XDR *xdrs;
> - u_char *cp;
> +xdr_u_char(
> + XDR *xdrs,
> + u_char *cp)
> {
> u_int u;
>
> @@ -514,9 +514,9 @@ xdr_u_char(xdrs, cp)
> * XDR booleans
> */
> bool_t
> -xdr_bool(xdrs, bp)
> - XDR *xdrs;
> - bool_t *bp;
> +xdr_bool(
> + XDR *xdrs,
> + bool_t *bp)
> {
> long lb;
>
> @@ -544,9 +544,9 @@ xdr_bool(xdrs, bp)
> * XDR enumerations
> */
> bool_t
> -xdr_enum(xdrs, ep)
> - XDR *xdrs;
> - enum_t *ep;
> +xdr_enum(
> + XDR *xdrs,
> + enum_t *ep)
> {
> enum sizecheck { SIZEVAL }; /* used to find the size of an enum */
>
> @@ -570,10 +570,10 @@ xdr_enum(xdrs, ep)
> * cp points to the opaque object and cnt gives the byte length.
> */
> bool_t
> -xdr_opaque(xdrs, cp, cnt)
> - XDR *xdrs;
> - caddr_t cp;
> - u_int cnt;
> +xdr_opaque(
> + XDR *xdrs,
> + caddr_t cp,
> + u_int cnt)
> {
> u_int rndup;
> static int crud[BYTES_PER_XDR_UNIT];
> @@ -622,11 +622,11 @@ xdr_opaque(xdrs, cp, cnt)
> * If *cpp is NULL maxsize bytes are allocated
> */
> bool_t
> -xdr_bytes(xdrs, cpp, sizep, maxsize)
> - XDR *xdrs;
> - char **cpp;
> - u_int *sizep;
> - u_int maxsize;
> +xdr_bytes(
> + XDR *xdrs,
> + char **cpp,
> + u_int *sizep,
> + u_int maxsize)
> {
> char *sp = *cpp; /* sp is the actual string pointer */
> u_int nodesize;
> @@ -687,9 +687,9 @@ xdr_bytes(xdrs, cpp, sizep, maxsize)
> * Implemented here due to commonality of the object.
> */
> bool_t
> -xdr_netobj(xdrs, np)
> - XDR *xdrs;
> - struct netobj *np;
> +xdr_netobj(
> + XDR *xdrs,
> + struct netobj *np)
> {
>
> return (xdr_bytes(xdrs, &np->n_bytes, &np->n_len, MAX_NETOBJ_SZ));
> @@ -707,12 +707,12 @@ xdr_netobj(xdrs, np)
> * If there is no specific or default routine an error is returned.
> */
> bool_t
> -xdr_union(xdrs, dscmp, unp, choices, dfault)
> - XDR *xdrs;
> - enum_t *dscmp; /* enum to decide which arm to work on */
> - char *unp; /* the union itself */
> - const struct xdr_discrim *choices; /* [value, xdr proc] for each arm */
> - xdrproc_t dfault; /* default xdr routine */
> +xdr_union(
> + XDR *xdrs,
> + enum_t *dscmp, /* enum to decide which arm to work on */
> + char *unp, /* the union itself */
> + const struct xdr_discrim *choices, /* [value, xdr proc] for each arm */
> + xdrproc_t dfault) /* default xdr routine */
> {
> enum_t dscm;
>
> @@ -756,10 +756,10 @@ xdr_union(xdrs, dscmp, unp, choices, dfault)
> * of the string as specified by a protocol.
> */
> bool_t
> -xdr_string(xdrs, cpp, maxsize)
> - XDR *xdrs;
> - char **cpp;
> - u_int maxsize;
> +xdr_string(
> + XDR *xdrs,
> + char **cpp,
> + u_int maxsize)
> {
> char *sp = *cpp; /* sp is the actual string pointer */
> u_int size;
> @@ -839,9 +839,9 @@ xdr_string(xdrs, cpp, maxsize)
> * routines like clnt_call
> */
> bool_t
> -xdr_wrapstring(xdrs, cpp)
> - XDR *xdrs;
> - char **cpp;
> +xdr_wrapstring(
> + XDR *xdrs,
> + char **cpp)
> {
> return xdr_string(xdrs, cpp, RPC_MAXDATASIZE);
> }
> @@ -858,9 +858,9 @@ xdr_wrapstring(xdrs, cpp)
> * XDR 64-bit integers
> */
> bool_t
> -xdr_int64_t(xdrs, llp)
> - XDR *xdrs;
> - int64_t *llp;
> +xdr_int64_t(
> + XDR *xdrs,
> + int64_t *llp)
> {
> u_long ul[2];
>
> @@ -892,9 +892,9 @@ xdr_int64_t(xdrs, llp)
> * XDR unsigned 64-bit integers
> */
> bool_t
> -xdr_u_int64_t(xdrs, ullp)
> - XDR *xdrs;
> - u_int64_t *ullp;
> +xdr_u_int64_t(
> + XDR *xdrs,
> + u_int64_t *ullp)
> {
> u_long ul[2];
>
> @@ -926,9 +926,9 @@ xdr_u_int64_t(xdrs, ullp)
> * XDR unsigned 64-bit integers
> */
> bool_t
> -xdr_uint64_t(xdrs, ullp)
> - XDR *xdrs;
> - uint64_t *ullp;
> +xdr_uint64_t(
> + XDR *xdrs,
> + uint64_t *ullp)
> {
> return (xdr_u_int64_t(xdrs, (u_int64_t *)ullp));
> }
> @@ -938,9 +938,9 @@ xdr_uint64_t(xdrs, ullp)
> * XDR hypers
> */
> bool_t
> -xdr_hyper(xdrs, llp)
> - XDR *xdrs;
> - longlong_t *llp;
> +xdr_hyper(
> + XDR *xdrs,
> + longlong_t *llp)
> {
>
> /*
> @@ -955,9 +955,9 @@ xdr_hyper(xdrs, llp)
> * XDR unsigned hypers
> */
> bool_t
> -xdr_u_hyper(xdrs, ullp)
> - XDR *xdrs;
> - u_longlong_t *ullp;
> +xdr_u_hyper(
> + XDR *xdrs,
> + u_longlong_t *ullp)
> {
>
> /*
> @@ -972,9 +972,9 @@ xdr_u_hyper(xdrs, ullp)
> * XDR longlong_t's
> */
> bool_t
> -xdr_longlong_t(xdrs, llp)
> - XDR *xdrs;
> - longlong_t *llp;
> +xdr_longlong_t(
> + XDR *xdrs,
> + longlong_t *llp)
> {
>
> /*
> @@ -989,9 +989,9 @@ xdr_longlong_t(xdrs, llp)
> * XDR u_longlong_t's
> */
> bool_t
> -xdr_u_longlong_t(xdrs, ullp)
> - XDR *xdrs;
> - u_longlong_t *ullp;
> +xdr_u_longlong_t(
> + XDR *xdrs,
> + u_longlong_t *ullp)
> {
>
> /*
> @@ -1005,9 +1005,9 @@ xdr_u_longlong_t(xdrs, ullp)
> * XDR quad_t
> */
> bool_t
> -xdr_quad_t(xdrs, llp)
> - XDR *xdrs;
> - int64_t *llp;
> +xdr_quad_t(
> + XDR *xdrs,
> + int64_t *llp)
> {
> return (xdr_int64_t(xdrs, (int64_t *)llp));
> }
> @@ -1017,9 +1017,9 @@ xdr_quad_t(xdrs, llp)
> * XDR u_quad_t
> */
> bool_t
> -xdr_u_quad_t(xdrs, ullp)
> - XDR *xdrs;
> - u_int64_t *ullp;
> +xdr_u_quad_t(
> + XDR *xdrs,
> + u_int64_t *ullp)
> {
> return (xdr_u_int64_t(xdrs, (u_int64_t *)ullp));
> }
> diff --git a/src/xdr_array.c b/src/xdr_array.c
> index 7fc8fb8..d95512b 100644
> --- a/src/xdr_array.c
> +++ b/src/xdr_array.c
> @@ -55,13 +55,13 @@
> * xdr procedure to call to handle each element of the array.
> */
> bool_t
> -xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
> - XDR *xdrs;
> - caddr_t *addrp; /* array pointer */
> - u_int *sizep; /* number of elements */
> - u_int maxsize; /* max numberof elements */
> - u_int elsize; /* size in bytes of each element */
> - xdrproc_t elproc; /* xdr routine to handle each element */
> +xdr_array(
> + XDR *xdrs,
> + caddr_t *addrp, /* array pointer */
> + u_int *sizep, /* number of elements */
> + u_int maxsize, /* max numberof elements */
> + u_int elsize, /* size in bytes of each element */
> + xdrproc_t elproc) /* xdr routine to handle each element */
> {
> u_int i;
> caddr_t target = *addrp;
> @@ -133,12 +133,12 @@ xdr_array(xdrs, addrp, sizep, maxsize, elsize, elproc)
> * > xdr_elem: routine to XDR each element
> */
> bool_t
> -xdr_vector(xdrs, basep, nelem, elemsize, xdr_elem)
> - XDR *xdrs;
> - char *basep;
> - u_int nelem;
> - u_int elemsize;
> - xdrproc_t xdr_elem;
> +xdr_vector(
> + XDR *xdrs,
> + char *basep,
> + u_int nelem,
> + u_int elemsize,
> + xdrproc_t xdr_elem)
> {
> u_int i;
> char *elptr;
> diff --git a/src/xdr_float.c b/src/xdr_float.c
> index c86d516..280f606 100644
> --- a/src/xdr_float.c
> +++ b/src/xdr_float.c
> @@ -95,9 +95,9 @@ static struct sgl_limits {
> #endif /* vax */
>
> bool_t
> -xdr_float(xdrs, fp)
> - XDR *xdrs;
> - float *fp;
> +xdr_float(
> + XDR *xdrs,
> + float *fp)
> {
> #ifndef IEEEFP
> struct ieee_single is;
> @@ -197,9 +197,9 @@ static struct dbl_limits {
>
>
> bool_t
> -xdr_double(xdrs, dp)
> - XDR *xdrs;
> - double *dp;
> +xdr_double(
> + XDR *xdrs,
> + double *dp)
> {
> #ifdef IEEEFP
> int32_t *i32p;
> diff --git a/src/xdr_mem.c b/src/xdr_mem.c
> index ecdc932..9ece51f 100644
> --- a/src/xdr_mem.c
> +++ b/src/xdr_mem.c
> @@ -88,11 +88,11 @@ static const struct xdr_ops xdrmem_ops_unaligned = {
> * memory buffer.
> */
> void
> -xdrmem_create(xdrs, addr, size, op)
> - XDR *xdrs;
> - char *addr;
> - u_int size;
> - enum xdr_op op;
> +xdrmem_create(
> + XDR *xdrs,
> + char *addr,
> + u_int size,
> + enum xdr_op op)
> {
>
> xdrs->x_op = op;
> @@ -104,16 +104,15 @@ xdrmem_create(xdrs, addr, size, op)
>
> /*ARGSUSED*/
> static void
> -xdrmem_destroy(xdrs)
> - XDR *xdrs;
> +xdrmem_destroy(XDR *xdrs)
> {
>
> }
>
> static bool_t
> -xdrmem_getlong_aligned(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrmem_getlong_aligned(
> + XDR *xdrs,
> + long *lp)
> {
>
> if (xdrs->x_handy < sizeof(int32_t))
> @@ -125,9 +124,9 @@ xdrmem_getlong_aligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_putlong_aligned(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrmem_putlong_aligned(
> + XDR *xdrs,
> + const long *lp)
> {
>
> if (xdrs->x_handy < sizeof(int32_t))
> @@ -139,9 +138,9 @@ xdrmem_putlong_aligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_getlong_unaligned(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrmem_getlong_unaligned(
> + XDR *xdrs,
> + long *lp)
> {
> u_int32_t l;
>
> @@ -155,9 +154,9 @@ xdrmem_getlong_unaligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_putlong_unaligned(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrmem_putlong_unaligned(
> + XDR *xdrs,
> + const long *lp)
> {
> u_int32_t l;
>
> @@ -171,10 +170,10 @@ xdrmem_putlong_unaligned(xdrs, lp)
> }
>
> static bool_t
> -xdrmem_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrmem_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
>
> if (xdrs->x_handy < len)
> @@ -186,10 +185,10 @@ xdrmem_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrmem_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrmem_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
>
> if (xdrs->x_handy < len)
> @@ -201,8 +200,7 @@ xdrmem_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrmem_getpos(xdrs)
> - XDR *xdrs;
> +xdrmem_getpos(XDR *xdrs)
> {
>
> /* XXX w/64-bit pointers, u_int not enough! */
> @@ -210,9 +208,9 @@ xdrmem_getpos(xdrs)
> }
>
> static bool_t
> -xdrmem_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrmem_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
> char *newaddr = xdrs->x_base + pos;
> char *lastaddr = (char *)xdrs->x_private + xdrs->x_handy;
> @@ -225,9 +223,9 @@ xdrmem_setpos(xdrs, pos)
> }
>
> static int32_t *
> -xdrmem_inline_aligned(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrmem_inline_aligned(
> + XDR *xdrs,
> + u_int len)
> {
> int32_t *buf = 0;
>
> @@ -241,9 +239,9 @@ xdrmem_inline_aligned(xdrs, len)
>
> /* ARGSUSED */
> static int32_t *
> -xdrmem_inline_unaligned(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrmem_inline_unaligned(
> + XDR *xdrs,
> + u_int len)
> {
>
> return (0);
> diff --git a/src/xdr_rec.c b/src/xdr_rec.c
> index 676cc82..f088062 100644
> --- a/src/xdr_rec.c
> +++ b/src/xdr_rec.c
> @@ -152,15 +152,15 @@ static bool_t realloc_stream(RECSTREAM *, int);
> * calls expect that they take an opaque handle rather than an fd.
> */
> void
> -xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
> - XDR *xdrs;
> - u_int sendsize;
> - u_int recvsize;
> - void *tcp_handle;
> +xdrrec_create(
> + XDR *xdrs,
> + u_int sendsize,
> + u_int recvsize,
> + void *tcp_handle,
> /* like read, but pass it a tcp_handle, not sock */
> - int (*readit)(void *, void *, int);
> + int (*readit)(void *, void *, int),
> /* like write, but pass it a tcp_handle, not sock */
> - int (*writeit)(void *, void *, int);
> + int (*writeit)(void *, void *, int))
> {
> RECSTREAM *rstrm = mem_alloc(sizeof(RECSTREAM));
>
> @@ -220,9 +220,9 @@ xdrrec_create(xdrs, sendsize, recvsize, tcp_handle, readit, writeit)
> */
>
> static bool_t
> -xdrrec_getlong(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrrec_getlong(
> + XDR *xdrs,
> + long *lp)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int32_t *buflp = (int32_t *)(void *)(rstrm->in_finger);
> @@ -244,9 +244,9 @@ xdrrec_getlong(xdrs, lp)
> }
>
> static bool_t
> -xdrrec_putlong(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrrec_putlong(
> + XDR *xdrs,
> + const long *lp)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int32_t *dest_lp = ((int32_t *)(void *)(rstrm->out_finger));
> @@ -268,10 +268,10 @@ xdrrec_putlong(xdrs, lp)
> }
>
> static bool_t /* must manage buffers, fragments, and records */
> -xdrrec_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrrec_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> int current;
> @@ -296,10 +296,10 @@ xdrrec_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrrec_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrrec_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> size_t current;
> @@ -322,8 +322,7 @@ xdrrec_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrrec_getpos(xdrs)
> - XDR *xdrs;
> +xdrrec_getpos(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> off_t pos;
> @@ -348,9 +347,9 @@ xdrrec_getpos(xdrs)
> }
>
> static bool_t
> -xdrrec_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrrec_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> u_int currpos = xdrrec_getpos(xdrs);
> @@ -387,9 +386,9 @@ xdrrec_setpos(xdrs, pos)
> }
>
> static int32_t *
> -xdrrec_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrrec_inline(
> + XDR *xdrs,
> + u_int len)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
> int32_t *buf = NULL;
> @@ -419,8 +418,7 @@ xdrrec_inline(xdrs, len)
> }
>
> static void
> -xdrrec_destroy(xdrs)
> - XDR *xdrs;
> +xdrrec_destroy(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private;
>
> @@ -439,8 +437,7 @@ xdrrec_destroy(xdrs)
> * this procedure to guarantee proper record alignment.
> */
> bool_t
> -xdrrec_skiprecord(xdrs)
> - XDR *xdrs;
> +xdrrec_skiprecord(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> enum xprt_stat xstat;
> @@ -475,8 +472,7 @@ xdrrec_skiprecord(xdrs)
> * after consuming the rest of the current record.
> */
> bool_t
> -xdrrec_eof(xdrs)
> - XDR *xdrs;
> +xdrrec_eof(XDR *xdrs)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
>
> @@ -499,9 +495,9 @@ xdrrec_eof(xdrs)
> * pipelined procedure calls.) TRUE => immmediate flush to tcp connection.
> */
> bool_t
> -xdrrec_endofrecord(xdrs, sendnow)
> - XDR *xdrs;
> - bool_t sendnow;
> +xdrrec_endofrecord(
> + XDR *xdrs,
> + bool_t sendnow)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> u_long len; /* fragment length */
> @@ -525,10 +521,10 @@ xdrrec_endofrecord(xdrs, sendnow)
> * Return true if a record is available in the buffer, false if not.
> */
> bool_t
> -__xdrrec_getrec(xdrs, statp, expectdata)
> - XDR *xdrs;
> - enum xprt_stat *statp;
> - bool_t expectdata;
> +__xdrrec_getrec(
> + XDR *xdrs,
> + enum xprt_stat *statp,
> + bool_t expectdata)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
> ssize_t n;
> @@ -615,9 +611,9 @@ __xdrrec_getrec(xdrs, statp, expectdata)
> }
>
> bool_t
> -__xdrrec_setnonblock(xdrs, maxrec)
> - XDR *xdrs;
> - int maxrec;
> +__xdrrec_setnonblock(
> + XDR *xdrs,
> + int maxrec)
> {
> RECSTREAM *rstrm = (RECSTREAM *)(xdrs->x_private);
>
> @@ -632,9 +628,9 @@ __xdrrec_setnonblock(xdrs, maxrec)
> * Internal useful routines
> */
> static bool_t
> -flush_out(rstrm, eor)
> - RECSTREAM *rstrm;
> - bool_t eor;
> +flush_out(
> + RECSTREAM *rstrm,
> + bool_t eor)
> {
> u_int32_t eormask = (eor == TRUE) ? LAST_FRAG : 0;
> u_int32_t len = (u_int32_t)((u_long)(rstrm->out_finger) -
> @@ -652,8 +648,7 @@ flush_out(rstrm, eor)
> }
>
> static bool_t /* knows nothing about records! Only about input buffers */
> -fill_input_buf(rstrm)
> - RECSTREAM *rstrm;
> +fill_input_buf(RECSTREAM *rstrm)
> {
> char *where;
> u_int32_t i;
> @@ -675,10 +670,10 @@ fill_input_buf(rstrm)
> }
>
> static bool_t /* knows nothing about records! Only about input buffers */
> -get_input_bytes(rstrm, addr, len)
> - RECSTREAM *rstrm;
> - char *addr;
> - int len;
> +get_input_bytes(
> + RECSTREAM *rstrm,
> + char *addr,
> + int len)
> {
> size_t current;
>
> @@ -708,8 +703,7 @@ get_input_bytes(rstrm, addr, len)
> }
>
> static bool_t /* next two bytes of the input stream are treated as a header */
> -set_input_fragment(rstrm)
> - RECSTREAM *rstrm;
> +set_input_fragment(RECSTREAM *rstrm)
> {
> u_int32_t header;
>
> @@ -734,9 +728,9 @@ set_input_fragment(rstrm)
> }
>
> static bool_t /* consumes input bytes; knows nothing about records! */
> -skip_input_bytes(rstrm, cnt)
> - RECSTREAM *rstrm;
> - long cnt;
> +skip_input_bytes(
> + RECSTREAM *rstrm,
> + long cnt)
> {
> u_int32_t current;
>
> @@ -756,8 +750,7 @@ skip_input_bytes(rstrm, cnt)
> }
>
> static u_int
> -fix_buf_size(s)
> - u_int s;
> +fix_buf_size(u_int s)
> {
>
> if (s < 100)
> @@ -769,9 +762,9 @@ fix_buf_size(s)
> * Reallocate the input buffer for a non-block stream.
> */
> static bool_t
> -realloc_stream(rstrm, size)
> - RECSTREAM *rstrm;
> - int size;
> +realloc_stream(
> + RECSTREAM *rstrm,
> + int size)
> {
> ptrdiff_t diff;
> char *buf;
> diff --git a/src/xdr_reference.c b/src/xdr_reference.c
> index 13f6410..9c7b24e 100644
> --- a/src/xdr_reference.c
> +++ b/src/xdr_reference.c
> @@ -58,11 +58,11 @@
> * proc is the routine to handle the referenced structure.
> */
> bool_t
> -xdr_reference(xdrs, pp, size, proc)
> - XDR *xdrs;
> - caddr_t *pp; /* the pointer to work on */
> - u_int size; /* size of the object pointed to */
> - xdrproc_t proc; /* xdr routine to handle the object */
> +xdr_reference(
> + XDR *xdrs,
> + caddr_t *pp, /* the pointer to work on */
> + u_int size, /* size of the object pointed to */
> + xdrproc_t proc) /* xdr routine to handle the object */
> {
> caddr_t loc = *pp;
> bool_t stat;
> @@ -115,11 +115,11 @@ xdr_reference(xdrs, pp, size, proc)
> *
> */
> bool_t
> -xdr_pointer(xdrs,objpp,obj_size,xdr_obj)
> - XDR *xdrs;
> - char **objpp;
> - u_int obj_size;
> - xdrproc_t xdr_obj;
> +xdr_pointer(
> + XDR *xdrs,
> + char **objpp,
> + u_int obj_size,
> + xdrproc_t xdr_obj)
> {
>
> bool_t more_data;
> diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
> index 79d6707..af3c313 100644
> --- a/src/xdr_sizeof.c
> +++ b/src/xdr_sizeof.c
> @@ -44,9 +44,7 @@
>
> /* ARGSUSED */
> static bool_t
> -x_putlong(xdrs, longp)
> - XDR *xdrs;
> - long *longp;
> +x_putlong(XDR *xdrs, const long *longp)
> {
> xdrs->x_handy += BYTES_PER_XDR_UNIT;
> return (TRUE);
> @@ -54,36 +52,31 @@ x_putlong(xdrs, longp)
>
> /* ARGSUSED */
> static bool_t
> -x_putbytes(xdrs, bp, len)
> - XDR *xdrs;
> - char *bp;
> - u_int len;
> +x_putbytes(
> + XDR *xdrs,
> + const char *bp,
> + u_int len)
> {
> xdrs->x_handy += len;
> return (TRUE);
> }
>
> static u_int
> -x_getpostn(xdrs)
> - XDR *xdrs;
> +x_getpostn(XDR *xdrs)
> {
> return (xdrs->x_handy);
> }
>
> /* ARGSUSED */
> static bool_t
> -x_setpostn(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +x_setpostn(XDR *xdrs, u_int pos)
> {
> /* This is not allowed */
> return (FALSE);
> }
>
> static int32_t *
> -x_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +x_inline(XDR *xdrs, u_int len)
> {
> if (len == 0) {
> return (NULL);
> @@ -117,8 +110,7 @@ harmless()
> }
>
> static void
> -x_destroy(xdrs)
> - XDR *xdrs;
> +x_destroy(XDR *xdrs)
> {
> xdrs->x_handy = 0;
> xdrs->x_base = 0;
> @@ -130,9 +122,7 @@ x_destroy(xdrs)
> }
>
> unsigned long
> -xdr_sizeof(func, data)
> - xdrproc_t func;
> - void *data;
> +xdr_sizeof(xdrproc_t func, void *data)
> {
> XDR x;
> struct xdr_ops ops;
> diff --git a/src/xdr_stdio.c b/src/xdr_stdio.c
> index 846c7bf..699de39 100644
> --- a/src/xdr_stdio.c
> +++ b/src/xdr_stdio.c
> @@ -74,10 +74,10 @@ static const struct xdr_ops xdrstdio_ops = {
> * Operation flag is set to op.
> */
> void
> -xdrstdio_create(xdrs, file, op)
> - XDR *xdrs;
> - FILE *file;
> - enum xdr_op op;
> +xdrstdio_create(
> + XDR *xdrs,
> + FILE *file,
> + enum xdr_op op)
> {
>
> xdrs->x_op = op;
> @@ -92,17 +92,16 @@ xdrstdio_create(xdrs, file, op)
> * Cleans up the xdr stream handle xdrs previously set up by xdrstdio_create.
> */
> static void
> -xdrstdio_destroy(xdrs)
> - XDR *xdrs;
> +xdrstdio_destroy(XDR *xdrs)
> {
> (void)fflush((FILE *)xdrs->x_private);
> /* XXX: should we close the file ?? */
> }
>
> static bool_t
> -xdrstdio_getlong(xdrs, lp)
> - XDR *xdrs;
> - long *lp;
> +xdrstdio_getlong(
> + XDR *xdrs,
> + long *lp)
> {
> int32_t mycopy;
>
> @@ -114,9 +113,9 @@ xdrstdio_getlong(xdrs, lp)
> }
>
> static bool_t
> -xdrstdio_putlong(xdrs, lp)
> - XDR *xdrs;
> - const long *lp;
> +xdrstdio_putlong(
> + XDR *xdrs,
> + const long *lp)
> {
> int32_t mycopy;
>
> @@ -132,10 +131,10 @@ xdrstdio_putlong(xdrs, lp)
> }
>
> static bool_t
> -xdrstdio_getbytes(xdrs, addr, len)
> - XDR *xdrs;
> - char *addr;
> - u_int len;
> +xdrstdio_getbytes(
> + XDR *xdrs,
> + char *addr,
> + u_int len)
> {
>
> if ((len != 0) && (fread(addr, (size_t)len, 1, (FILE *)xdrs->x_private) != 1))
> @@ -144,10 +143,10 @@ xdrstdio_getbytes(xdrs, addr, len)
> }
>
> static bool_t
> -xdrstdio_putbytes(xdrs, addr, len)
> - XDR *xdrs;
> - const char *addr;
> - u_int len;
> +xdrstdio_putbytes(
> + XDR *xdrs,
> + const char *addr,
> + u_int len)
> {
>
> if ((len != 0) && (fwrite(addr, (size_t)len, 1,
> @@ -157,17 +156,16 @@ xdrstdio_putbytes(xdrs, addr, len)
> }
>
> static u_int
> -xdrstdio_getpos(xdrs)
> - XDR *xdrs;
> +xdrstdio_getpos(XDR *xdrs)
> {
>
> return ((u_int) ftell((FILE *)xdrs->x_private));
> }
>
> static bool_t
> -xdrstdio_setpos(xdrs, pos)
> - XDR *xdrs;
> - u_int pos;
> +xdrstdio_setpos(
> + XDR *xdrs,
> + u_int pos)
> {
>
> return ((fseek((FILE *)xdrs->x_private, (long)pos, 0) < 0) ?
> @@ -176,9 +174,9 @@ xdrstdio_setpos(xdrs, pos)
>
> /* ARGSUSED */
> static int32_t *
> -xdrstdio_inline(xdrs, len)
> - XDR *xdrs;
> - u_int len;
> +xdrstdio_inline(
> + XDR *xdrs,
> + u_int len)
> {
>
> /*
|
|
From: Steve D. <st...@re...> - 2025-08-21 11:15:56
|
With newer compilers (gcc 15.1.1) -Wold-style-definition
flag is set by default which causes warnings for
most of the functions in these files.
warning: old-style function definition [-Wold-style-definition]
The warnings are remove by converting the old-style
function definitions into modern-style definitions
Signed-off-by: Steve Dickson <st...@re...>
---
src/auth_time.c | 42 +++++++++++++++++++-----------------------
src/auth_unix.c | 29 +++++++++++------------------
src/authunix_prot.c | 4 +---
3 files changed, 31 insertions(+), 44 deletions(-)
diff --git a/src/auth_time.c b/src/auth_time.c
index c21b1df..16de1aa 100644
--- a/src/auth_time.c
+++ b/src/auth_time.c
@@ -58,8 +58,7 @@
static int saw_alarm = 0;
static void
-alarm_hndler(s)
- int s;
+alarm_hndler(int s)
{
saw_alarm = 1;
return;
@@ -80,12 +79,9 @@ alarm_hndler(s)
* Turn a 'universal address' into a struct sockaddr_in.
* Bletch.
*/
-static int uaddr_to_sockaddr(uaddr, sin)
-#ifdef foo
- endpoint *endpt;
-#endif
- char *uaddr;
- struct sockaddr_in *sin;
+static int uaddr_to_sockaddr(
+ char *uaddr,
+ struct sockaddr_in *sin)
{
unsigned char p_bytes[2];
int i;
@@ -115,9 +111,9 @@ static int uaddr_to_sockaddr(uaddr, sin)
* Free the strings that were strduped into the eps structure.
*/
static void
-free_eps(eps, num)
- endpoint eps[];
- int num;
+free_eps(
+ endpoint eps[],
+ int num)
{
int i;
@@ -141,12 +137,12 @@ free_eps(eps, num)
* structure already populated.
*/
static nis_server *
-get_server(sin, host, srv, eps, maxep)
- struct sockaddr_in *sin;
- char *host; /* name of the time host */
- nis_server *srv; /* nis_server struct to use. */
- endpoint eps[]; /* array of endpoints */
- int maxep; /* max array size */
+get_server(
+ struct sockaddr_in *sin,
+ char *host, /* name of the time host */
+ nis_server *srv, /* nis_server struct to use. */
+ endpoint eps[], /* array of endpoints */
+ int maxep) /* max array size */
{
char hname[256];
int num_ep = 0, i;
@@ -226,12 +222,12 @@ get_server(sin, host, srv, eps, maxep)
* td = "server" - "client"
*/
int
-__rpc_get_time_offset(td, srv, thost, uaddr, netid)
- struct timeval *td; /* Time difference */
- nis_server *srv; /* NIS Server description */
- char *thost; /* if no server, this is the timehost */
- char **uaddr; /* known universal address */
- struct sockaddr_in *netid; /* known network identifier */
+__rpc_get_time_offset(
+ struct timeval *td, /* Time difference */
+ nis_server *srv, /* NIS Server description */
+ char *thost, /* if no server, this is the timehost */
+ char **uaddr, /* known universal address */
+ struct sockaddr_in *netid) /* known network identifier */
{
CLIENT *clnt; /* Client handle */
endpoint *ep, /* useful endpoints */
diff --git a/src/auth_unix.c b/src/auth_unix.c
index fc2be02..78a76b6 100644
--- a/src/auth_unix.c
+++ b/src/auth_unix.c
@@ -82,12 +82,12 @@ struct audata {
* Returns an auth handle with the given stuff in it.
*/
AUTH *
-authunix_create(machname, uid, gid, len, aup_gids)
- char *machname;
- uid_t uid;
- gid_t gid;
- int len;
- gid_t *aup_gids;
+authunix_create(
+ char *machname,
+ uid_t uid,
+ gid_t gid,
+ int len,
+ gid_t *aup_gids)
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
@@ -251,16 +251,13 @@ out_err:
/* ARGSUSED */
static void
-authunix_nextverf(auth)
- AUTH *auth;
+authunix_nextverf(AUTH *auth)
{
/* no action necessary */
}
static bool_t
-authunix_marshal(auth, xdrs)
- AUTH *auth;
- XDR *xdrs;
+authunix_marshal(AUTH *auth, XDR *xdrs)
{
struct audata *au;
@@ -272,9 +269,7 @@ authunix_marshal(auth, xdrs)
}
static bool_t
-authunix_validate(auth, verf)
- AUTH *auth;
- struct opaque_auth *verf;
+authunix_validate(AUTH *auth, struct opaque_auth *verf)
{
struct audata *au;
XDR xdrs;
@@ -350,8 +345,7 @@ done:
}
static void
-authunix_destroy(auth)
- AUTH *auth;
+authunix_destroy(AUTH *auth)
{
struct audata *au;
@@ -376,8 +370,7 @@ authunix_destroy(auth)
* sets private data, au_marshed and au_mpos
*/
static void
-marshal_new_auth(auth)
- AUTH *auth;
+marshal_new_auth(AUTH *auth)
{
XDR xdr_stream;
XDR *xdrs = &xdr_stream;
diff --git a/src/authunix_prot.c b/src/authunix_prot.c
index 0a04336..32e6f8b 100644
--- a/src/authunix_prot.c
+++ b/src/authunix_prot.c
@@ -45,9 +45,7 @@
* XDR for unix authentication parameters.
*/
bool_t
-xdr_authunix_parms(xdrs, p)
- XDR *xdrs;
- struct authunix_parms *p;
+xdr_authunix_parms(XDR *xdrs, struct authunix_parms *p)
{
assert(xdrs != NULL);
--
2.50.1
|
|
From: Steve D. <st...@re...> - 2025-08-21 11:15:56
|
With newer compilers (gcc 15.1.1) -Wold-style-definition
flag is set by default which causes warnings for
most of the functions in these files.
warning: old-style function definition [-Wold-style-definition]
The warnings are remove by converting the old-style
function definitions into modern-style definitions
Signed-off-by: Steve Dickson <st...@re...>
---
src/bindresvport.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/bindresvport.c b/src/bindresvport.c
index efeb1cc..7b2056d 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -147,9 +147,7 @@ load_blacklist (void)
}
int
-bindresvport_sa(sd, sa)
- int sd;
- struct sockaddr *sa;
+bindresvport_sa(int sd, struct sockaddr *sa)
{
int res, af;
struct sockaddr_storage myaddr;
--
2.50.1
|
|
From: Steve D. <st...@re...> - 2025-08-21 11:15:55
|
With newer compilers (gcc 15.1.1) -Wold-style-definition
flag is set by default which causes warnings for
most of the functions in these files.
warning: old-style function definition [-Wold-style-definition]
The warnings are remove by converting the old-style
function definitions into modern-style definitions
Signed-off-by: Steve Dickson <st...@re...>
---
src/key_call.c | 58 +++++++++++++++++++++++---------------------------
1 file changed, 27 insertions(+), 31 deletions(-)
diff --git a/src/key_call.c b/src/key_call.c
index 43f990e..e33e444 100644
--- a/src/key_call.c
+++ b/src/key_call.c
@@ -79,8 +79,7 @@ des_block *(*__key_gendes_LOCAL)(uid_t, char *) = 0;
static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
int
-key_setsecret(secretkey)
- const char *secretkey;
+key_setsecret(const char *secretkey)
{
keystatus status;
@@ -122,10 +121,10 @@ key_secretkey_is_set(void)
}
int
-key_encryptsession_pk(remotename, remotekey, deskey)
- char *remotename;
- netobj *remotekey;
- des_block *deskey;
+key_encryptsession_pk(
+ char *remotename,
+ netobj *remotekey,
+ des_block *deskey)
{
cryptkeyarg2 arg;
cryptkeyres res;
@@ -146,10 +145,10 @@ key_encryptsession_pk(remotename, remotekey, deskey)
}
int
-key_decryptsession_pk(remotename, remotekey, deskey)
- char *remotename;
- netobj *remotekey;
- des_block *deskey;
+key_decryptsession_pk(
+ char *remotename,
+ netobj *remotekey,
+ des_block *deskey)
{
cryptkeyarg2 arg;
cryptkeyres res;
@@ -170,9 +169,9 @@ key_decryptsession_pk(remotename, remotekey, deskey)
}
int
-key_encryptsession(remotename, deskey)
- const char *remotename;
- des_block *deskey;
+key_encryptsession(
+ const char *remotename,
+ des_block *deskey)
{
cryptkeyarg arg;
cryptkeyres res;
@@ -192,9 +191,9 @@ key_encryptsession(remotename, deskey)
}
int
-key_decryptsession(remotename, deskey)
- const char *remotename;
- des_block *deskey;
+key_decryptsession(
+ const char *remotename,
+ des_block *deskey)
{
cryptkeyarg arg;
cryptkeyres res;
@@ -214,8 +213,7 @@ key_decryptsession(remotename, deskey)
}
int
-key_gendes(key)
- des_block *key;
+key_gendes(des_block *key)
{
if (!key_call((u_long)KEY_GEN, (xdrproc_t)xdr_void, NULL,
(xdrproc_t)xdr_des_block, key)) {
@@ -225,8 +223,7 @@ key_gendes(key)
}
int
-key_setnet(arg)
-struct key_netstarg *arg;
+key_setnet(struct key_netstarg *arg)
{
keystatus status;
@@ -245,9 +242,9 @@ struct key_netstarg *arg;
int
-key_get_conv(pkey, deskey)
- char *pkey;
- des_block *deskey;
+key_get_conv(
+ char *pkey,
+ des_block *deskey)
{
cryptkeyres res;
@@ -286,8 +283,7 @@ key_call_destroy(void *vp)
* Keep the handle cached. This call may be made quite often.
*/
static CLIENT *
-getkeyserv_handle(vers)
-int vers;
+getkeyserv_handle(int vers)
{
void *localhandle;
struct netconfig *nconf;
@@ -396,12 +392,12 @@ int vers;
/* returns 0 on failure, 1 on success */
static int
-key_call(proc, xdr_arg, arg, xdr_rslt, rslt)
- u_long proc;
- xdrproc_t xdr_arg;
- void *arg;
- xdrproc_t xdr_rslt;
- void *rslt;
+key_call(
+ u_long proc,
+ xdrproc_t xdr_arg,
+ void *arg,
+ xdrproc_t xdr_rslt,
+ void *rslt)
{
CLIENT *clnt;
struct timeval wait_time;
--
2.50.1
|
|
From: Steve D. <st...@re...> - 2025-08-21 11:15:52
|
With newer compilers (gcc 15.1.1) -Wold-style-definition
flag is set by default which causes warnings for
most of the functions in these files.
warning: old-style function definition [-Wold-style-definition]
The warnings are remove by converting the old-style
function definitions into modern-style definitions
Signed-off-by: Steve Dickson <st...@re...>
---
src/getnetconfig.c | 24 +++++++++---------------
src/getnetpath.c | 12 +++++-------
src/getpublickey.c | 20 ++++++++++----------
src/getrpcport.c | 8 +++++---
4 files changed, 29 insertions(+), 35 deletions(-)
diff --git a/src/getnetconfig.c b/src/getnetconfig.c
index d547dce..58c4a5c 100644
--- a/src/getnetconfig.c
+++ b/src/getnetconfig.c
@@ -218,8 +218,7 @@ setnetconfig()
*/
struct netconfig *
-getnetconfig(handlep)
-void *handlep;
+getnetconfig(void *handlep)
{
struct netconfig_vars *ncp = (struct netconfig_vars *)handlep;
char *stringp; /* tmp string pointer */
@@ -354,8 +353,7 @@ void *handlep;
* previously).
*/
int
-endnetconfig(handlep)
-void *handlep;
+endnetconfig(void *handlep)
{
struct netconfig_vars *nc_handlep = (struct netconfig_vars *)handlep;
@@ -417,8 +415,7 @@ void *handlep;
*/
struct netconfig *
-getnetconfigent(netid)
- const char *netid;
+getnetconfigent(const char *netid)
{
FILE *file; /* NETCONFIG db's file pointer */
char *linep; /* holds current netconfig line */
@@ -516,8 +513,7 @@ getnetconfigent(netid)
*/
void
-freenetconfigent(netconfigp)
- struct netconfig *netconfigp;
+freenetconfigent(struct netconfig *netconfigp)
{
if (netconfigp != NULL) {
free(netconfigp->nc_netid); /* holds all netconfigp's strings */
@@ -541,9 +537,9 @@ freenetconfigent(netconfigp)
*/
static int
-parse_ncp(stringp, ncp)
-char *stringp; /* string to parse */
-struct netconfig *ncp; /* where to put results */
+parse_ncp(
+char *stringp, /* string to parse */
+struct netconfig *ncp) /* where to put results */
{
char *tokenp; /* for processing tokens */
char *lasts;
@@ -661,8 +657,7 @@ nc_sperror()
* Prints a message onto standard error describing the reason for failure.
*/
void
-nc_perror(s)
- const char *s;
+nc_perror(const char *s)
{
fprintf(stderr, "%s: %s\n", s, nc_sperror());
}
@@ -671,8 +666,7 @@ nc_perror(s)
* Duplicates the matched netconfig buffer.
*/
static struct netconfig *
-dup_ncp(ncp)
-struct netconfig *ncp;
+dup_ncp(struct netconfig *ncp)
{
struct netconfig *p;
char *tmp;
diff --git a/src/getnetpath.c b/src/getnetpath.c
index ea1a18c..795ea26 100644
--- a/src/getnetpath.c
+++ b/src/getnetpath.c
@@ -129,8 +129,7 @@ setnetpath()
*/
struct netconfig *
-getnetpath(handlep)
- void *handlep;
+getnetpath(void *handlep)
{
struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep;
struct netconfig *ncp = NULL; /* temp. holds a netconfig session */
@@ -185,8 +184,7 @@ getnetpath(handlep)
* (e.g. if setnetpath() was not called previously.
*/
int
-endnetpath(handlep)
- void *handlep;
+endnetpath(void *handlep)
{
struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep;
struct netpath_chain *chainp, *lastp;
@@ -222,9 +220,9 @@ endnetpath(handlep)
*/
char *
-_get_next_token(npp, token)
-char *npp; /* string */
-int token; /* char to parse string for */
+_get_next_token(
+char *npp, /* string */
+int token) /* char to parse string for */
{
char *cp; /* char pointer */
char *np; /* netpath pointer */
diff --git a/src/getpublickey.c b/src/getpublickey.c
index 4e96c7c..9d6b58c 100644
--- a/src/getpublickey.c
+++ b/src/getpublickey.c
@@ -58,16 +58,16 @@ int (*__getpublickey_LOCAL)(const char *, char *) = 0;
* Get somebody's public key
*/
int
-__getpublickey_real(netname, publickey)
- char *netname;
- char *publickey;
+__getpublickey_real(
+ const char *netname,
+ char *publickey)
{
char lookup[3 * HEXKEYBYTES];
char *p;
if (publickey == NULL)
return (0);
- if (!getpublicandprivatekey(netname, lookup))
+ if (!getpublicandprivatekey((char *)netname, lookup))
return (0);
p = strchr(lookup, ':');
if (p == NULL) {
@@ -85,9 +85,9 @@ __getpublickey_real(netname, publickey)
*/
int
-getpublicandprivatekey(key, ret)
- char *key;
- char *ret;
+getpublicandprivatekey(
+ char *key,
+ char *ret)
{
char buf[1024]; /* big enough */
char *res;
@@ -159,9 +159,9 @@ getpublicandprivatekey(key, ret)
}
}
-int getpublickey(netname, publickey)
- const char *netname;
- char *publickey;
+int getpublickey(
+ const char *netname,
+ char *publickey)
{
if (__getpublickey_LOCAL != NULL)
return(__getpublickey_LOCAL(netname, publickey));
diff --git a/src/getrpcport.c b/src/getrpcport.c
index c28cd61..497a2a2 100644
--- a/src/getrpcport.c
+++ b/src/getrpcport.c
@@ -43,9 +43,11 @@
#include <rpc/pmap_clnt.h>
int
-getrpcport(host, prognum, versnum, proto)
- char *host;
- int prognum, versnum, proto;
+getrpcport(
+ char *host,
+ int prognum,
+ int versnum,
+ int proto)
{
struct sockaddr_in addr;
struct hostent *hp;
--
2.50.1
|