X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=tools%2Frpcgen%2Frpc_main.c;h=39b667e1dd7d0ac56c8cdf2e9bb1c75da45269c9;hp=bd1a2c0d225d3b59dfa241beb693e1b329f6a2ba;hb=0865e25ca2d978d93a53ad64974e5eb0a371a997;hpb=8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9 diff --git a/tools/rpcgen/rpc_main.c b/tools/rpcgen/rpc_main.c index bd1a2c0..39b667e 100644 --- a/tools/rpcgen/rpc_main.c +++ b/tools/rpcgen/rpc_main.c @@ -426,12 +426,12 @@ c_initialize(void) /* add all the starting basic types */ add_type(1,"int"); - add_type(1,"long"); + add_type(1,"int32_t"); add_type(1,"short"); add_type(1,"bool"); add_type(1,"u_int"); - add_type(1,"u_long"); + add_type(1,"u_int32_t"); add_type(1,"u_short"); } @@ -488,6 +488,19 @@ h_output(char *infile, char *define, int extend, char *outfile) f_print(fout, "#include \n\n"); + f_print(fout, "#ifndef IXDR_GET_INT32\n"); + f_print(fout, "#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))\n"); + f_print(fout, "#endif\n"); + f_print(fout, "#ifndef IXDR_PUT_INT32\n"); + f_print(fout, "#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))\n"); + f_print(fout, "#endif\n"); + f_print(fout, "#ifndef IXDR_GET_U_INT32\n"); + f_print(fout, "#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))\n"); + f_print(fout, "#endif\n"); + f_print(fout, "#ifndef IXDR_PUT_U_INT32\n"); + f_print(fout, "#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))\n"); + f_print(fout, "#endif\n"); + tell = ftell(fout); /* print data definitions */ while ((def = get_definition()) != NULL) {