This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: rpcgen bug or user error? (PR libc/1191)



Hello,

On Wed, Jul 07, Andreas Jaeger wrote:

> 
> Hi all,
> 
> David send the appended bug report where he reports an error in
> rpcgen.  I run the code through rpcgen on Solaris 7 and can confirm
> that the code is broken.
> 
> Any ideas what's wrong here?

Yes, bool_t is not a standard type for .x files. bool is the type
defined in RFC 1014 which should be used here. If somebody wishes to 
use bool_t, he had to define it in the .x file, so that rpcgen could
generate a xdr_bool_t function. Or he must use bool.

  Thorsten


> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: dh@erewhon.ak.planet.co.nz (David Hodges)
> Subject: bug in rpcgen (glibc 2)
> To: bugs@gnu.org
> 
> I am using glibc 2.?.? (not sure exactly which version but I suspect that
> this bug is in all of them) and I have discovered that rpcgen sometimes
> generates invalid C code. This bug also occurs in Linux libc 5 and on
> QNX so it is presumably inherited from the original Sun source.
> If I run rpcgen on the following code:
> 
> typedef string employeeid<8>;
> typedef string encryptedpassword<16>;
> 
> struct npw {
>    employeeid user;
>    encryptedpassword password;
> };
> typedef struct npw employeeIDandPassword;
> 
> program LoginServer {
>    version VER {
>       bool_t isValidPassword( employeeIDandPassword ) = 1;
>       long employeeIdToCDPDAddress( employeeid ) = 2;
>    } = 1;
> } = 0x20123456;
> 
> it generates references to xdr_bool_t which I must change to xdr_bool in
> order to get the C code to compile.
> 
> 
> -- 
>  Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
>   for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

-- 
Thorsten Kukuk      http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE GmbH           Deutschherrenstr. 15-19         90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]