As per previous patches from John for Solaris, we ned a couple more fixes to the generated remote_protocol.c/h files for good portability. Specifically we need s/u_quad_t/uint64_t/g; s/quad_t/int64_t/g; s/xdr_u_quad_t/xdr_uint64_t/g; s/xdr_quad_t/xdr_int64_t/g; s/IXDR_GET_LONG/IXDR_GET_INT32/g; I have finally got around to verifying that this won't change wire ABI on Linux The first two data types int64 and quad_t are all fixed 64-bit ints, so that's safe. And the xdr_quad functions have this in the source strong_alias (xdr_int64_t, xdr_quad_t) strong_alias (xdr_int64_t, xdr_u_quad_t) So that change is no-op. Finally the glibc rpc/xdr.h has #define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf)) So I believe this is all safe. Daniel Index: configure.in =================================================================== RCS file: /data/cvs/libvirt/configure.in,v retrieving revision 1.202 diff -u -p -r1.202 configure.in --- configure.in 27 Jan 2009 15:29:53 -0000 1.202 +++ configure.in 28 Jan 2009 12:30:59 -0000 @@ -92,9 +92,9 @@ AC_CHECK_LIB([intl],[gettext],[]) dnl Do we have rpcgen? AC_PATH_PROG([RPCGEN], [rpcgen], [no]) -AM_CONDITIONAL([RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"]) +AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"]) dnl Is this GLIBC's buggy rpcgen? -AM_CONDITIONAL([GLIBC_RPCGEN], +AM_CONDITIONAL([HAVE_GLIBC_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno" && $ac_cv_path_RPCGEN -t </dev/null >/dev/null 2>&1]) Index: qemud/Makefile.am =================================================================== RCS file: /data/cvs/libvirt/qemud/Makefile.am,v retrieving revision 1.72 diff -u -p -r1.72 Makefile.am --- qemud/Makefile.am 12 Jan 2009 19:19:22 -0000 1.72 +++ qemud/Makefile.am 28 Jan 2009 12:31:00 -0000 @@ -1,7 +1,5 @@ ## Process this file with automake to produce Makefile.in -RPCGEN = $(RPCGEN) - DAEMON_SOURCES = \ event.c event.h \ qemud.c qemud.h \ @@ -33,32 +31,34 @@ EXTRA_DIST = \ $(AVAHI_SOURCES) \ $(DAEMON_SOURCES) -if RPCGEN -SUFFIXES = .x -# The subshell ensures that remote_protocol.c ends up -# including <config.h> before "remote_protocol.h". -.x.c: - rm -f $@ $@-t $@-t1 $@-t2 - $(RPCGEN) -c -o $@-t $< - (echo '#include <config.h>'; cat $@-t) > $@-t1 -if GLIBC_RPCGEN - perl -w rpcgen_fix.pl $@-t1 > $@-t2 - rm $@-t1 - chmod 444 $@-t2 - mv $@-t2 $@ +if HAVE_RPCGEN +# +# Maintainer-only target for re-generating the derived .c/.h source +# files, which are actually derived from the .x file. +# +# For committing protocol changes to CVS, the GLIBC rpcgen *must* +# be used. +# +# Support for non-GLIB rpcgen is here as a convenience for +# non-Linux people needing to test changes during dev. +# +rpcgen: + rm -f rp.c-t rp.h-t rp.c-t1 rp.c-t2 rp.h-t1 + $(RPCGEN) -h -o rp.h-t $(srcdir)/remote_protocol.x + $(RPCGEN) -c -o rp.c-t $(srcdir)/remote_protocol.x +if HAVE_GLIBC_RPCGEN + perl -w $(srcdir)/rpcgen_fix.pl rp.h-t > rp.h-t1 + perl -w $(srcdir)/rpcgen_fix.pl rp.c-t > rp.c-t1 + (echo '#include <config.h>'; cat rp.c-t1) > rp.c-t2 + chmod 0444 rp.c-t2 rp.h-t1 + mv -f rp.h-t1 $(srcdir)/remote_protocol.h + mv -f rp.c-t2 $(srcdir)/remote_protocol.c + rm -f rp.c-t rp.h-t rp.c-t1 else - chmod 444 $@-t1 - mv $@-t1 $@ -endif - -.x.h: - rm -f $@ $@-t - $(RPCGEN) -h -o $@-t $< -if GLIBC_RPCGEN - perl -pi -e 's/\t/ /g' $@-t + chmod 0444 rp.c-t rp.h-t + mv -f rp.h-t $(srcdir)/remote_protocol.h + mv -f rp.c-t $(srcdir)/remote_protocol.c endif - chmod 444 $@-t - mv $@-t $@ endif remote_protocol.c: remote_protocol.h Index: qemud/remote_protocol.c =================================================================== RCS file: /data/cvs/libvirt/qemud/remote_protocol.c,v retrieving revision 1.27 diff -u -p -r1.27 remote_protocol.c --- qemud/remote_protocol.c 6 Jan 2009 18:32:03 -0000 1.27 +++ qemud/remote_protocol.c 28 Jan 2009 12:31:00 -0000 @@ -183,7 +183,7 @@ xdr_remote_vcpu_info (XDR *xdrs, remote_ return FALSE; if (!xdr_int (xdrs, &objp->state)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->cpu_time)) + if (!xdr_uint64_t (xdrs, &objp->cpu_time)) return FALSE; if (!xdr_int (xdrs, &objp->cpu)) return FALSE; @@ -205,11 +205,11 @@ xdr_remote_sched_param_value (XDR *xdrs, return FALSE; break; case VIR_DOMAIN_SCHED_FIELD_LLONG: - if (!xdr_quad_t (xdrs, &objp->remote_sched_param_value_u.l)) + if (!xdr_int64_t (xdrs, &objp->remote_sched_param_value_u.l)) return FALSE; break; case VIR_DOMAIN_SCHED_FIELD_ULLONG: - if (!xdr_u_quad_t (xdrs, &objp->remote_sched_param_value_u.ul)) + if (!xdr_uint64_t (xdrs, &objp->remote_sched_param_value_u.ul)) return FALSE; break; case VIR_DOMAIN_SCHED_FIELD_DOUBLE: @@ -279,7 +279,7 @@ bool_t xdr_remote_get_version_ret (XDR *xdrs, remote_get_version_ret *objp) { - if (!xdr_quad_t (xdrs, &objp->hv_ver)) + if (!xdr_int64_t (xdrs, &objp->hv_ver)) return FALSE; return TRUE; } @@ -330,7 +330,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, if (!xdr_vector (xdrs, (char *)objp->model, 32, sizeof (char), (xdrproc_t) xdr_char)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->memory)) + if (!xdr_int64_t (xdrs, &objp->memory)) return FALSE; buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); if (buf == NULL) { @@ -359,7 +359,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, if (!xdr_vector (xdrs, (char *)objp->model, 32, sizeof (char), (xdrproc_t) xdr_char)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->memory)) + if (!xdr_int64_t (xdrs, &objp->memory)) return FALSE; buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); if (buf == NULL) { @@ -376,12 +376,12 @@ xdr_remote_node_get_info_ret (XDR *xdrs, if (!xdr_int (xdrs, &objp->threads)) return FALSE; } else { - objp->cpus = IXDR_GET_LONG(buf); - objp->mhz = IXDR_GET_LONG(buf); - objp->nodes = IXDR_GET_LONG(buf); - objp->sockets = IXDR_GET_LONG(buf); - objp->cores = IXDR_GET_LONG(buf); - objp->threads = IXDR_GET_LONG(buf); + objp->cpus = IXDR_GET_INT32(buf); + objp->mhz = IXDR_GET_INT32(buf); + objp->nodes = IXDR_GET_INT32(buf); + objp->sockets = IXDR_GET_INT32(buf); + objp->cores = IXDR_GET_INT32(buf); + objp->threads = IXDR_GET_INT32(buf); } return TRUE; } @@ -389,7 +389,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, if (!xdr_vector (xdrs, (char *)objp->model, 32, sizeof (char), (xdrproc_t) xdr_char)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->memory)) + if (!xdr_int64_t (xdrs, &objp->memory)) return FALSE; if (!xdr_int (xdrs, &objp->cpus)) return FALSE; @@ -432,7 +432,7 @@ xdr_remote_node_get_cells_free_memory_re char **objp_cpp0 = (char **) (void *) &objp->freeMems.freeMems_val; if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->freeMems.freeMems_len, REMOTE_NODE_MAX_CELLS, - sizeof (quad_t), (xdrproc_t) xdr_quad_t)) + sizeof (int64_t), (xdrproc_t) xdr_int64_t)) return FALSE; return TRUE; } @@ -441,7 +441,7 @@ bool_t xdr_remote_node_get_free_memory_ret (XDR *xdrs, remote_node_get_free_memory_ret *objp) { - if (!xdr_quad_t (xdrs, &objp->freeMem)) + if (!xdr_int64_t (xdrs, &objp->freeMem)) return FALSE; return TRUE; } @@ -516,15 +516,15 @@ bool_t xdr_remote_domain_block_stats_ret (XDR *xdrs, remote_domain_block_stats_ret *objp) { - if (!xdr_quad_t (xdrs, &objp->rd_req)) + if (!xdr_int64_t (xdrs, &objp->rd_req)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->rd_bytes)) + if (!xdr_int64_t (xdrs, &objp->rd_bytes)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->wr_req)) + if (!xdr_int64_t (xdrs, &objp->wr_req)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->wr_bytes)) + if (!xdr_int64_t (xdrs, &objp->wr_bytes)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->errs)) + if (!xdr_int64_t (xdrs, &objp->errs)) return FALSE; return TRUE; } @@ -544,21 +544,21 @@ bool_t xdr_remote_domain_interface_stats_ret (XDR *xdrs, remote_domain_interface_stats_ret *objp) { - if (!xdr_quad_t (xdrs, &objp->rx_bytes)) + if (!xdr_int64_t (xdrs, &objp->rx_bytes)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->rx_packets)) + if (!xdr_int64_t (xdrs, &objp->rx_packets)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->rx_errs)) + if (!xdr_int64_t (xdrs, &objp->rx_errs)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->rx_drop)) + if (!xdr_int64_t (xdrs, &objp->rx_drop)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->tx_bytes)) + if (!xdr_int64_t (xdrs, &objp->tx_bytes)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->tx_packets)) + if (!xdr_int64_t (xdrs, &objp->tx_packets)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->tx_errs)) + if (!xdr_int64_t (xdrs, &objp->tx_errs)) return FALSE; - if (!xdr_quad_t (xdrs, &objp->tx_drop)) + if (!xdr_int64_t (xdrs, &objp->tx_drop)) return FALSE; return TRUE; } @@ -571,7 +571,7 @@ xdr_remote_domain_block_peek_args (XDR * return FALSE; if (!xdr_remote_nonnull_string (xdrs, &objp->path)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) + if (!xdr_uint64_t (xdrs, &objp->offset)) return FALSE; if (!xdr_u_int (xdrs, &objp->size)) return FALSE; @@ -596,7 +596,7 @@ xdr_remote_domain_memory_peek_args (XDR if (!xdr_remote_nonnull_domain (xdrs, &objp->dom)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) + if (!xdr_uint64_t (xdrs, &objp->offset)) return FALSE; if (!xdr_u_int (xdrs, &objp->size)) return FALSE; @@ -796,7 +796,7 @@ bool_t xdr_remote_domain_get_max_memory_ret (XDR *xdrs, remote_domain_get_max_memory_ret *objp) { - if (!xdr_u_quad_t (xdrs, &objp->memory)) + if (!xdr_uint64_t (xdrs, &objp->memory)) return FALSE; return TRUE; } @@ -807,7 +807,7 @@ xdr_remote_domain_set_max_memory_args (X if (!xdr_remote_nonnull_domain (xdrs, &objp->dom)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->memory)) + if (!xdr_uint64_t (xdrs, &objp->memory)) return FALSE; return TRUE; } @@ -818,7 +818,7 @@ xdr_remote_domain_set_memory_args (XDR * if (!xdr_remote_nonnull_domain (xdrs, &objp->dom)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->memory)) + if (!xdr_uint64_t (xdrs, &objp->memory)) return FALSE; return TRUE; } @@ -838,13 +838,13 @@ xdr_remote_domain_get_info_ret (XDR *xdr if (!xdr_u_char (xdrs, &objp->state)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->max_mem)) + if (!xdr_uint64_t (xdrs, &objp->max_mem)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->memory)) + if (!xdr_uint64_t (xdrs, &objp->memory)) return FALSE; if (!xdr_u_short (xdrs, &objp->nr_virt_cpu)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->cpu_time)) + if (!xdr_uint64_t (xdrs, &objp->cpu_time)) return FALSE; return TRUE; } @@ -908,11 +908,11 @@ xdr_remote_domain_migrate_prepare_args ( if (!xdr_remote_string (xdrs, &objp->uri_in)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flags)) + if (!xdr_uint64_t (xdrs, &objp->flags)) return FALSE; if (!xdr_remote_string (xdrs, &objp->dname)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->resource)) + if (!xdr_uint64_t (xdrs, &objp->resource)) return FALSE; return TRUE; } @@ -940,11 +940,11 @@ xdr_remote_domain_migrate_perform_args ( return FALSE; if (!xdr_remote_nonnull_string (xdrs, &objp->uri)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flags)) + if (!xdr_uint64_t (xdrs, &objp->flags)) return FALSE; if (!xdr_remote_string (xdrs, &objp->dname)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->resource)) + if (!xdr_uint64_t (xdrs, &objp->resource)) return FALSE; return TRUE; } @@ -960,7 +960,7 @@ xdr_remote_domain_migrate_finish_args (X return FALSE; if (!xdr_remote_nonnull_string (xdrs, &objp->uri)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flags)) + if (!xdr_uint64_t (xdrs, &objp->flags)) return FALSE; return TRUE; } @@ -980,11 +980,11 @@ xdr_remote_domain_migrate_prepare2_args if (!xdr_remote_string (xdrs, &objp->uri_in)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flags)) + if (!xdr_uint64_t (xdrs, &objp->flags)) return FALSE; if (!xdr_remote_string (xdrs, &objp->dname)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->resource)) + if (!xdr_uint64_t (xdrs, &objp->resource)) return FALSE; if (!xdr_remote_nonnull_string (xdrs, &objp->dom_xml)) return FALSE; @@ -1014,7 +1014,7 @@ xdr_remote_domain_migrate_finish2_args ( return FALSE; if (!xdr_remote_nonnull_string (xdrs, &objp->uri)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flags)) + if (!xdr_uint64_t (xdrs, &objp->flags)) return FALSE; if (!xdr_int (xdrs, &objp->retcode)) return FALSE; @@ -1798,11 +1798,11 @@ xdr_remote_storage_pool_get_info_ret (XD if (!xdr_u_char (xdrs, &objp->state)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->capacity)) + if (!xdr_uint64_t (xdrs, &objp->capacity)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->allocation)) + if (!xdr_uint64_t (xdrs, &objp->allocation)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->available)) + if (!xdr_uint64_t (xdrs, &objp->available)) return FALSE; return TRUE; } @@ -2000,9 +2000,9 @@ xdr_remote_storage_vol_get_info_ret (XDR if (!xdr_char (xdrs, &objp->type)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->capacity)) + if (!xdr_uint64_t (xdrs, &objp->capacity)) return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->allocation)) + if (!xdr_uint64_t (xdrs, &objp->allocation)) return FALSE; return TRUE; } Index: qemud/remote_protocol.h =================================================================== RCS file: /data/cvs/libvirt/qemud/remote_protocol.h,v retrieving revision 1.26 diff -u -p -r1.26 remote_protocol.h --- qemud/remote_protocol.h 17 Dec 2008 17:23:21 -0000 1.26 +++ qemud/remote_protocol.h 28 Jan 2009 12:31:00 -0000 @@ -3,8 +3,8 @@ * It was generated using rpcgen. */ -#ifndef _REMOTE_PROTOCOL_H_RPCGEN -#define _REMOTE_PROTOCOL_H_RPCGEN +#ifndef _RP_H_RPCGEN +#define _RP_H_RPCGEN #include <rpc/rpc.h> @@ -107,7 +107,7 @@ typedef enum remote_auth_type remote_aut struct remote_vcpu_info { u_int number; int state; - u_quad_t cpu_time; + uint64_t cpu_time; int cpu; }; typedef struct remote_vcpu_info remote_vcpu_info; @@ -117,8 +117,8 @@ struct remote_sched_param_value { union { int i; u_int ui; - quad_t l; - u_quad_t ul; + int64_t l; + uint64_t ul; double d; int b; } remote_sched_param_value_u; @@ -153,7 +153,7 @@ struct remote_get_type_ret { typedef struct remote_get_type_ret remote_get_type_ret; struct remote_get_version_ret { - quad_t hv_ver; + int64_t hv_ver; }; typedef struct remote_get_version_ret remote_get_version_ret; @@ -179,7 +179,7 @@ typedef struct remote_get_max_vcpus_ret struct remote_node_get_info_ret { char model[32]; - quad_t memory; + int64_t memory; int cpus; int mhz; int nodes; @@ -203,13 +203,13 @@ typedef struct remote_node_get_cells_fre struct remote_node_get_cells_free_memory_ret { struct { u_int freeMems_len; - quad_t *freeMems_val; + int64_t *freeMems_val; } freeMems; }; typedef struct remote_node_get_cells_free_memory_ret remote_node_get_cells_free_memory_ret; struct remote_node_get_free_memory_ret { - quad_t freeMem; + int64_t freeMem; }; typedef struct remote_node_get_free_memory_ret remote_node_get_free_memory_ret; @@ -254,11 +254,11 @@ struct remote_domain_block_stats_args { typedef struct remote_domain_block_stats_args remote_domain_block_stats_args; struct remote_domain_block_stats_ret { - quad_t rd_req; - quad_t rd_bytes; - quad_t wr_req; - quad_t wr_bytes; - quad_t errs; + int64_t rd_req; + int64_t rd_bytes; + int64_t wr_req; + int64_t wr_bytes; + int64_t errs; }; typedef struct remote_domain_block_stats_ret remote_domain_block_stats_ret; @@ -269,21 +269,21 @@ struct remote_domain_interface_stats_arg typedef struct remote_domain_interface_stats_args remote_domain_interface_stats_args; struct remote_domain_interface_stats_ret { - quad_t rx_bytes; - quad_t rx_packets; - quad_t rx_errs; - quad_t rx_drop; - quad_t tx_bytes; - quad_t tx_packets; - quad_t tx_errs; - quad_t tx_drop; + int64_t rx_bytes; + int64_t rx_packets; + int64_t rx_errs; + int64_t rx_drop; + int64_t tx_bytes; + int64_t tx_packets; + int64_t tx_errs; + int64_t tx_drop; }; typedef struct remote_domain_interface_stats_ret remote_domain_interface_stats_ret; struct remote_domain_block_peek_args { remote_nonnull_domain dom; remote_nonnull_string path; - u_quad_t offset; + uint64_t offset; u_int size; u_int flags; }; @@ -299,7 +299,7 @@ typedef struct remote_domain_block_peek_ struct remote_domain_memory_peek_args { remote_nonnull_domain dom; - u_quad_t offset; + uint64_t offset; u_int size; u_int flags; }; @@ -414,19 +414,19 @@ struct remote_domain_get_max_memory_args typedef struct remote_domain_get_max_memory_args remote_domain_get_max_memory_args; struct remote_domain_get_max_memory_ret { - u_quad_t memory; + uint64_t memory; }; typedef struct remote_domain_get_max_memory_ret remote_domain_get_max_memory_ret; struct remote_domain_set_max_memory_args { remote_nonnull_domain dom; - u_quad_t memory; + uint64_t memory; }; typedef struct remote_domain_set_max_memory_args remote_domain_set_max_memory_args; struct remote_domain_set_memory_args { remote_nonnull_domain dom; - u_quad_t memory; + uint64_t memory; }; typedef struct remote_domain_set_memory_args remote_domain_set_memory_args; @@ -437,10 +437,10 @@ typedef struct remote_domain_get_info_ar struct remote_domain_get_info_ret { u_char state; - u_quad_t max_mem; - u_quad_t memory; + uint64_t max_mem; + uint64_t memory; u_short nr_virt_cpu; - u_quad_t cpu_time; + uint64_t cpu_time; }; typedef struct remote_domain_get_info_ret remote_domain_get_info_ret; @@ -475,9 +475,9 @@ typedef struct remote_domain_dump_xml_re struct remote_domain_migrate_prepare_args { remote_string uri_in; - u_quad_t flags; + uint64_t flags; remote_string dname; - u_quad_t resource; + uint64_t resource; }; typedef struct remote_domain_migrate_prepare_args remote_domain_migrate_prepare_args; @@ -497,9 +497,9 @@ struct remote_domain_migrate_perform_arg char *cookie_val; } cookie; remote_nonnull_string uri; - u_quad_t flags; + uint64_t flags; remote_string dname; - u_quad_t resource; + uint64_t resource; }; typedef struct remote_domain_migrate_perform_args remote_domain_migrate_perform_args; @@ -510,7 +510,7 @@ struct remote_domain_migrate_finish_args char *cookie_val; } cookie; remote_nonnull_string uri; - u_quad_t flags; + uint64_t flags; }; typedef struct remote_domain_migrate_finish_args remote_domain_migrate_finish_args; @@ -521,9 +521,9 @@ typedef struct remote_domain_migrate_fin struct remote_domain_migrate_prepare2_args { remote_string uri_in; - u_quad_t flags; + uint64_t flags; remote_string dname; - u_quad_t resource; + uint64_t resource; remote_nonnull_string dom_xml; }; typedef struct remote_domain_migrate_prepare2_args remote_domain_migrate_prepare2_args; @@ -544,7 +544,7 @@ struct remote_domain_migrate_finish2_arg char *cookie_val; } cookie; remote_nonnull_string uri; - u_quad_t flags; + uint64_t flags; int retcode; }; typedef struct remote_domain_migrate_finish2_args remote_domain_migrate_finish2_args; @@ -1002,9 +1002,9 @@ typedef struct remote_storage_pool_get_i struct remote_storage_pool_get_info_ret { u_char state; - u_quad_t capacity; - u_quad_t allocation; - u_quad_t available; + uint64_t capacity; + uint64_t allocation; + uint64_t available; }; typedef struct remote_storage_pool_get_info_ret remote_storage_pool_get_info_ret; @@ -1115,8 +1115,8 @@ typedef struct remote_storage_vol_get_in struct remote_storage_vol_get_info_ret { char type; - u_quad_t capacity; - u_quad_t allocation; + uint64_t capacity; + uint64_t allocation; }; typedef struct remote_storage_vol_get_info_ret remote_storage_vol_get_info_ret; @@ -1793,4 +1793,4 @@ extern bool_t xdr_remote_message_header } #endif -#endif /* !_REMOTE_PROTOCOL_H_RPCGEN */ +#endif /* !_RP_H_RPCGEN */ Index: qemud/rpcgen_fix.pl =================================================================== RCS file: /data/cvs/libvirt/qemud/rpcgen_fix.pl,v retrieving revision 1.4 diff -u -p -r1.4 rpcgen_fix.pl --- qemud/rpcgen_fix.pl 6 Jan 2009 18:32:03 -0000 1.4 +++ qemud/rpcgen_fix.pl 28 Jan 2009 12:31:00 -0000 @@ -26,6 +26,14 @@ while (<>) { s/\t/ /g; + # Portability for Solaris RPC + s/u_quad_t/uint64_t/g; + s/quad_t/int64_t/g; + s/xdr_u_quad_t/xdr_uint64_t/g; + s/xdr_quad_t/xdr_int64_t/g; + s/IXDR_GET_LONG/IXDR_GET_INT32/g; + s,#include "\./remote_protocol\.h",#include "remote_protocol.h",; + if (m/^}/) { $in_function = 0; -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list