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)


> 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.

Oops, looks like it's user error, sorry.
I got the impression from O'Reilly's Power Programming with RPC book
that I should use bool_t for booleans in my .x file but if I change the
bool_t to bool in the .x file then everything works.
I noticed some errors in that book so I should have known better than
to trust it.

> 
> Any ideas what's wrong here?
> 
> Andreas
> 
> 
> P.S. David, please always use the glibcbug script to report errors.
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 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
> 



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