bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug-fix for the "newstyle" option -N of rpcgen in glibc-2


From: Patrick Duval
Subject: bug-fix for the "newstyle" option -N of rpcgen in glibc-2
Date: Mon, 27 Aug 2001 18:30:40 +0200

Hi,

Here is the bug-fix for the "newstyle" option -N of rpcgen, the
network code generator in glibc-2 (I could not access the GNAT web,
sorry).

Bug: the "project_xdr.c" file produced by "rpcgen -N project.x" does
     not compile, due to the generation of wrong C-types declarations
     by rpcgen:

     $ make
     rpcgen -N -C project.x
       --> generates the files project.h and project_xdr.c
     gcc -Wall -c project_xdr.c -o project_xdr.o
       --> compilation error:
     project_xdr.c: At top level:
     project_xdr.c:24: conflicting types for `xdr_project_1_argument'
     project.h:52: previous declaration of `xdr_project_1_argument'
     make: *** [project_xdr.o] Error 1

Fix: There is a typo in glibc/sunrpc/rpc_hout.c (one char of diff, see
     below, I tracked it rather quickly using gdb, once I got all the
     glibc source installed...).

Env: I tested this fix using several academic projects, both on:

     glibc-2.1.2-11 on linux x86 (redhat-6.1) and
     glibc-2.1.1-6c on linux ppc (linuxppc-R5).

Patch:

$ diff -c glibc/sunrpc/rpc_hout.c.ORIG glibc/sunrpc/rpc_hout.c > patch
----------------------------------------------------------------
*** glibc/sunrpc/rpc_hout.c.ORIG        Tue Dec  1 12:23:36 1998
--- glibc/sunrpc/rpc_hout.c     Fri Apr 28 20:46:33 2000
***************
*** 189,195 ****
            }
          f_print (fout, "};\n");
          f_print (fout, "typedef struct %s %s;\n", name, name);
!         storexdrfuncdecl (name, 0);
          f_print (fout, "\n");
        }
      }
--- 189,195 ----
            }
          f_print (fout, "};\n");
          f_print (fout, "typedef struct %s %s;\n", name, name);
!         storexdrfuncdecl (name, 1);
          f_print (fout, "\n");
        }
      }
$ 
----------------------------------------------------------------

I hope this helps - give me a word of feed-back if possible (the
rpcgen version in libc-common-2.2.2-10 - redhat-7.1 - does not accept
anymore the newstyle option -N (???).

Cheers,

Patrick.
--
mailto:address@hidden  Patrick Duval, ESILV, Dept Genie Informatique
tel: 01 41 16 73 06              Pole Universitaire Leonard de Vinci
fax: 01 41 16 71 71              92916 Paris La Defense - Cedex (France)
http://www.devinci.fr/gi/people/patrick.duval



reply via email to

[Prev in Thread] Current Thread [Next in Thread]