Xref: utzoo comp.sys.hp:2359 comp.unix.wizards:17117 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!mcvax!cernvax!mecazh!paul From: paul@mecazh.UUCP (Paul Breslaw) Newsgroups: comp.sys.hp,comp.unix.wizards Subject: Problem with rpcgen on HP-UX Keywords: rpcgen, RPC Message-ID: <348@node17.mecazh.UUCP> Date: 4 Jul 89 13:48:27 GMT Organization: Mecasoft SA, Zurich, Switzerland Lines: 85 I am using rpcgen on an HP 9000/340 under HP-UX 6.5 and have hit a problem with the way rpcgen translates RPC typedefs into C. I have run the same file through rpcgen on a Sun 3/50 (SunOS 3.5) and got different results. Here are the details. This is the RPC source file. /* foo.x - RPC example */ typedef double REAL; typedef char NAME[ 32 ]; typedef int INTEGER; program FOOPROG { version FOOVERS { void foo_p1( REAL ) = 1; void foo_p2( NAME ) = 2; void foo_p3( INTEGER ) = 3; } = 1; } = 99; On HP-UX after running it through rpcgen, I get the following .h file typedef double *REAL; <---------- NOTE bool_t xdr_REAL(); typedef char NAME[32]; <---------- NOTE bool_t xdr_NAME(); typedef int *INTEGER; <---------- NOTE bool_t xdr_INTEGER(); #define FOOPROG ((u_long)99) #define FOOVERS ((u_long)1) #define foo_p1 ((u_long)1) extern void *foo_p1_1(); #define foo_p2 ((u_long)2) extern void *foo_p2_1(); #define foo_p3 ((u_long)3) extern void *foo_p3_1(); While on the Sun, this is the header file typedef double REAL; <---------- NOTE DIFFERENT typedef char NAME[32]; <---------- NOTE SAME typedef int INTEGER; <---------- NOTE DIFFERENT #define FOOPROG 99 #define FOOVERS 1 #define foo_p1 1 #define foo_p2 2 #define foo_p3 3 bool_t xdr_REAL(); bool_t xdr_NAME(); bool_t xdr_INTEGER(); The corresponding xdr .c files generated by rpcgen are identical. What is going on here ??? Paul Breslaw Mecasoft SA Zurich Switzerland ..mcvax!cernvax!mecazh!paul