diff options
| author | Harshavardhana <harsha@harshavardhana.net> | 2014-04-25 16:08:09 -0700 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2014-04-25 23:01:23 -0700 | 
| commit | 447f4dec70a8103fc188024ea76447425cf14c60 (patch) | |
| tree | 099c62ccd8d975bb76adf7043728f848cbd3028d | |
| parent | 8647ea41d42c35d1e74232c37b898708dee315c4 (diff) | |
rpcgen: 'hyper' is 64bit undefined on Darwin use quad_t
"9819fcedf10f1430d4969c86e6df4dfe975b7dcf" After the commit i
observed that we never used "hyper" as defined in .x previously
in the .[c,h] files.
Change-Id: I26152141bca6e789c4a3b3158fffe0a65e4b0878
BUG: 1090807
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7566
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
| -rwxr-xr-x | build-aux/xdrgen | 2 | ||||
| -rw-r--r-- | rpc/xdr/src/.gitignore | 1 | ||||
| -rw-r--r-- | rpc/xdr/src/glusterfs3-xdr.x | 128 | ||||
| -rw-r--r-- | rpc/xdr/src/rpc-common-xdr.x | 10 | 
4 files changed, 71 insertions, 70 deletions
diff --git a/build-aux/xdrgen b/build-aux/xdrgen index dd5571baad6..b5f33d37229 100755 --- a/build-aux/xdrgen +++ b/build-aux/xdrgen @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash  _init ()  { diff --git a/rpc/xdr/src/.gitignore b/rpc/xdr/src/.gitignore index 407f135c5df..4fb7f95822c 100644 --- a/rpc/xdr/src/.gitignore +++ b/rpc/xdr/src/.gitignore @@ -16,3 +16,4 @@ portmap-xdr.c  portmap-xdr.h  rpc-common-xdr.c  rpc-common-xdr.h +*-e diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x index 1edbda3ada9..feef7e2649e 100644 --- a/rpc/xdr/src/glusterfs3-xdr.x +++ b/rpc/xdr/src/glusterfs3-xdr.x @@ -1,23 +1,23 @@  #define GF_REQUEST_MAXGROUPS    16  struct gf_statfs { -	unsigned hyper bsize; -	unsigned hyper frsize; -	unsigned hyper blocks; -	unsigned hyper bfree; -	unsigned hyper bavail; -	unsigned hyper files; -	unsigned hyper ffree; -	unsigned hyper favail; -	unsigned hyper fsid; -	unsigned hyper flag; -	unsigned hyper namemax; +	u_quad_t bsize; +	u_quad_t frsize; +	u_quad_t blocks; +	u_quad_t bfree; +	u_quad_t bavail; +	u_quad_t files; +	u_quad_t ffree; +	u_quad_t favail; +	u_quad_t fsid; +	u_quad_t flag; +	u_quad_t namemax;  };  struct gf_proto_flock {  	unsigned int   type;  	unsigned int   whence; -	unsigned hyper start; -	unsigned hyper len; +	u_quad_t start; +	u_quad_t len;          unsigned int   pid;          opaque         lk_owner<>;  } ; @@ -25,16 +25,16 @@ struct gf_proto_flock {  struct gf_iatt {          opaque             ia_gfid[16]; -        unsigned hyper     ia_ino;        /* inode number */ -        unsigned hyper     ia_dev;        /* backing device ID */ +        u_quad_t     ia_ino;        /* inode number */ +        u_quad_t     ia_dev;        /* backing device ID */          unsigned int       mode;          /* mode (type + protection )*/          unsigned int       ia_nlink;      /* Link count */          unsigned int       ia_uid;        /* user ID of owner */          unsigned int       ia_gid;        /* group ID of owner */ -        unsigned hyper     ia_rdev;       /* device ID (if special file) */ -        unsigned hyper     ia_size;       /* file size in bytes */ +        u_quad_t     ia_rdev;       /* device ID (if special file) */ +        u_quad_t     ia_size;       /* file size in bytes */          unsigned int       ia_blksize;    /* blocksize for filesystem I/O */ -        unsigned hyper     ia_blocks;     /* number of 512B blocks allocated */ +        u_quad_t     ia_blocks;     /* number of 512B blocks allocated */          unsigned int       ia_atime;      /* last access time */          unsigned int       ia_atime_nsec;          unsigned int       ia_mtime;      /* last modification time */ @@ -71,7 +71,7 @@ struct gfs3_readlink_req {   struct gfs3_mknod_req {          opaque  pargfid[16]; -	unsigned hyper dev; +	u_quad_t dev;  	unsigned int mode;          unsigned int umask;  	string     bname<>; /* NULL terminated */ @@ -187,7 +187,7 @@ struct gfs3_readlink_req {   struct   gfs3_truncate_req {          opaque gfid[16]; -	unsigned hyper offset; +	u_quad_t offset;          opaque   xdata<>; /* Extra data */  };   struct   gfs3_truncate_rsp { @@ -207,15 +207,15 @@ struct gfs3_readlink_req {   struct   gfs3_open_rsp {          int    op_ret;          int    op_errno; -	hyper fd; +	quad_t fd;          opaque   xdata<>; /* Extra data */  };   struct   gfs3_read_req {          opaque gfid[16]; -	hyper  fd; -	unsigned hyper offset; +	quad_t  fd; +	u_quad_t offset;  	unsigned int size;          unsigned int flag;          opaque   xdata<>; /* Extra data */ @@ -247,8 +247,8 @@ struct   gfs3_lookup_req {   struct   gfs3_write_req {          opaque gfid[16]; -	hyper  fd; -	unsigned hyper offset; +	quad_t  fd; +	u_quad_t offset;  	unsigned int size;          unsigned int flag;          opaque   xdata<>; /* Extra data */ @@ -275,7 +275,7 @@ struct   gfs3_lookup_req {   struct gfs3_lk_req {          opaque gfid[16]; -	hyper         fd; +	int64_t         fd;  	unsigned int        cmd;  	unsigned int        type;  	struct gf_proto_flock flock; @@ -299,7 +299,7 @@ struct   gfs3_lookup_req {  struct   gfs3_finodelk_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;  	unsigned int cmd;  	unsigned int type;  	struct gf_proto_flock flock; @@ -310,14 +310,14 @@ struct   gfs3_finodelk_req {   struct gfs3_flush_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;          opaque   xdata<>; /* Extra data */  }  ;   struct gfs3_fsync_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;  	unsigned int data;          opaque   xdata<>; /* Extra data */  }  ; @@ -341,7 +341,7 @@ struct   gfs3_finodelk_req {   struct gfs3_fsetxattr_req {          opaque gfid[16]; -	hyper  fd; +	int64_t  fd;  	unsigned int flags;          opaque     dict<>;          opaque   xdata<>; /* Extra data */ @@ -366,7 +366,7 @@ struct   gfs3_finodelk_req {   struct gfs3_fxattrop_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;  	unsigned int flags;  	opaque     dict<>;          opaque   xdata<>; /* Extra data */ @@ -396,7 +396,7 @@ struct   gfs3_finodelk_req {   struct gfs3_fgetxattr_req  {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;          unsigned int namelen;  	string     name<>;          opaque   xdata<>; /* Extra data */ @@ -417,7 +417,7 @@ struct   gfs3_finodelk_req {   struct gfs3_fremovexattr_req {          opaque gfid[16]; -        hyper  fd; +        quad_t  fd;  	string     name<>;          opaque   xdata<>; /* Extra data */  }  ; @@ -431,30 +431,30 @@ struct   gfs3_finodelk_req {   struct gfs3_opendir_rsp {          int    op_ret;          int    op_errno; -	hyper fd; +	quad_t fd;          opaque   xdata<>; /* Extra data */  }  ;   struct gfs3_fsyncdir_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;  	int  data;          opaque   xdata<>; /* Extra data */  }  ;   struct   gfs3_readdir_req  {          opaque gfid[16]; -	hyper  fd; -	unsigned hyper offset; +	quad_t  fd; +	u_quad_t offset;  	unsigned int size;          opaque   xdata<>; /* Extra data */  };   struct gfs3_readdirp_req {          opaque gfid[16]; -	hyper  fd; -	unsigned hyper offset; +	quad_t  fd; +	u_quad_t offset;  	unsigned int size;          opaque dict<>;  }  ; @@ -479,7 +479,7 @@ struct  gfs3_create_rsp {          int    op_ret;          int    op_errno;  	struct gf_iatt stat; -	unsigned hyper       fd; +	u_quad_t       fd;          struct gf_iatt preparent;          struct gf_iatt postparent;          opaque   xdata<>; /* Extra data */ @@ -489,8 +489,8 @@ struct  gfs3_create_rsp {  struct   gfs3_ftruncate_req  {          opaque gfid[16]; -	hyper  fd; -	unsigned hyper offset; +	quad_t  fd; +	u_quad_t offset;          opaque   xdata<>; /* Extra data */  } ;  struct   gfs3_ftruncate_rsp { @@ -504,7 +504,7 @@ struct   gfs3_ftruncate_rsp {  struct gfs3_fstat_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;          opaque   xdata<>; /* Extra data */  }  ;   struct gfs3_fstat_rsp { @@ -520,7 +520,7 @@ struct gfs3_fstat_req {          opaque gfid[16];  	unsigned int  cmd;  	unsigned int  type; -	unsigned hyper  namelen; +	u_quad_t  namelen;  	string      name<>;          string      volume<>;          opaque   xdata<>; /* Extra data */ @@ -528,10 +528,10 @@ struct gfs3_fstat_req {   struct   gfs3_fentrylk_req {          opaque gfid[16]; -	hyper   fd; +	quad_t   fd;  	unsigned int  cmd;  	unsigned int  type; -	unsigned hyper  namelen; +	u_quad_t  namelen;  	string      name<>;          string      volume<>;          opaque   xdata<>; /* Extra data */ @@ -553,7 +553,7 @@ struct gfs3_fstat_req {  }  ;   struct gfs3_fsetattr_req { -        hyper        fd; +        quad_t        fd;          struct gf_iatt stbuf;          int        valid;          opaque   xdata<>; /* Extra data */ @@ -568,10 +568,10 @@ struct gfs3_fstat_req {   struct gfs3_fallocate_req {  	opaque		gfid[16]; -        hyper		fd; +        quad_t		fd;  	unsigned int	flags; -	unsigned hyper	offset; -	unsigned hyper	size; +	u_quad_t	offset; +	u_quad_t	size;          opaque   xdata<>; /* Extra data */  }  ; @@ -585,9 +585,9 @@ struct gfs3_fstat_req {   struct gfs3_discard_req {  	opaque		gfid[16]; -        hyper		fd; -	unsigned hyper	offset; -	unsigned hyper	size; +        quad_t		fd; +	u_quad_t	offset; +	u_quad_t	size;          opaque   xdata<>; /* Extra data */  }  ; @@ -601,9 +601,9 @@ struct gfs3_fstat_req {   struct gfs3_zerofill_req {          opaque          gfid[16]; -        hyper           fd; -        unsigned hyper  offset; -        unsigned hyper  size; +        quad_t           fd; +        u_quad_t  offset; +        u_quad_t  size;          opaque   xdata<>;  }  ; @@ -617,8 +617,8 @@ struct gfs3_fstat_req {   struct gfs3_rchecksum_req { -        hyper   fd; -        unsigned hyper  offset; +        quad_t   fd; +        u_quad_t  offset;          unsigned int  len;          opaque   xdata<>; /* Extra data */  }  ; @@ -682,13 +682,13 @@ struct gfs3_fstat_req {  struct gfs3_releasedir_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;          opaque   xdata<>; /* Extra data */  }  ;  struct gfs3_release_req {          opaque gfid[16]; -	hyper  fd; +	quad_t  fd;          opaque   xdata<>; /* Extra data */  }  ; @@ -699,8 +699,8 @@ struct gf_common_rsp {  } ;  struct gfs3_dirlist { -       unsigned hyper d_ino; -       unsigned hyper d_off; +       u_quad_t d_ino; +       u_quad_t d_off;         unsigned int d_len;         unsigned int d_type;         string name<>; @@ -716,8 +716,8 @@ struct gfs3_readdir_rsp {  };  struct gfs3_dirplist { -       unsigned hyper d_ino; -       unsigned hyper d_off; +       u_quad_t d_ino; +       u_quad_t d_off;         unsigned int d_len;         unsigned int d_type;         string name<>; diff --git a/rpc/xdr/src/rpc-common-xdr.x b/rpc/xdr/src/rpc-common-xdr.x index ca28f38b5db..ee66500e032 100644 --- a/rpc/xdr/src/rpc-common-xdr.x +++ b/rpc/xdr/src/rpc-common-xdr.x @@ -10,7 +10,7 @@ struct auth_glusterfs_parms_v2 {  };  struct auth_glusterfs_parms { -        unsigned hyper lk_owner; +        u_quad_t lk_owner;          unsigned int pid;          unsigned int uid;  	unsigned int gid; @@ -19,20 +19,20 @@ struct auth_glusterfs_parms {  };  struct gf_dump_req { -	unsigned hyper gfs_id; +	u_quad_t gfs_id;  };  struct gf_prog_detail {  	string progname<>; -	unsigned hyper prognum; -	unsigned hyper progver; +	u_quad_t prognum; +	u_quad_t progver;  	struct gf_prog_detail *next;  };  struct gf_dump_rsp { -        unsigned hyper gfs_id; +        u_quad_t gfs_id;          int op_ret;  	int op_errno;  	struct gf_prog_detail *prog;  | 
