Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2000 23:04:02 +0200 (IST)
From:      vns@visiontech-dml.com
To:        Nick Sayer <nsayer@quack.kfu.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: XDR porting problems
Message-ID:  <200004142104.XAA12255@dmz.visiontech-dml.com>

next in thread | raw e-mail | index | archive | help

Hi!

Just try to use the next hack:
#define xdrproc_t hack_xdrproc_t
#include <rpc/xdr.h>
#undef xdrproc_t
typedef bool_t (*xdrproc_t) __P((XDR *, void *, ...));

But probably it's better to fix this problem in the  
/usr/src/include/rpc/xdr.h file.

With best regards, 
Vladimir Silyaev

--------------------------------------------------

in RELENG_4, /usr/src/include/rpc/xdr.h, there is...

#ifdef _KERNEL
typedef bool_t (*xdrproc_t) __P((XDR *, void *, u_int));
#else
/*
 * XXX can't actually prototype it, because some take 
two args!!!
 */
typedef bool_t (*xdrproc_t) __P((/* XDR *, void *, u_int 
*/));
#endif

This causes heartburn for a program I'm trying to port. 
Specifically,
compiling a .cxx says that I am using too many 
arguments.

Changing the 2nd typedef to

typedef bool_t (*xdrproc_t) __P((XDR *, void *, ...));

fixes this. I am not enough of a language pedant to 
understand all
possible ramifications of this change. Can anyone 
suggest any
alternatives? I dug around quite a bit and could find no 
way
to compile the code in question without changing the 
system include
files. If this is the right thing to do, I would like to 
commit it.
If there is a better thing to do, I'd like to hear about 
it.





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004142104.XAA12255>