[Git][debian-gis-team/ruby-hdfeos5][master] 2 commits: Update patches

Youhei SASAKI (@uwabami) gitlab at salsa.debian.org
Fri Dec 27 10:45:41 GMT 2024



Youhei SASAKI pushed to branch master at Debian GIS Project / ruby-hdfeos5


Commits:
db2bbea6 by Youhei SASAKI at 2024-12-27T19:39:36+09:00
Update patches

Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>

- - - - -
ed6b17d1 by Youhei SASAKI at 2024-12-27T19:44:48+09:00
Add patch: use hsize_t for x86 and x86-64 build

Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>

- - - - -


2 changed files:

- debian/patches/0010-Fix-gcc-14-incompatible-pointer-issue-drop-long-long.patch → debian/patches/0010-Fix-use-hsize_t.patch
- debian/patches/series


Changes:

=====================================
debian/patches/0010-Fix-gcc-14-incompatible-pointer-issue-drop-long-long.patch → debian/patches/0010-Fix-use-hsize_t.patch
=====================================
@@ -1,22 +1,35 @@
 From: Youhei SASAKI <uwabami at gfd-dennou.org>
 Date: Fri, 27 Dec 2024 15:34:38 +0900
-Subject: Fix gcc-14 incompatible-pointer-issue: drop 'long long'
+Subject: Fix use hsize_t
 
-Forwarded: not-needed
 Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
 ---
- hdfeos5_chkdatatype.c |  43 +++---
- hdfeos5gd_wrap.c      | 329 ++++++++++++++++++++-----------------------
- hdfeos5pt_wrap.c      |  96 +++++--------
- hdfeos5sw_wrap.c      | 383 +++++++++++++++++++++-----------------------------
- hdfeos5za_wrap.c      | 322 +++++++++++++++++++-----------------------
- 5 files changed, 519 insertions(+), 654 deletions(-)
+ hdfeos5_chkdatatype.c |  51 ++++----
+ hdfeos5gd_wrap.c      | 290 ++++++++++++++++++++-----------------------
+ hdfeos5main_wrap.c    |  31 ++---
+ hdfeos5pt_wrap.c      |  99 ++++++---------
+ hdfeos5sw_wrap.c      | 334 +++++++++++++++++++++++---------------------------
+ hdfeos5za_wrap.c      | 292 ++++++++++++++++++++-----------------------
+ 6 files changed, 489 insertions(+), 608 deletions(-)
 
 diff --git a/hdfeos5_chkdatatype.c b/hdfeos5_chkdatatype.c
-index f99b4ee..67a212e 100644
+index f99b4ee..9861ddb 100644
 --- a/hdfeos5_chkdatatype.c
 +++ b/hdfeos5_chkdatatype.c
-@@ -18,6 +18,7 @@ static VALUE rb_eHE5Error;
+@@ -5,19 +5,12 @@
+ #include "narray.h"
+ #include<string.h>
+ 
+-/* for compatibility with ruby 1.6 */
+-#ifndef RSTRING_PTR
+-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
+-#endif
+-#ifndef SafeStringValue
+-#define SafeStringValue(s) Check_SafeStr(s)
+-#endif
+-
+ static VALUE rb_eHE5Error;
+ 
  void
  HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
  
@@ -24,7 +37,7 @@ index f99b4ee..67a212e 100644
      switch (ntype){
      case  HE5T_NATIVE_CHAR:
      case  HE5T_NATIVE_SCHAR:
-@@ -30,14 +31,14 @@ HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
+@@ -30,14 +23,14 @@ HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
  
      case  HE5T_NATIVE_INT8:
      case  HE5T_NATIVE_UINT8:
@@ -41,7 +54,7 @@ index f99b4ee..67a212e 100644
  	break;
  
      case  HE5T_NATIVE_INT:
-@@ -45,15 +46,15 @@ HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
+@@ -45,15 +38,15 @@ HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
      case  HE5T_NATIVE_INT32:
      case  HE5T_NATIVE_UINT32:
      case  HE5T_NATIVE_LONG:
@@ -60,7 +73,7 @@ index f99b4ee..67a212e 100644
  	break;
      default:
  	rb_raise(rb_eHE5Error, "Sorry, number type %d is yet to be supoorted [%s:%d]",
-@@ -140,7 +141,7 @@ HE5Wrap_store_NArray1D_or_str(int ntype, VALUE obj, void **ptr){
+@@ -140,7 +133,7 @@ HE5Wrap_store_NArray1D_or_str(int ntype, VALUE obj, void **ptr){
      }
  }
  
@@ -69,7 +82,7 @@ index f99b4ee..67a212e 100644
  check_numbertype(char *numbertype)
  {
      if(strcmp(numbertype,"byte")==0) return(HE5T_NATIVE_CHAR);
-@@ -156,7 +157,7 @@ check_numbertype(char *numbertype)
+@@ -156,7 +149,7 @@ check_numbertype(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -78,7 +91,7 @@ index f99b4ee..67a212e 100644
  change_numbertype(char *numbertype)
  {
    if(strcmp(numbertype,"byte")==0) return(H5T_NATIVE_CHAR);
-@@ -172,7 +173,7 @@ change_numbertype(char *numbertype)
+@@ -172,7 +165,7 @@ change_numbertype(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -87,7 +100,7 @@ index f99b4ee..67a212e 100644
  change_mergeflag(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_NOMERGE")==0)           return(HE5_HDFE_NOMERGE);
-@@ -182,7 +183,7 @@ change_mergeflag(char *numbertype)
+@@ -182,7 +175,7 @@ change_mergeflag(char *numbertype)
  }
  
  
@@ -96,7 +109,7 @@ index f99b4ee..67a212e 100644
  change_entrycode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_NENTDIM")==0)           return(HE5_HDFE_NENTDIM);
-@@ -194,7 +195,7 @@ change_entrycode(char *numbertype)
+@@ -194,7 +187,7 @@ change_entrycode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -105,7 +118,7 @@ index f99b4ee..67a212e 100644
  change_angleconvcode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_RAD_DEG")==0)           return(HE5_HDFE_RAD_DEG);
-@@ -207,7 +208,7 @@ change_angleconvcode(char *numbertype)
+@@ -207,7 +200,7 @@ change_angleconvcode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -114,7 +127,7 @@ index f99b4ee..67a212e 100644
  change_subsetmode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_MIDPOINT")==0)           return(HE5_HDFE_MIDPOINT);
-@@ -220,7 +221,7 @@ change_subsetmode(char *numbertype)
+@@ -220,7 +213,7 @@ change_subsetmode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -123,7 +136,7 @@ index f99b4ee..67a212e 100644
  change_gridorigincode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_GD_UL")==0)         return(HE5_HDFE_GD_UL);
-@@ -231,7 +232,7 @@ change_gridorigincode(char *numbertype)
+@@ -231,7 +224,7 @@ change_gridorigincode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -132,7 +145,7 @@ index f99b4ee..67a212e 100644
  change_pixelregistcode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_CENTER")==0)         return(HE5_HDFE_CENTER);
-@@ -240,7 +241,7 @@ change_pixelregistcode(char *numbertype)
+@@ -240,7 +233,7 @@ change_pixelregistcode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -141,7 +154,7 @@ index f99b4ee..67a212e 100644
  change_projcode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_GCTP_GEO")==0)            return(HE5_GCTP_GEO);
-@@ -281,7 +282,7 @@ change_projcode(char *numbertype)
+@@ -281,7 +274,7 @@ change_projcode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -150,7 +163,7 @@ index f99b4ee..67a212e 100644
  change_tilingcode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_NOTILE")==0)         return(HE5_HDFE_NOTILE);
-@@ -290,7 +291,7 @@ change_tilingcode(char *numbertype)
+@@ -290,7 +283,7 @@ change_tilingcode(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -159,7 +172,7 @@ index f99b4ee..67a212e 100644
  change_compmethod(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_COMP_NONE")==0)                   return(HE5_HDFE_COMP_NONE);
-@@ -315,7 +316,7 @@ change_compmethod(char *numbertype)
+@@ -315,7 +308,7 @@ change_compmethod(char *numbertype)
  		  __FILE__,__LINE__);
  }
  
@@ -168,7 +181,7 @@ index f99b4ee..67a212e 100644
  change_groupcode(char *numbertype)
  {
      if(strcmp(numbertype,"HE5_HDFE_GEOGROUP")==0)              return(HE5_HDFE_GEOGROUP);
-@@ -337,7 +338,7 @@ change_chartype(hid_t numbertype, char *str)
+@@ -337,7 +330,7 @@ change_chartype(hid_t numbertype, char *str)
      case 4:
      case 5:
      case 56:
@@ -177,7 +190,7 @@ index f99b4ee..67a212e 100644
         strcpy(str,"char");break;
      case 13:
      case 14:
-@@ -371,7 +372,7 @@ change_gridorigintype(hid_t numbertype, char *str)
+@@ -371,7 +364,7 @@ change_gridorigintype(hid_t numbertype, char *str)
      }
  }
  
@@ -186,7 +199,7 @@ index f99b4ee..67a212e 100644
  change_pixelregisttype(hid_t numbertype, char *str)
  {
     switch (numbertype){
-@@ -422,7 +423,7 @@ change_projtype(hid_t numbertype, char *str)
+@@ -422,7 +415,7 @@ change_projtype(hid_t numbertype, char *str)
      }
  }
  
@@ -195,7 +208,7 @@ index f99b4ee..67a212e 100644
  change_tilingtype(hid_t numbertype, char *str)
  {
      switch (numbertype){
-@@ -431,7 +432,7 @@ change_tilingtype(hid_t numbertype, char *str)
+@@ -431,7 +424,7 @@ change_tilingtype(hid_t numbertype, char *str)
      }
  }
  
@@ -205,7 +218,7 @@ index f99b4ee..67a212e 100644
  {
      switch (numbertype){
 diff --git a/hdfeos5gd_wrap.c b/hdfeos5gd_wrap.c
-index 15d714e..8a186ff 100644
+index 15d714e..fad03de 100644
 --- a/hdfeos5gd_wrap.c
 +++ b/hdfeos5gd_wrap.c
 @@ -5,20 +5,6 @@
@@ -229,27 +242,32 @@ index 15d714e..8a186ff 100644
  extern int   check_numbertype(char *);
  extern hid_t change_numbertype(char *);
  extern int   change_entrycode(char *);
-@@ -41,19 +27,14 @@ extern void  change_comptype(hid_t, char *);
+@@ -41,19 +27,19 @@ extern void  change_comptype(hid_t, char *);
  extern int     *hdfeos5_obj2cintary(VALUE);
  extern long    *hdfeos5_obj2clongary(VALUE);
  extern float   *hdfeos5_obj2cfloatary(VALUE);
 -extern signed long long   *hdfeos5_obj2csint64ary(VALUE);
 -extern unsigned long long *hdfeos5_obj2cunsint64ary(VALUE);
++extern hsize_t *hdfeos5_obj2csint64ary(VALUE);
++extern hsize_t *hdfeos5_obj2cunsint64ary(VALUE);
  
  extern VALUE hdfeos5_ccharary2obj(char *, int, int);
  extern VALUE hdfeos5_cintary2obj(int *, int, int, int *);
  extern VALUE hdfeos5_clongary2obj(long *, int, int, int *);
 -extern VALUE hdfeos5_cunsint64ary2obj(unsigned long long *, int, int, int *);
++extern VALUE hdfeos5_cunsint64ary2obj(hsize_t *, int, int, int *);
  
  extern void hdfeos5_freecintary(int *);
  extern void hdfeos5_freeclongary(long *);
  extern void hdfeos5_freecfloatary(float *);
 -extern void hdfeos5_freecsint64ary(signed long long *);
 -extern void hdfeos5_freecunsint64ary(unsigned long long *);
++extern void hdfeos5_freecsint64ary(hsize_t *);
++extern void hdfeos5_freecunsint64ary(hsize_t *);
  
  VALUE hdfeos5_gdwritefield_char(VALUE, VALUE, VALUE, VALUE, VALUE);
  VALUE hdfeos5_gdwritefield_short(VALUE, VALUE, VALUE, VALUE, VALUE);
-@@ -253,31 +234,31 @@ he5gd_mark_obj(struct HE5Gd *he5gd)
+@@ -253,31 +239,31 @@ he5gd_mark_obj(struct HE5Gd *he5gd)
      rb_gc_mark(ptr);
  }
  
@@ -306,641 +324,484 @@ index 15d714e..8a186ff 100644
  
  long
  gdnentries_count(hid_t i_gridid, VALUE entrycode)
-@@ -386,7 +367,7 @@ hdfeos5_gddefdim(VALUE mod, VALUE dimname, VALUE dim)
+@@ -386,7 +372,7 @@ hdfeos5_gddefdim(VALUE mod, VALUE dimname, VALUE dim)
  {
      hid_t i_gridid;
      char *i_dimname;
 -    unsigned long long i_dim;
-+    unsigned long i_dim;
++    hsize_t i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
      struct HE5Gd *he5grid;
-@@ -439,7 +420,7 @@ hdfeos5_gdblksomoffset(VALUE mod, VALUE offset, VALUE count, VALUE code)
+@@ -439,7 +425,7 @@ hdfeos5_gdblksomoffset(VALUE mod, VALUE offset, VALUE count, VALUE code)
      hid_t i_gridid;
      char *i_code;
      long *i_offset;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      herr_t o_rtn_val;
      VALUE rtn_val;
      struct HE5Gd *he5grid;
-@@ -458,7 +439,7 @@ hdfeos5_gdblksomoffset(VALUE mod, VALUE offset, VALUE count, VALUE code)
-     if ((TYPE(count) == T_BIGNUM) || (TYPE(count) == T_FIXNUM)) {
-       count = rb_Array(count);
-     }
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     o_rtn_val = HE5_GDblkSOMoffset(i_gridid, i_offset, i_count, i_code);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
-@@ -498,7 +479,7 @@ hdfeos5_gddeftile(VALUE mod, VALUE tilecode, VALUE tilerank, VALUE tiledims)
+@@ -498,7 +484,7 @@ hdfeos5_gddeftile(VALUE mod, VALUE tilecode, VALUE tilerank, VALUE tiledims)
      hid_t i_gridid;
      int i_tilecode;
      int i_tilerank;
 -    unsigned long long *i_tiledims;
-+    unsigned long *i_tiledims;
++    hsize_t *i_tiledims;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -515,11 +496,11 @@ hdfeos5_gddeftile(VALUE mod, VALUE tilecode, VALUE tilerank, VALUE tiledims)
-     if ((TYPE(tiledims) == T_BIGNUM) || (TYPE(tiledims) == T_FIXNUM)) {
-       tiledims = rb_Array(tiledims);
-     }
--    i_tiledims = hdfeos5_obj2cunsint64ary(tiledims);
-+    i_tiledims = hdfeos5_obj2clongary(tiledims);
- 
-     o_rtn_val = HE5_GDdeftile(i_gridid, i_tilecode, i_tilerank, i_tiledims);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_tiledims);
-+    hdfeos5_freeclongary(i_tiledims);
-     return(rtn_val);
- }
- 
-@@ -530,7 +511,7 @@ hdfeos5_gddefcomtile(VALUE mod, VALUE compcode, VALUE compparm, VALUE tilerank,
+@@ -530,7 +516,7 @@ hdfeos5_gddefcomtile(VALUE mod, VALUE compcode, VALUE compparm, VALUE tilerank,
      int i_compcode;
      int *i_compparm;
      int i_tilerank;
 -    unsigned long long *i_tiledims;
-+    unsigned long *i_tiledims;
++    hsize_t *i_tiledims;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -551,12 +532,12 @@ hdfeos5_gddefcomtile(VALUE mod, VALUE compcode, VALUE compparm, VALUE tilerank,
-     if ((TYPE(tiledims) == T_BIGNUM) || (TYPE(tiledims) == T_FIXNUM)) {
-       tiledims = rb_Array(tiledims);
-     }
--    i_tiledims = hdfeos5_obj2cunsint64ary(tiledims);
-+    i_tiledims = hdfeos5_obj2clongary(tiledims);
- 
-     o_rtn_val = HE5_GDdefcomtile(i_gridid, i_compcode, i_compparm, i_tilerank, i_tiledims);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
-     hdfeos5_freecintary(i_compparm);
--    hdfeos5_freecunsint64ary(i_tiledims);
-+    hdfeos5_freeclongary(i_tiledims);
-     return(rtn_val);
- }
- 
-@@ -607,7 +588,7 @@ hdfeos5_gddiminfo(VALUE mod, VALUE dimname)
+@@ -607,7 +593,7 @@ hdfeos5_gddiminfo(VALUE mod, VALUE dimname)
  {
      hid_t i_gridid;
      char *i_dimname;
 -    unsigned long long o_ndim;
-+    unsigned long o_ndim;
++    hsize_t o_ndim;
      VALUE ndim;
      struct HE5Gd *he5grid;
  
-@@ -757,7 +738,7 @@ hdfeos5_gdfieldinfo(VALUE mod)
+@@ -757,7 +743,7 @@ hdfeos5_gdfieldinfo(VALUE mod)
      char *i_fldname;
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      char str[maxcharsize];
      herr_t o_rtn_val;
-@@ -774,7 +755,7 @@ hdfeos5_gdfieldinfo(VALUE mod)
-     o_rtn_val = HE5_GDfieldinfo(i_gridid, i_fldname, &i_rank, hs_dims, &i_ntype, o_dimlist, NULL);
-     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     rank = INT2NUM(i_rank);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_rank, 1, &i_rank);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_rank, 1, &i_rank);
-     change_chartype(i_ntype, str);
-     ntype =rb_str_new2(str);
-     dimlist = rb_str_new2(o_dimlist);
-@@ -789,7 +770,7 @@ hdfeos5_gdtileinfo(VALUE mod)
+@@ -789,7 +775,7 @@ hdfeos5_gdtileinfo(VALUE mod)
      char *i_fldname;
      int o_tilecode;
      int o_tilerank;
 -    unsigned long long o_tiledims[maxcharsize];
-+    unsigned long o_tiledims[maxcharsize];
++    hsize_t o_tiledims[maxcharsize];
      herr_t o_rtn_val;
      char str[maxcharsize];
      VALUE tilecode;
-@@ -806,7 +787,7 @@ hdfeos5_gdtileinfo(VALUE mod)
-     change_tilingtype(o_tilecode,str);
-     tilecode =rb_str_new2(str);
-     tilerank = INT2NUM(o_tilerank);
--    tiledims =  hdfeos5_cunsint64ary2obj(o_tiledims, o_tilerank, 1, &o_tilerank);
-+    tiledims =  hdfeos5_clongary2obj(o_tiledims, o_tilerank, 1, &o_tilerank);
- 
-     return rb_ary_new3(3, tilecode, tilerank, tiledims);
- }
-@@ -989,7 +970,7 @@ hdfeos5_gdwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
+@@ -989,7 +975,7 @@ hdfeos5_gdwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1007,12 +988,12 @@ hdfeos5_gdwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_GDwriteattr(i_gridid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -1024,7 +1005,7 @@ hdfeos5_gd_get_att(VALUE mod, VALUE attrname)
+@@ -1024,7 +1010,7 @@ hdfeos5_gd_get_att(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Gd *he5grid;
-@@ -1208,7 +1189,7 @@ hdfeos5_gdinqdims(VALUE mod, VALUE entrycode)
+@@ -1208,7 +1194,7 @@ hdfeos5_gdinqdims(VALUE mod, VALUE entrycode)
      int i_count;
      long i_strbufsize;
      char *o_dimnames;
 -    unsigned long long *hs_dims;
-+    unsigned long *hs_dims;
++    hsize_t *hs_dims;
      long o_ndims;
      VALUE ndims;
      VALUE dimnames;
-@@ -1221,14 +1202,14 @@ hdfeos5_gdinqdims(VALUE mod, VALUE entrycode)
+@@ -1221,7 +1207,7 @@ hdfeos5_gdinqdims(VALUE mod, VALUE entrycode)
      i_count = gdnentries_count(i_gridid, entrycode);
      i_strbufsize = gdnentries_strbuf(i_gridid, entrycode);
  
 -    hs_dims = ALLOCA_N(unsigned long long,  i_count);
-+    hs_dims = ALLOCA_N(unsigned long,  i_count);
++    hs_dims = ALLOCA_N(hsize_t,  i_count);
      o_dimnames = ALLOCA_N(char,(i_strbufsize + 1));
  
      o_ndims = HE5_GDinqdims(i_gridid, o_dimnames, hs_dims);
-     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     ndims = LONG2NUM(o_ndims);
-     dimnames = rb_str_new(o_dimnames,i_strbufsize);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_count, 1, &i_count);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_count, 1, &i_count);
- 
-     return rb_ary_new3(3, ndims, dimnames, dims);
- }
-@@ -1297,7 +1278,7 @@ hdfeos5_gdinqfields(VALUE mod, VALUE entrycode)
- 
-     i_count = (int)o_nflds;
-     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
--    ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
-+    ntype = hdfeos5_clongary2obj(o_ntype, i_count, 1, &i_count);
- 
-     return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
- }
-@@ -1432,7 +1413,7 @@ hdfeos5_gdregioninfo(VALUE mod, VALUE regionid)
+@@ -1432,7 +1418,7 @@ hdfeos5_gdregioninfo(VALUE mod, VALUE regionid)
      int o_rank=0;
      long o_size=0;
      int i_npt=2;
 -    unsigned long long o_dims[maxcharsize];
-+    unsigned long o_dims[maxcharsize];
++    hsize_t o_dims[maxcharsize];
      void *o_upleftpt;
      void *o_lowrightpt;
      herr_t o_rtn_val;
-@@ -1459,7 +1440,7 @@ hdfeos5_gdregioninfo(VALUE mod, VALUE regionid)
-     change_chartype(o_ntype, str);
-     ntype =rb_str_new2(str);
-     rank = INT2NUM(o_rank);
--    dims = hdfeos5_cunsint64ary2obj(o_dims, o_rank, 1, &o_rank);
-+    dims = hdfeos5_clongary2obj(o_dims, o_rank, 1, &o_rank);
-     size = INT2NUM(o_size);
- 
-     return rb_ary_new3(6, ntype, rank, dims, size, upleftpt, lowrightpt);
-@@ -1685,7 +1666,7 @@ hdfeos5_gdwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1685,7 +1671,7 @@ hdfeos5_gdwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1704,12 +1685,12 @@ hdfeos5_gdwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_GDwritelocattr(i_gridid, i_fieldname, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return rtn_val;
- }
- 
-@@ -1723,7 +1704,7 @@ hdfeos5_gdfield_get_att(VALUE mod,VALUE  attrname)
+@@ -1723,7 +1709,7 @@ hdfeos5_gdfield_get_att(VALUE mod,VALUE  attrname)
      void *o_datbuf;
      herr_t o_rtn_val;
      hid_t  o_ntype;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
  
      struct HE5GdField *he5field;
      Data_Get_Struct(mod, struct HE5GdField, he5field);
-@@ -1781,7 +1762,7 @@ hdfeos5_gdwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1781,7 +1767,7 @@ hdfeos5_gdwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1799,13 +1780,13 @@ hdfeos5_gdwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
-     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_GDwritegrpattr(i_gridid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -1817,7 +1798,7 @@ hdfeos5_gd_get_grpatt(VALUE mod, VALUE attrname)
+@@ -1817,7 +1803,7 @@ hdfeos5_gd_get_grpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Gd *he5grid;
-@@ -1842,7 +1823,7 @@ hdfeos5_gdsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
+@@ -1842,7 +1828,7 @@ hdfeos5_gdsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
      hid_t i_gridid;
      char  *i_filelist;
      off_t *i_offset;
 -    unsigned long long *i_size;
-+    unsigned long *i_size;
++    hsize_t *i_size;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -1859,13 +1840,13 @@ hdfeos5_gdsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
-       size = rb_Array(size);
-     }
-     i_filelist = RSTRING_PTR(filelist);
--    i_offset = hdfeos5_obj2cunsint64ary(offset);
--    i_size = hdfeos5_obj2cunsint64ary(size);
-+    i_offset = hdfeos5_obj2clongary(offset);
-+    i_size = hdfeos5_obj2clongary(size);
- 
-     o_rtn_val = HE5_GDsetextdata(i_gridid, i_filelist, i_offset, i_size);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_offset);
--    hdfeos5_freecunsint64ary(i_size);
-+    hdfeos5_freeclongary(i_offset);
-+    hdfeos5_freeclongary(i_size);
-     return rtn_val;
- }
- 
-@@ -1877,7 +1858,7 @@ hdfeos5_gdgetextdata(VALUE mod, VALUE fieldname)
+@@ -1877,7 +1863,7 @@ hdfeos5_gdgetextdata(VALUE mod, VALUE fieldname)
      size_t o_namelength=0;
      char  o_filelist[maxcharsize];
      off_t o_offset[maxcharsize];
 -    unsigned long long o_size[maxcharsize];
-+    unsigned long o_size[maxcharsize];
++    hsize_t o_size[maxcharsize];
      int o_nfiles;
      VALUE nfiles;
      VALUE namelength;
-@@ -1899,8 +1880,8 @@ hdfeos5_gdgetextdata(VALUE mod, VALUE fieldname)
- 
-     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_nfiles,1,&o_nfiles);
-     filelist = hdfeos5_ccharary2obj(o_filelist,o_nfiles,o_nfiles);
--    offset = hdfeos5_cunsint64ary2obj(o_offset,o_nfiles,1,&o_nfiles);
--    size = hdfeos5_cunsint64ary2obj(o_size,o_nfiles,1,&o_nfiles);
-+    offset = hdfeos5_clongary2obj(o_offset,o_nfiles,1,&o_nfiles);
-+    size = hdfeos5_clongary2obj(o_size,o_nfiles,1,&o_nfiles);
- 
-     return rb_ary_new3(5,nfiles, namelength, filelist, offset, size);
- }
-@@ -2194,13 +2175,13 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2194,13 +2180,13 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2220,7 +2201,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2220,7 +2206,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2228,7 +2209,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2228,7 +2214,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2249,7 +2230,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2249,7 +2235,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      }
  
      Array_to_Cbyte_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2289,13 +2270,13 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2289,13 +2275,13 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2315,7 +2296,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2315,7 +2301,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2323,7 +2304,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2323,7 +2309,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2344,7 +2325,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2344,7 +2330,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      }
  
      Array_to_Cshort_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2384,13 +2365,13 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -2384,13 +2370,13 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2410,7 +2391,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -2410,7 +2396,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2418,7 +2399,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -2418,7 +2404,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2439,7 +2420,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -2439,7 +2425,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
      }
  
      Array_to_Cint_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2479,13 +2460,13 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2479,13 +2465,13 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2505,7 +2486,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2505,7 +2491,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2513,7 +2494,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2513,7 +2499,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2534,7 +2515,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2534,7 +2520,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      }
  
      Array_to_Clong_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2574,13 +2555,13 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2574,13 +2560,13 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2600,7 +2581,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2600,7 +2586,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2608,7 +2589,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2608,7 +2594,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2629,7 +2610,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2629,7 +2615,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      }
  
      Array_to_Cfloat_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2669,13 +2650,13 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -2669,13 +2655,13 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2695,7 +2676,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -2695,7 +2681,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2703,7 +2684,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -2703,7 +2689,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2724,7 +2705,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -2724,7 +2710,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
      }
  
      Array_to_Cdouble_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2763,13 +2744,13 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2763,13 +2749,13 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -2789,7 +2770,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2789,7 +2775,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -2797,7 +2778,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2797,7 +2783,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2827,7 +2808,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2827,7 +2813,7 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2866,8 +2847,6 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2866,8 +2852,6 @@ hdfeos5_gdreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -949,52 +810,52 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
-@@ -2876,13 +2855,13 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2876,13 +2860,13 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -2902,7 +2881,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2902,7 +2886,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -2910,7 +2889,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2910,7 +2894,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2940,7 +2919,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2940,7 +2924,7 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2979,8 +2958,6 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2979,8 +2963,6 @@ hdfeos5_gdreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -1003,52 +864,52 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
-@@ -2989,13 +2966,13 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -2989,13 +2971,13 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3015,7 +2992,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3015,7 +2997,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3023,7 +3000,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3023,7 +3005,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3053,7 +3030,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3053,7 +3035,7 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3092,8 +3069,6 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3092,8 +3074,6 @@ hdfeos5_gdreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -1057,52 +918,52 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
-@@ -3102,13 +3077,13 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3102,13 +3082,13 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3128,7 +3103,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3128,7 +3108,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3136,7 +3111,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3136,7 +3116,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3166,7 +3141,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3166,7 +3146,7 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3205,8 +3180,6 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3205,8 +3185,6 @@ hdfeos5_gdreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -1111,52 +972,52 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
-@@ -3215,13 +3188,13 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3215,13 +3193,13 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3241,7 +3214,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3241,7 +3219,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3249,7 +3222,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3249,7 +3227,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3279,7 +3252,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3279,7 +3257,7 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3318,8 +3291,6 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3318,8 +3296,6 @@ hdfeos5_gdreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -1165,52 +1026,52 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
-@@ -3328,13 +3299,13 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3328,13 +3304,13 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_gridid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3354,7 +3325,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3354,7 +3330,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
             __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t, i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3362,7 +3333,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3362,7 +3338,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3392,7 +3363,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3392,7 +3368,7 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      }
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t, i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3432,8 +3403,6 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3432,8 +3408,6 @@ hdfeos5_gdreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_GDreadfield(i_gridid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -1219,31 +1080,100 @@ index 15d714e..8a186ff 100644
      return(NArray);
  }
  
+diff --git a/hdfeos5main_wrap.c b/hdfeos5main_wrap.c
+index 5b2a3d2..abd86b4 100644
+--- a/hdfeos5main_wrap.c
++++ b/hdfeos5main_wrap.c
+@@ -5,13 +5,6 @@
+ #include "narray.h"
+ #include<string.h>
+ 
+-#ifndef RSTRING_PTR
+-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
+-#endif
+-#ifndef SafeStringValue
+-#define SafeStringValue(s) Check_SafeStr(s)
+-#endif
+-
+ VALUE rb_eHE5Error;
+ VALUE cHE5;
+ 
+@@ -51,18 +44,18 @@ HE5_init(hid_t fid, char *name)
+   return(HE5file);
+ }
+ 
+-VALUE
+-HE5_clone(VALUE file)
+-{
+-    VALUE clone;
+-    struct HE5 *he51, *he52;
+-
+-    Data_Get_Struct(file, struct HE5, he51);
+-    he52 = HE5_init(he51->fid, he51->name);
+-    clone = Data_Wrap_Struct(cHE5, 0, HE5_free, he52);
+-    CLONESETUP(clone, file);
+-    return clone;
+-}
++/* VALUE */
++/* HE5_clone(VALUE file) */
++/* { */
++/*     VALUE clone; */
++/*     struct HE5 *he51, *he52; */
++
++/*     Data_Get_Struct(file, struct HE5, he51); */
++/*     he52 = HE5_init(he51->fid, he51->name); */
++/*     clone = Data_Wrap_Struct(cHE5, 0, HE5_free, he52); */
++/*     CLONESETUP(clone, file); */
++/*     return clone; */
++/* } */
+ 
+ 
+ VALUE
 diff --git a/hdfeos5pt_wrap.c b/hdfeos5pt_wrap.c
-index e52e489..9d18857 100644
+index e52e489..d8148f5 100644
 --- a/hdfeos5pt_wrap.c
 +++ b/hdfeos5pt_wrap.c
-@@ -26,19 +26,14 @@ extern void  change_chartype(hid_t, char *);
+@@ -5,14 +5,6 @@
+ #include "narray.h"
+ #include<string.h>
+ 
+-/* for compatibility with ruby 1.6 */
+-#ifndef RSTRING_PTR
+-#define RSTRING_PTR(s) (RSTRING(s)->ptr)
+-#endif
+-#ifndef SafeStringValue
+-#define SafeStringValue(s) Check_SafeStr(s)
+-#endif
+-
+ extern int   check_numbertype(char *);
+ extern int   change_numbertype(char *);
+ extern int   HE5_PTdeflevelF(hid_t  pointID, const char *levelname, int rank[], char *fieldlist, long *dim_sizes, int dtype[], int array[]);
+@@ -26,19 +18,19 @@ extern void  change_chartype(hid_t, char *);
  extern int     *hdfeos5_obj2cintary(VALUE);
  extern long    *hdfeos5_obj2clongary(VALUE);
  extern float   *hdfeos5_obj2cfloatary(VALUE);
 -extern signed long long   *hdfeos5_obj2csint64ary(VALUE);
 -extern unsigned long long *hdfeos5_obj2cunsint64ary(VALUE);
++extern hsize_t   *hdfeos5_obj2csint64ary(VALUE);
++extern hsize_t *hdfeos5_obj2cunsint64ary(VALUE);
  
  extern VALUE hdfeos5_ccharary2obj(char *, int, int);
  extern VALUE hdfeos5_cintary2obj(int *, int, int, int *);
  extern VALUE hdfeos5_clongary2obj(long *, int, int, int *);
 -extern VALUE hdfeos5_cunsint64ary2obj(unsigned long long *, int, int, int *);
++extern VALUE hdfeos5_cunsint64ary2obj(hsize_t *, int, int, int *);
  
  extern void hdfeos5_freecintary(int *);
  extern void hdfeos5_freeclongary(long *);
  extern void hdfeos5_freecfloatary(float *);
 -extern void hdfeos5_freecsint64ary(signed long long *);
 -extern void hdfeos5_freecunsint64ary(unsigned long long *);
++extern void hdfeos5_freecsint64ary(hsize_t *);
++extern void hdfeos5_freecunsint64ary(hsize_t *);
  
  VALUE hdfeos5_ptwritelevel_char(VALUE, VALUE, VALUE);
  VALUE hdfeos5_ptwritelevel_short(VALUE, VALUE, VALUE);
-@@ -506,31 +501,31 @@ sort_data_double(hid_t i_ptid, int i_level, char* o_linkfield,const int* shape)
+@@ -506,31 +498,31 @@ sort_data_double(hid_t i_ptid, int i_level, char* o_linkfield,const int* shape)
      return 0;
  }
  
@@ -1300,100 +1230,61 @@ index e52e489..9d18857 100644
  
  VALUE
  hdfeos5_ptcreate(VALUE mod, VALUE pointname)
-@@ -877,7 +872,7 @@ hdfeos5_ptwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
+@@ -877,7 +869,7 @@ hdfeos5_ptwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
      char *i_attrname;
      hid_t i_numbertype;
      int i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -895,12 +890,12 @@ hdfeos5_ptwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_PTwriteattr(i_ptid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -912,7 +907,7 @@ hdfeos5_pt_get_att(VALUE mod, VALUE attrname)
+@@ -912,7 +904,7 @@ hdfeos5_pt_get_att(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Pt *he5point;
-@@ -1140,7 +1135,7 @@ hdfeos5_ptwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1140,7 +1132,7 @@ hdfeos5_ptwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1158,12 +1153,12 @@ hdfeos5_ptwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_PTwritegrpattr(i_ptid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -1175,7 +1170,7 @@ hdfeos5_pt_get_grpatt(VALUE mod, VALUE attrname)
+@@ -1175,7 +1167,7 @@ hdfeos5_pt_get_grpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Pt *he5point;
-@@ -1229,7 +1224,7 @@ hdfeos5_ptwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1229,7 +1221,7 @@ hdfeos5_ptwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1248,7 +1243,7 @@ hdfeos5_ptwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_PTwritelocattr(i_ptid, i_levelname, i_attrname, i_numbertype, i_count, i_datbuf);
-@@ -1267,7 +1262,7 @@ hdfeos5_ptfield_get_att(VALUE mod,VALUE  attrname)
+@@ -1267,7 +1259,7 @@ hdfeos5_ptfield_get_att(VALUE mod,VALUE  attrname)
      void *o_datbuf;
      herr_t o_rtn_val;
      hid_t  o_ntype;
 -    unsigned long long o_count;
-+    unsigned long  o_count;
++    hsize_t o_count;
  
      struct HE5PtField *he5point;
      Data_Get_Struct(mod, struct HE5PtField, he5point);
-@@ -1951,9 +1946,6 @@ hdfeos5_ptreadlevel_char(VALUE mod)
+@@ -1951,9 +1943,6 @@ hdfeos5_ptreadlevel_char(VALUE mod)
            *(char *)&o_data_new[i] = *(char *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1403,7 +1294,7 @@ index e52e489..9d18857 100644
      return(NArray);
  }
  
-@@ -2059,9 +2051,6 @@ hdfeos5_ptreadlevel_short(VALUE mod)
+@@ -2059,9 +2048,6 @@ hdfeos5_ptreadlevel_short(VALUE mod)
            *(short *)&o_data_new[i] = *(short *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1413,7 +1304,7 @@ index e52e489..9d18857 100644
      return(NArray);
  }
  
-@@ -2167,9 +2156,6 @@ hdfeos5_ptreadlevel_int(VALUE mod)
+@@ -2167,9 +2153,6 @@ hdfeos5_ptreadlevel_int(VALUE mod)
            *(int *)&o_data_new[i] = *(int *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1423,7 +1314,7 @@ index e52e489..9d18857 100644
      return(NArray);
  }
  
-@@ -2275,9 +2261,6 @@ hdfeos5_ptreadlevel_long(VALUE mod)
+@@ -2275,9 +2258,6 @@ hdfeos5_ptreadlevel_long(VALUE mod)
            *(long *)&o_data_new[i] = *(long *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1433,7 +1324,7 @@ index e52e489..9d18857 100644
      return(NArray);
  }
  
-@@ -2383,9 +2366,6 @@ hdfeos5_ptreadlevel_float(VALUE mod)
+@@ -2383,9 +2363,6 @@ hdfeos5_ptreadlevel_float(VALUE mod)
            *(float *)&o_data_new[i] = *(float *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1443,7 +1334,7 @@ index e52e489..9d18857 100644
      return(NArray);
  }
  
-@@ -2491,10 +2471,6 @@ hdfeos5_ptreadlevel_double(VALUE mod)
+@@ -2491,10 +2468,6 @@ hdfeos5_ptreadlevel_double(VALUE mod)
            *(double *)&o_data_new[i] = *(double *)&o_data[*(int *)&shape_child[i]];
         }
      }
@@ -1455,7 +1346,7 @@ index e52e489..9d18857 100644
  }
  
 diff --git a/hdfeos5sw_wrap.c b/hdfeos5sw_wrap.c
-index 42764b0..2888a1f 100644
+index 42764b0..f0d6c66 100644
 --- a/hdfeos5sw_wrap.c
 +++ b/hdfeos5sw_wrap.c
 @@ -5,20 +5,6 @@
@@ -1479,21 +1370,32 @@ index 42764b0..2888a1f 100644
  extern int   check_numbertype(char *);
  extern int   change_numbertype(char *);
  extern int   change_entrycode(char *);
-@@ -39,13 +25,10 @@ extern unsigned long long *hdfeos5_obj2cunsint64ary(VALUE);
+@@ -33,19 +19,19 @@ extern void  change_comptype(hid_t, char *);
+ extern int     *hdfeos5_obj2cintary(VALUE);
+ extern long    *hdfeos5_obj2clongary(VALUE);
+ extern float   *hdfeos5_obj2cfloatary(VALUE);
+-extern signed long long   *hdfeos5_obj2csint64ary(VALUE);
+-extern unsigned long long *hdfeos5_obj2cunsint64ary(VALUE);
++extern hsize_t   *hdfeos5_obj2csint64ary(VALUE);
++extern hsize_t *hdfeos5_obj2cunsint64ary(VALUE);
+ 
  extern VALUE hdfeos5_ccharary2obj(char *, int, int);
  extern VALUE hdfeos5_cintary2obj(int *, int, int, int *);
  extern VALUE hdfeos5_clongary2obj(long *, int, int, int *);
 -extern VALUE hdfeos5_cunsint64ary2obj(unsigned long long *, int, int, int *);
++extern VALUE hdfeos5_cunsint64ary2obj(hsize_t *, int, int, int *);
  
  extern void hdfeos5_freecintary(int *);
  extern void hdfeos5_freeclongary(long *);
  extern void hdfeos5_freecfloatary(float *);
 -extern void hdfeos5_freecsint64ary(signed long long *);
 -extern void hdfeos5_freecunsint64ary(unsigned long long *);
++extern void hdfeos5_freecsint64ary(hsize_t *);
++extern void hdfeos5_freecunsint64ary(hsize_t *);
  
  VALUE hdfeos5_swwritefield_char(VALUE, VALUE, VALUE, VALUE, VALUE);
  VALUE hdfeos5_swwritefield_short(VALUE, VALUE, VALUE, VALUE, VALUE);
-@@ -246,32 +229,6 @@ he5sw_mark_obj(struct HE5Sw *he5sw)
+@@ -246,31 +232,31 @@ he5sw_mark_obj(struct HE5Sw *he5sw)
      rb_gc_mark(ptr);
  }
  
@@ -1522,891 +1424,668 @@ index 42764b0..2888a1f 100644
 -    CLONESETUP(clone, field);
 -    return clone;
 -}
--
++/* VALUE */
++/* HE5Sw_clone(VALUE swath) */
++/* { */
++/*     VALUE clone; */
++/*     struct HE5Sw *he5sw1, *he5sw2; */
++
++/*     Data_Get_Struct(swath, struct HE5Sw, he5sw1); */
++/*     he5sw2 = HE5Sw_init(he5sw1->swid, he5sw1->name, he5sw1->fid, he5sw1->file); */
++/*     clone = Data_Wrap_Struct(cHE5Sw, he5sw_mark_obj, HE5Sw_free, he5sw2); */
++/*     CLONESETUP(clone, swath); */
++/*     return clone; */
++/* } */
++
++/* VALUE */
++/* HE5SwField_clone(VALUE field) */
++/* { */
++/*     VALUE clone; */
++/*     struct HE5SwField *he5fld1, *he5fld2; */
++
++/*     Data_Get_Struct(field, struct HE5SwField, he5fld1); */
++/*     he5fld2 = HE5SwField_init(he5fld1->name, he5fld1->swid, he5fld1->swath); */
++/*     clone = Data_Wrap_Struct(cHE5SwField, he5swfield_mark_obj, HE5SwField_free, he5fld2); */
++/*     CLONESETUP(clone, field); */
++/*     return clone; */
++/* } */
+ 
  long
  swnentries_count(hid_t i_swathid, VALUE entrycode)
- {
-@@ -361,7 +318,7 @@ hdfeos5_swdefdim(VALUE mod, VALUE dimname, VALUE dim)
+@@ -361,7 +347,7 @@ hdfeos5_swdefdim(VALUE mod, VALUE dimname, VALUE dim)
  {
      hid_t i_swathid;
      char *i_dimname;
 -    unsigned long long i_dim;
-+    unsigned long i_dim;
++    hsize_t i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
      struct HE5Sw *he5swath;
-@@ -383,7 +340,7 @@ hdfeos5_swdiminfo(VALUE mod, VALUE dimname)
+@@ -383,7 +369,7 @@ hdfeos5_swdiminfo(VALUE mod, VALUE dimname)
  {
      hid_t i_swathid;
      char *i_dimname;
 -    unsigned long long o_ndim;
-+    unsigned long o_ndim;
++    hsize_t o_ndim;
      VALUE ndim;
      struct HE5Sw *he5swath;
  
-@@ -440,7 +397,7 @@ hdfeos5_swidxmapinfo(VALUE mod, VALUE geodim, VALUE datadim)
+@@ -440,7 +426,7 @@ hdfeos5_swidxmapinfo(VALUE mod, VALUE geodim, VALUE datadim)
      char *i_datadim;
      long *i_index;
      int size;
 -    unsigned long long o_gsize;
-+    unsigned long o_gsize;
++    hsize_t o_gsize;
      VALUE gsize;
      VALUE index;
      VALUE dimsize;
-@@ -502,7 +459,7 @@ hdfeos5_swfieldinfo(VALUE mod)
+@@ -502,7 +488,7 @@ hdfeos5_swfieldinfo(VALUE mod)
      char *i_fldname;
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      char str[maxcharsize];
      herr_t o_rtn_val;
-@@ -519,7 +476,7 @@ hdfeos5_swfieldinfo(VALUE mod)
-     o_rtn_val = HE5_SWfieldinfo(i_swathid, i_fldname, &i_rank, hs_dims, &i_ntype, o_dimlist, NULL);
-     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     rank = INT2NUM(i_rank);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_rank, 1, &i_rank);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_rank, 1, &i_rank);
-     change_chartype(i_ntype, str);
-     ntype =rb_str_new(str,strlen(str));
-     dimlist = rb_str_new(o_dimlist,strlen(o_dimlist));
-@@ -533,7 +490,7 @@ hdfeos5_swchunkinfo(VALUE mod, VALUE fldname)
+@@ -533,7 +519,7 @@ hdfeos5_swchunkinfo(VALUE mod, VALUE fldname)
      hid_t i_swathid;
      char *i_fldname;
      int o_chunk_rank;
 -    unsigned long long *o_chunk_dim;
-+    unsigned long *o_chunk_dim;
++    hsize_t *o_chunk_dim;
      herr_t o_rtn_val;
      VALUE chunk_rank;
      VALUE chunk_dims;
-@@ -547,12 +504,12 @@ hdfeos5_swchunkinfo(VALUE mod, VALUE fldname)
+@@ -547,7 +533,7 @@ hdfeos5_swchunkinfo(VALUE mod, VALUE fldname)
  
      o_rtn_val = HE5_SWchunkinfo(i_swathid, i_fldname, &o_chunk_rank, NULL);
      if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
 -    o_chunk_dim = ALLOCA_N(unsigned long long, (o_chunk_rank + 1));
-+    o_chunk_dim = ALLOCA_N(unsigned long, (o_chunk_rank + 1));
++    o_chunk_dim = ALLOCA_N(hsize_t, (o_chunk_rank + 1));
  
      o_rtn_val = HE5_SWchunkinfo(i_swathid, i_fldname, &o_chunk_rank, o_chunk_dim);
      if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     chunk_rank = INT2NUM(o_chunk_rank);
--    chunk_dims = hdfeos5_cunsint64ary2obj(o_chunk_dim, o_chunk_rank, 1, &o_chunk_rank);
-+    chunk_dims = hdfeos5_clongary2obj(o_chunk_dim, o_chunk_rank, 1, &o_chunk_rank);
- 
-     return rb_ary_new3(2, chunk_rank, chunk_dims);
- }
-@@ -563,8 +520,8 @@ hdfeos5_swdefdimmap(VALUE mod, VALUE geodim, VALUE datadim, VALUE offset, VALUE
+@@ -563,8 +549,8 @@ hdfeos5_swdefdimmap(VALUE mod, VALUE geodim, VALUE datadim, VALUE offset, VALUE
      hid_t i_swathid;
      char *i_geodim;
      char *i_datadim;
 -    unsigned long long i_offset;
 -    unsigned long long i_increment;
-+    unsigned long i_offset;
-+    unsigned long i_increment;
++    hsize_t i_offset;
++    hsize_t i_increment;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -626,7 +583,7 @@ hdfeos5_swdefchunk(VALUE mod, VALUE rank, VALUE dim)
+@@ -626,7 +612,7 @@ hdfeos5_swdefchunk(VALUE mod, VALUE rank, VALUE dim)
  {
      hid_t i_swathid;
      int i_rank;
 -    unsigned long long *i_dim;
-+    unsigned long *i_dim;
++    hsize_t *i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -639,11 +596,11 @@ hdfeos5_swdefchunk(VALUE mod, VALUE rank, VALUE dim)
-     if ((TYPE(dim) == T_BIGNUM) || (TYPE(dim) == T_FIXNUM)) {
-       dim = rb_Array(dim);
-     }
--    i_dim = hdfeos5_obj2cunsint64ary(dim);
-+    i_dim = hdfeos5_obj2clongary(dim);
- 
-     o_rtn_val = HE5_SWdefchunk(i_swathid, i_rank, i_dim);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_dim);
-+    hdfeos5_freeclongary(i_dim);
-     return(rtn_val);
- }
- 
-@@ -681,7 +638,7 @@ hdfeos5_swdefcomchunk(VALUE mod, VALUE compcode, VALUE compparm, VALUE rank, VAL
+@@ -681,7 +667,7 @@ hdfeos5_swdefcomchunk(VALUE mod, VALUE compcode, VALUE compparm, VALUE rank, VAL
      int i_compcode;
      int *i_compparm;
      int i_rank;
 -    unsigned long long *i_dim;
-+    unsigned long *i_dim;
++    hsize_t *i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -702,12 +659,12 @@ hdfeos5_swdefcomchunk(VALUE mod, VALUE compcode, VALUE compparm, VALUE rank, VAL
-     if ((TYPE(dim) == T_BIGNUM) || (TYPE(dim) == T_FIXNUM)) {
-       dim = rb_Array(dim);
-     }
--    i_dim = hdfeos5_obj2cunsint64ary(dim);
-+    i_dim = hdfeos5_obj2clongary(dim);
- 
-     o_rtn_val = HE5_SWdefcomchunk(i_swathid, i_compcode, i_compparm, i_rank, i_dim);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
-     hdfeos5_freecintary(i_compparm);
--    hdfeos5_freecunsint64ary(i_dim);
-+    hdfeos5_freeclongary(i_dim);
-     return(rtn_val);
- }
- 
-@@ -855,7 +812,7 @@ hdfeos5_swwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
+@@ -855,7 +841,7 @@ hdfeos5_swwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -873,12 +830,12 @@ hdfeos5_swwriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_SWwriteattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -890,7 +847,7 @@ hdfeos5_sw_get_att(VALUE mod, VALUE attrname)
+@@ -890,7 +876,7 @@ hdfeos5_sw_get_att(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Sw *he5swath;
-@@ -944,7 +901,7 @@ hdfeos5_swinqdims(VALUE mod, VALUE entrycode)
+@@ -944,7 +930,7 @@ hdfeos5_swinqdims(VALUE mod, VALUE entrycode)
      int i_count;
      long i_strbufsize;
      char *o_dimnames;
 -    unsigned long long *hs_dims;
-+    unsigned long *hs_dims;
++    hsize_t *hs_dims;
      long o_ndims;
      VALUE ndims;
      VALUE dimnames;
-@@ -957,14 +914,14 @@ hdfeos5_swinqdims(VALUE mod, VALUE entrycode)
+@@ -957,7 +943,7 @@ hdfeos5_swinqdims(VALUE mod, VALUE entrycode)
      i_count = swnentries_count(i_swathid, entrycode);
      i_strbufsize = swnentries_strbuf(i_swathid, entrycode);
  
 -    hs_dims = ALLOCA_N(unsigned long long,  i_count);
-+    hs_dims = ALLOCA_N(unsigned long,  i_count);
++    hs_dims = ALLOCA_N(hsize_t,  i_count);
      o_dimnames = ALLOCA_N(char, (i_strbufsize + 1));
  
      o_ndims = HE5_SWinqdims(i_swathid, o_dimnames, hs_dims);
-     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     ndims = LONG2NUM(o_ndims);
-     dimnames = rb_str_new(o_dimnames,i_strbufsize);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_count, 1, &i_count);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_count, 1, &i_count);
- 
-     return rb_ary_new3(3, ndims, dimnames, dims);
- }
-@@ -1010,7 +967,7 @@ hdfeos5_swinqidxmaps(VALUE mod, VALUE entrycode)
+@@ -1010,7 +996,7 @@ hdfeos5_swinqidxmaps(VALUE mod, VALUE entrycode)
  {
      hid_t i_swathid;
      char *o_idxmaps;
 -    unsigned long long *hs_idxsizes;
-+    unsigned long *hs_idxsizes;
++    hsize_t *hs_idxsizes;
      long o_nmap;
      int i_count;
      long i_strbufsize;
-@@ -1025,14 +982,14 @@ hdfeos5_swinqidxmaps(VALUE mod, VALUE entrycode)
+@@ -1025,7 +1011,7 @@ hdfeos5_swinqidxmaps(VALUE mod, VALUE entrycode)
      i_count = swnentries_count(i_swathid, entrycode);
      i_strbufsize = swnentries_strbuf(i_swathid, entrycode);
  
 -    hs_idxsizes = ALLOCA_N(unsigned long long, i_count);
-+    hs_idxsizes = ALLOCA_N(unsigned long, i_count);
++    hs_idxsizes = ALLOCA_N(hsize_t, i_count);
      o_idxmaps = ALLOCA_N(char, (i_strbufsize + 1));
  
      o_nmap = HE5_SWinqidxmaps(i_swathid, o_idxmaps, hs_idxsizes);
-     if(o_nmap < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     nmap = LONG2NUM(o_nmap);
-     idxmaps = rb_str_new(o_idxmaps,i_strbufsize);
--    idxsizes = hdfeos5_cunsint64ary2obj(hs_idxsizes, i_count, 1, &i_count);
-+    idxsizes = hdfeos5_clongary2obj(hs_idxsizes, i_count, 1, &i_count);
- 
-     return rb_ary_new3(3, nmap, idxmaps, idxsizes);
- }
-@@ -1073,7 +1030,7 @@ hdfeos5_swinqdatafields(VALUE mod, VALUE entrycode)
- 
-     i_count = (int)o_nflds;
-     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
--    ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
-+    ntype = hdfeos5_clongary2obj(o_ntype, i_count, 1, &i_count);
- 
-     return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
- }
-@@ -1113,7 +1070,7 @@ hdfeos5_swinqgeofields(VALUE mod, VALUE entrycode)
- 
-     i_count = (int)o_nflds;
-     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
--    ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
-+    ntype = hdfeos5_clongary2obj(o_ntype, i_count, 1, &i_count);
- 
-     return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
- }
-@@ -1322,7 +1279,7 @@ hdfeos5_swfldsrch(VALUE mod)
+@@ -1322,7 +1308,7 @@ hdfeos5_swfldsrch(VALUE mod)
      char *i_fieldname;
      hid_t o_fieldid;
      int o_rank;
 -    unsigned long long *o_dims;
-+    unsigned long *o_dims;
++    hsize_t *o_dims;
      hid_t o_typeid;
      int o_fldgroup;
      VALUE fldgroup;
-@@ -1339,13 +1296,13 @@ hdfeos5_swfldsrch(VALUE mod)
+@@ -1339,7 +1325,7 @@ hdfeos5_swfldsrch(VALUE mod)
      o_fldgroup = HE5_SWfldsrch(i_swathid, i_fieldname, &o_fieldid, &o_rank, NULL, &o_typeid);
      if(o_fldgroup == -1) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
 -    o_dims = ALLOCA_N(unsigned long long, (o_rank + 1));
-+    o_dims = ALLOCA_N(unsigned long, (o_rank + 1));
++    o_dims = ALLOCA_N(hsize_t, (o_rank + 1));
      o_fldgroup = HE5_SWfldsrch(i_swathid, i_fieldname, &o_fieldid, &o_rank, o_dims, &o_typeid);
      if(o_fldgroup == -1) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
      fldgroup = INT2NUM(o_fldgroup);
-     fieldid = INT2NUM(o_fieldid);
-     rank    = INT2NUM(o_rank);
--    dims    = hdfeos5_cunsint64ary2obj(o_dims, o_rank, 1, &o_rank);
-+    dims    = hdfeos5_clongary2obj(o_dims, o_rank, 1, &o_rank);
-     type_id = INT2NUM(o_typeid);
- 
-     return rb_ary_new3(5, fldgroup, fieldid, rank, dims, type_id);
-@@ -1408,7 +1365,7 @@ hdfeos5_swregionindex(VALUE mod, VALUE cornerlon, VALUE cornerlat, VALUE mode)
+@@ -1408,7 +1394,7 @@ hdfeos5_swregionindex(VALUE mod, VALUE cornerlon, VALUE cornerlat, VALUE mode)
      float *i_cornerlat;
      int    i_mode;
      char   o_geodim[maxcharsize]="";
 -    unsigned long long o_idxrange;
-+    unsigned long o_idxrange;
++    hsize_t o_idxrange;
      hid_t o_rtn_val;
      VALUE rtn_val;
      VALUE geodim;
-@@ -1651,7 +1608,7 @@ hdfeos5_swregioninfo(VALUE mod, VALUE regionid)
+@@ -1651,7 +1637,7 @@ hdfeos5_swregioninfo(VALUE mod, VALUE regionid)
      char *i_fieldname;
      hid_t o_ntype;
      int o_rank=0;
 -    unsigned long long o_dims[maxcharsize];
-+    unsigned long o_dims[maxcharsize];
++    hsize_t o_dims[maxcharsize];
      size_t o_size=0;
      herr_t o_rtn_val;
      char str[maxcharsize];
-@@ -1673,7 +1630,7 @@ hdfeos5_swregioninfo(VALUE mod, VALUE regionid)
-     change_chartype(o_ntype, str);
-     ntype =rb_str_new(str,strlen(str));
-     rank = INT2NUM(o_rank);
--    dims = hdfeos5_cunsint64ary2obj(o_dims, o_rank, 1, &o_rank);
-+    dims = hdfeos5_clongary2obj(o_dims, o_rank, 1, &o_rank);
-     size = INT2NUM(o_size);
- 
-     return rb_ary_new3(4, ntype, rank, dims, size);
-@@ -1687,7 +1644,7 @@ hdfeos5_swperiodinfo(VALUE mod, VALUE periodid)
+@@ -1687,7 +1673,7 @@ hdfeos5_swperiodinfo(VALUE mod, VALUE periodid)
      char *i_fieldname;
      hid_t o_ntype;
      int o_rank=0;
 -    unsigned long long o_dims[maxcharsize];
-+    unsigned long o_dims[maxcharsize];
++    hsize_t o_dims[maxcharsize];
      size_t o_size=0;
      herr_t o_rtn_val;
      char str[maxcharsize];
-@@ -1709,7 +1666,7 @@ hdfeos5_swperiodinfo(VALUE mod, VALUE periodid)
-     change_chartype(o_ntype, str);
-     ntype =rb_str_new(str,strlen(str));
-     rank = INT2NUM(o_rank);
--    dims = hdfeos5_cunsint64ary2obj(o_dims, o_rank, 1, &o_rank);
-+    dims = hdfeos5_clongary2obj(o_dims, o_rank, 1, &o_rank);
-     size = INT2NUM(o_size);
- 
-     return rb_ary_new3(4, ntype, rank, dims, size);
-@@ -1798,7 +1755,7 @@ hdfeos5_swwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1798,7 +1784,7 @@ hdfeos5_swwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1816,12 +1773,12 @@ hdfeos5_swwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_SWwritegrpattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
-@@ -1833,7 +1790,7 @@ hdfeos5_sw_get_grpatt(VALUE mod, VALUE attrname)
+@@ -1833,7 +1819,7 @@ hdfeos5_sw_get_grpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Sw *he5swath;
-@@ -1885,7 +1842,7 @@ hdfeos5_swwritegeogrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE cou
+@@ -1885,7 +1871,7 @@ hdfeos5_swwritegeogrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE cou
      hid_t i_swathid;
      char *i_attrname;
      hid_t i_numbertype;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1904,12 +1861,12 @@ hdfeos5_swwritegeogrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE cou
-     }
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype = change_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
-     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
- 
-     o_rtn_val = HE5_SWwritegeogrpattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     hdfeos5_freecfloatary(i_datbuf);
-     return rtn_val;
- }
-@@ -1922,7 +1879,7 @@ hdfeos5_sw_get_geogrpatt(VALUE mod, VALUE attrname)
+@@ -1922,7 +1908,7 @@ hdfeos5_sw_get_geogrpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Sw *he5swath;
-@@ -1976,7 +1933,7 @@ hdfeos5_swwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -1976,7 +1962,7 @@ hdfeos5_swwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1995,7 +1952,7 @@ hdfeos5_swwritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_SWwritelocattr(i_swathid, i_fieldname, i_attrname, i_numbertype, i_count, i_datbuf);
-@@ -2014,7 +1971,7 @@ hdfeos5_swfield_get_att(VALUE mod,VALUE  attrname)
+@@ -2014,7 +2000,7 @@ hdfeos5_swfield_get_att(VALUE mod,VALUE  attrname)
      void *o_datbuf;
      herr_t o_rtn_val;
      hid_t  o_ntype;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
  
      struct HE5SwField *he5field;
      Data_Get_Struct(mod, struct HE5SwField, he5field);
-@@ -2105,9 +2062,9 @@ hdfeos5_prwrite(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE e
+@@ -2105,9 +2091,9 @@ hdfeos5_prwrite(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE e
  {
      hid_t i_swathid;
      char *i_profilename;
 -    signed long long *i_start;
 -    unsigned long long *i_stride;
 -    unsigned long long *i_edge;
-+    signed long *i_start;
-+    unsigned long *i_stride;
-+    unsigned long *i_edge;
++    hsize_t *i_start;
++    hsize_t *i_stride;
++    hsize_t *i_edge;
      size_t i_size;
      void *i_buffer;
      herr_t o_rtn_val;
-@@ -2128,16 +2085,16 @@ hdfeos5_prwrite(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE e
-     }
-     i_profilename = RSTRING_PTR(profilename);
-     i_size = NUM2LONG(size);
--    i_start = hdfeos5_obj2csint64ary(start);
--    i_stride = hdfeos5_obj2cunsint64ary(stride);
--    i_edge = hdfeos5_obj2cunsint64ary(edge);
-+    i_start = hdfeos5_obj2clongary(start);
-+    i_stride = hdfeos5_obj2clongary(stride);
-+    i_edge = hdfeos5_obj2clongary(edge);
-     i_buffer = hdfeos5_obj2cfloatary(buffer);
- 
-     o_rtn_val = HE5_PRwrite(i_swathid, i_profilename, i_start, i_stride, i_edge, i_size, i_buffer);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecsint64ary(i_start);
--    hdfeos5_freecunsint64ary(i_stride);
--    hdfeos5_freecunsint64ary(i_edge);
-+    hdfeos5_freeclongary(i_start);
-+    hdfeos5_freeclongary(i_stride);
-+    hdfeos5_freeclongary(i_edge);
-     hdfeos5_freecfloatary(i_buffer);
-     return rtn_val;
- }
-@@ -2147,9 +2104,9 @@ hdfeos5_prread(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE ed
+@@ -2147,9 +2133,9 @@ hdfeos5_prread(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE ed
  {
      hid_t i_swathid;
      char *i_profilename;
 -    signed long long *i_start;
 -    unsigned long long *i_stride;
 -    unsigned long long *i_edge;
-+    signed long *i_start;
-+    unsigned long *i_stride;
-+    unsigned long *i_edge;
++    hsize_t *i_start;
++    hsize_t *i_stride;
++    hsize_t *i_edge;
      void *o_buffer;
      herr_t o_rtn_val;
      VALUE buffer;
-@@ -2165,16 +2122,16 @@ hdfeos5_prread(VALUE mod, VALUE profilename, VALUE start, VALUE stride, VALUE ed
-     edge = rb_Array(edge);
- 
-     i_profilename = RSTRING_PTR(profilename);
--    i_start = hdfeos5_obj2csint64ary(start);
--    i_stride = hdfeos5_obj2cunsint64ary(stride);
--    i_edge = hdfeos5_obj2cunsint64ary(edge);
-+    i_start = hdfeos5_obj2clongary(start);
-+    i_stride = hdfeos5_obj2clongary(stride);
-+    i_edge = hdfeos5_obj2clongary(edge);
- 
-     o_buffer = (void*)malloc(HE5_BLKSIZE);
-     o_rtn_val = HE5_PRread(i_swathid, i_profilename, i_start, i_stride, i_edge, o_buffer);
-     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
--    hdfeos5_freecsint64ary(i_start);
--    hdfeos5_freecunsint64ary(i_stride);
--    hdfeos5_freecunsint64ary(i_edge);
-+    hdfeos5_freeclongary(i_start);
-+    hdfeos5_freeclongary(i_stride);
-+    hdfeos5_freeclongary(i_edge);
-     buffer = rb_str_new2(o_buffer);
-     return buffer;
- }
-@@ -2236,8 +2193,8 @@ hdfeos5_prinfo(VALUE mod, VALUE profilename)
+@@ -2236,8 +2222,8 @@ hdfeos5_prinfo(VALUE mod, VALUE profilename)
      hid_t i_swathid;
      char *i_profilename;
      int o_rank;
 -    unsigned long long o_dims;
 -    unsigned long long o_maxdims;
-+    unsigned long o_dims;
-+    unsigned long o_maxdims;
++    hsize_t o_dims;
++    hsize_t o_maxdims;
      hid_t o_ntype;
      char o_dimlist[maxcharsize]="";
      herr_t o_rtn_val;
-@@ -2271,7 +2228,7 @@ hdfeos5_prwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
+@@ -2271,7 +2257,7 @@ hdfeos5_prwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      hid_t i_swathid;
      char *i_attrname;
      hid_t i_numbertype;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -2290,12 +2247,12 @@ hdfeos5_prwritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     }
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype = change_numbertype(RSTRING_PTR(numbertype));
--    i_count =  hdfeos5_obj2cunsint64ary(count);
-+    i_count =  hdfeos5_obj2clongary(count);
-     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
- 
-     o_rtn_val = HE5_PRwritegrpattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     hdfeos5_freecfloatary(i_datbuf);
-     return rtn_val;
- }
-@@ -2308,7 +2265,7 @@ hdfeos5_pr_get_grpatt(VALUE mod, VALUE attrname)
+@@ -2308,7 +2294,7 @@ hdfeos5_pr_get_grpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_buffer;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Sw *he5swath;
-@@ -2596,7 +2553,7 @@ hdfeos5_swsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
+@@ -2596,7 +2582,7 @@ hdfeos5_swsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
      hid_t i_swathid;
      char  *i_filelist;
      off_t *i_offset;
 -    unsigned long long *i_size;
-+    unsigned long *i_size;
++    hsize_t *i_size;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -2613,13 +2570,13 @@ hdfeos5_swsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
-       size = rb_Array(size);
-     }
-     i_filelist = RSTRING_PTR(filelist);
--    i_offset = hdfeos5_obj2cunsint64ary(offset);
--    i_size = hdfeos5_obj2cunsint64ary(size);
-+    i_offset = hdfeos5_obj2clongary(offset);
-+    i_size = hdfeos5_obj2clongary(size);
- 
-     o_rtn_val = HE5_SWsetextdata(i_swathid, i_filelist, i_offset, i_size);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_offset);
--    hdfeos5_freecunsint64ary(i_size);
-+    hdfeos5_freeclongary(i_offset);
-+    hdfeos5_freeclongary(i_size);
-     return rtn_val;
- }
- 
-@@ -2631,7 +2588,7 @@ hdfeos5_swgetextdata(VALUE mod, VALUE fieldname)
+@@ -2631,7 +2617,7 @@ hdfeos5_swgetextdata(VALUE mod, VALUE fieldname)
      size_t o_namelength=0;
      char  o_filelist[maxcharsize];
      off_t o_offset[maxcharsize];
 -    unsigned long long o_size[maxcharsize];
-+    unsigned long o_size[maxcharsize];
++    hsize_t o_size[maxcharsize];
      int o_rtn_val;
      VALUE rtn_val;
      VALUE namelength;
-@@ -2653,8 +2610,8 @@ hdfeos5_swgetextdata(VALUE mod, VALUE fieldname)
- 
-     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
-     filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
--    offset = hdfeos5_cunsint64ary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
--    size = hdfeos5_cunsint64ary2obj(o_size,o_rtn_val,1,&o_rtn_val);
-+    offset = hdfeos5_clongary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
-+    size = hdfeos5_clongary2obj(o_size,o_rtn_val,1,&o_rtn_val);
- 
-     return rb_ary_new3(5,rtn_val, namelength, filelist, offset, size);
- }
-@@ -2666,7 +2623,7 @@ hdfeos5_swindexinfo(VALUE mod, VALUE regionid, VALUE object)
+@@ -2666,7 +2652,7 @@ hdfeos5_swindexinfo(VALUE mod, VALUE regionid, VALUE object)
      char *i_object;
      int o_rank;
      char o_dimlist[maxcharsize]="";
 -    unsigned long long *o_indices;
-+    unsigned long *o_indices;
++    hsize_t *o_indices;
      herr_t o_rtn_val;
      VALUE rank;
      VALUE dimlist;
-@@ -2842,13 +2799,13 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2842,13 +2828,13 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2868,7 +2825,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2868,7 +2854,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2876,7 +2833,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2876,7 +2862,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2897,7 +2854,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -2897,7 +2883,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      }
  
      Array_to_Cbyte_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2937,13 +2894,13 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2937,13 +2923,13 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -2963,7 +2920,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2963,7 +2949,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -2971,7 +2928,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2971,7 +2957,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -2992,7 +2949,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -2992,7 +2978,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      }
  
      Array_to_Cshort_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3032,13 +2989,13 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -3032,13 +3018,13 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -3058,7 +3015,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -3058,7 +3044,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -3066,7 +3023,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -3066,7 +3052,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3087,7 +3044,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
+@@ -3087,7 +3073,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
      }
  
      Array_to_Cint_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3127,13 +3084,13 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -3127,13 +3113,13 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -3153,7 +3110,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -3153,7 +3139,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -3161,7 +3118,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -3161,7 +3147,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3182,7 +3139,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
+@@ -3182,7 +3168,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      }
  
      Array_to_Clong_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3222,13 +3179,13 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -3222,13 +3208,13 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -3248,7 +3205,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -3248,7 +3234,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -3256,7 +3213,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -3256,7 +3242,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3277,7 +3234,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
+@@ -3277,7 +3263,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      }
  
      Array_to_Cfloat_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3317,13 +3274,13 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -3317,13 +3303,13 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_edge_all=1;
-@@ -3343,7 +3300,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -3343,7 +3329,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
      if(RARRAY_LEN(start) < i_rank) {
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
-@@ -3351,7 +3308,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -3351,7 +3337,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3372,7 +3329,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
+@@ -3372,7 +3358,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
      }
  
      Array_to_Cdouble_len_shape(data,i_data,len,shape);
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3412,13 +3369,13 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3412,13 +3398,13 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3438,7 +3395,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3438,7 +3424,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3446,7 +3403,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3446,7 +3432,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3476,7 +3433,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3476,7 +3462,7 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3515,8 +3472,6 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3515,8 +3501,6 @@ hdfeos5_swreadfield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2415,52 +2094,52 @@ index 42764b0..2888a1f 100644
      return(NArray);
  }
  
-@@ -3525,13 +3480,13 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3525,13 +3509,13 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3551,7 +3506,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3551,7 +3535,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3559,7 +3514,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3559,7 +3543,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3589,7 +3544,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3589,7 +3573,7 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3628,8 +3583,6 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3628,8 +3612,6 @@ hdfeos5_swreadfield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2469,52 +2148,52 @@ index 42764b0..2888a1f 100644
      return(NArray);
  }
  
-@@ -3638,13 +3591,13 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3638,13 +3620,13 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3664,7 +3617,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3664,7 +3646,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3672,7 +3625,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3672,7 +3654,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3702,7 +3655,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3702,7 +3684,7 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3741,8 +3694,6 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3741,8 +3723,6 @@ hdfeos5_swreadfield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2523,52 +2202,52 @@ index 42764b0..2888a1f 100644
      return(NArray);
  }
  
-@@ -3751,13 +3702,13 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3751,13 +3731,13 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3777,7 +3728,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3777,7 +3757,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3785,7 +3736,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3785,7 +3765,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3815,7 +3766,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3815,7 +3795,7 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3854,8 +3805,6 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3854,8 +3834,6 @@ hdfeos5_swreadfield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2577,52 +2256,52 @@ index 42764b0..2888a1f 100644
      return(NArray);
  }
  
-@@ -3864,13 +3813,13 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3864,13 +3842,13 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -3890,7 +3839,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3890,7 +3868,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -3898,7 +3847,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3898,7 +3876,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3928,7 +3877,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3928,7 +3906,7 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -3967,8 +3916,6 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3967,8 +3945,6 @@ hdfeos5_swreadfield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2631,52 +2310,52 @@ index 42764b0..2888a1f 100644
      return(NArray);
  }
  
-@@ -3977,13 +3924,13 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -3977,13 +3953,13 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  {
      hid_t i_swathid;
      char *i_fldname;
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_edge;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_edge;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_edge;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_edge;
      int  *shape;    /* NArray uses int instead of size_t */
-@@ -4003,7 +3950,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -4003,7 +3979,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
-@@ -4011,7 +3958,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -4011,7 +3987,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
        }
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -4041,7 +3988,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -4041,7 +4017,7 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
  	}
        }
      }
 -    c_edge=ALLOCA_N(unsigned long long,i_rank);
-+    c_edge=ALLOCA_N(unsigned long,i_rank);
++    c_edge=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(edge)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
-@@ -4080,8 +4027,6 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
+@@ -4080,8 +4056,6 @@ hdfeos5_swreadfield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge)
      status = HE5_SWreadfield(i_swathid, i_fldname, c_start, c_stride, c_edge, o_data);
      if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
@@ -2686,7 +2365,7 @@ index 42764b0..2888a1f 100644
  }
  
 diff --git a/hdfeos5za_wrap.c b/hdfeos5za_wrap.c
-index 98ba52c..558782b 100644
+index 98ba52c..9c8012b 100644
 --- a/hdfeos5za_wrap.c
 +++ b/hdfeos5za_wrap.c
 @@ -5,20 +5,6 @@
@@ -2710,6 +2389,31 @@ index 98ba52c..558782b 100644
  extern int   check_numbertype(char *);
  extern int   change_numbertype(char *);
  extern int   change_entrycode(char *);
+@@ -32,19 +18,19 @@ extern void  change_comptype(hid_t, char *);
+ extern int     *hdfeos5_obj2cintary(VALUE);
+ extern long    *hdfeos5_obj2clongary(VALUE);
+ extern float   *hdfeos5_obj2cfloatary(VALUE);
+-extern signed long long   *hdfeos5_obj2csint64ary(VALUE);
+-extern unsigned long long *hdfeos5_obj2cunsint64ary(VALUE);
++extern hsize_t   *hdfeos5_obj2csint64ary(VALUE);
++extern hsize_t *hdfeos5_obj2cunsint64ary(VALUE);
+ 
+ extern VALUE hdfeos5_ccharary2obj(char *, int, int);
+ extern VALUE hdfeos5_cintary2obj(int *, int, int, int *);
+ extern VALUE hdfeos5_clongary2obj(long *, int, int, int *);
+-extern VALUE hdfeos5_cunsint64ary2obj(unsigned long long *, int, int, int *);
++extern VALUE hdfeos5_cunsint64ary2obj(hsize_t *, int, int, int *);
+ 
+ extern void hdfeos5_freecintary(int *);
+ extern void hdfeos5_freeclongary(long *);
+ extern void hdfeos5_freecfloatary(float *);
+-extern void hdfeos5_freecsint64ary(signed long long *);
+-extern void hdfeos5_freecunsint64ary(unsigned long long *);
++extern void hdfeos5_freecsint64ary(hsize_t *);
++extern void hdfeos5_freecunsint64ary(hsize_t *);
+ 
+ VALUE hdfeos5_zawrite_char(VALUE, VALUE, VALUE, VALUE, VALUE);
+ VALUE hdfeos5_zawrite_short(VALUE, VALUE, VALUE, VALUE, VALUE);
 @@ -244,31 +230,31 @@ he5za_mark_obj(struct HE5Za *he5za)
      rb_gc_mark(ptr);
  }
@@ -2772,7 +2476,7 @@ index 98ba52c..558782b 100644
      hid_t i_zaid;
      char *i_dimname;
 -    unsigned long long i_dim;
-+    unsigned long i_dim;
++    hsize_t i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
      struct HE5Za *he5za;
@@ -2781,7 +2485,7 @@ index 98ba52c..558782b 100644
      hid_t i_zaid;
      char *i_dimname;
 -    unsigned long long o_ndim;
-+    unsigned long o_ndim;
++    hsize_t o_ndim;
      VALUE ndim;
      struct HE5Za *he5za;
  
@@ -2790,96 +2494,43 @@ index 98ba52c..558782b 100644
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      char str[maxcharsize];
      herr_t o_rtn_val;
-@@ -448,7 +434,7 @@ hdfeos5_zainfo(VALUE mod)
-     o_rtn_val = HE5_ZAinfo(i_zaid, i_fldname, &i_rank, hs_dims, &i_ntype, o_dimlist, NULL);
-     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     rank = INT2NUM(i_rank);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_rank, 1, &i_rank);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_rank, 1, &i_rank);
-     change_chartype(i_ntype, str);
-     ntype =rb_str_new2(str);
-     dimlist = rb_str_new2(o_dimlist);
 @@ -461,7 +447,7 @@ hdfeos5_zadefchunk(VALUE mod, VALUE rank, VALUE dim)
  {
      hid_t i_zaid;
      int i_rank;
 -    unsigned long long *i_dim;
-+    unsigned long *i_dim;
++    hsize_t *i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -474,11 +460,11 @@ hdfeos5_zadefchunk(VALUE mod, VALUE rank, VALUE dim)
-     if ((TYPE(dim) == T_BIGNUM) || (TYPE(dim) == T_FIXNUM)) {
-       dim = rb_Array(dim);
-     }
--    i_dim = hdfeos5_obj2cunsint64ary(dim);
-+    i_dim = hdfeos5_obj2clongary(dim);
- 
-     o_rtn_val = HE5_ZAdefchunk(i_zaid, i_rank, i_dim);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_dim);
-+    hdfeos5_freeclongary(i_dim);
-     return(rtn_val);
- }
- 
 @@ -516,7 +502,7 @@ hdfeos5_zadefcomchunk(VALUE mod, VALUE compcode, VALUE compparm, VALUE rank, VAL
      int i_compcode;
      int *i_compparm;
      int i_rank;
 -    unsigned long long *i_dim;
-+    unsigned long *i_dim;
++    hsize_t *i_dim;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -537,12 +523,12 @@ hdfeos5_zadefcomchunk(VALUE mod, VALUE compcode, VALUE compparm, VALUE rank, VAL
-     if ((TYPE(dim) == T_BIGNUM) || (TYPE(dim) == T_FIXNUM)) {
-       dim = rb_Array(dim);
-     }
--    i_dim = hdfeos5_obj2cunsint64ary(dim);
-+    i_dim = hdfeos5_obj2clongary(dim);
- 
-     o_rtn_val = HE5_ZAdefcomchunk(i_zaid, i_compcode, i_compparm, i_rank, i_dim);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
-     hdfeos5_freecintary(i_compparm);
--    hdfeos5_freecunsint64ary(i_dim);
-+    hdfeos5_freeclongary(i_dim);
-     return(rtn_val);
- }
- 
 @@ -619,7 +605,7 @@ hdfeos5_zawriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -637,12 +623,12 @@ hdfeos5_zawriteattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count, VA
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_ZAwriteattr(i_zaid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
 @@ -654,7 +640,7 @@ hdfeos5_za_get_att(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Za *he5za;
@@ -2888,115 +2539,70 @@ index 98ba52c..558782b 100644
      long i_strbufsize;
      char *o_dimnames;
 -    unsigned long long *hs_dims;
-+    unsigned long *hs_dims;
++    hsize_t *hs_dims;
      long o_ndims;
      VALUE ndims;
      VALUE dimnames;
-@@ -721,14 +707,14 @@ hdfeos5_zainqdims(VALUE mod, VALUE entrycode)
+@@ -721,7 +707,7 @@ hdfeos5_zainqdims(VALUE mod, VALUE entrycode)
      i_count = zanentries_count(i_zaid, entrycode);
      i_strbufsize = zanentries_strbuf(i_zaid, entrycode);
  
 -    hs_dims = ALLOCA_N(unsigned long long,  i_count);
-+    hs_dims = ALLOCA_N(unsigned long,  i_count);
++    hs_dims = ALLOCA_N(hsize_t,  i_count);
      o_dimnames = ALLOCA_N(char, (i_strbufsize + 1));
  
      o_ndims = HE5_ZAinqdims(i_zaid, o_dimnames, hs_dims);
-     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     ndims = LONG2NUM(o_ndims);
-     dimnames = rb_str_new(o_dimnames,i_strbufsize);
--    dims = hdfeos5_cunsint64ary2obj(hs_dims, i_count, 1, &i_count);
-+    dims = hdfeos5_clongary2obj(hs_dims, i_count, 1, &i_count);
- 
-     return rb_ary_new3(3, ndims, dimnames, dims);
- }
-@@ -769,7 +755,7 @@ hdfeos5_zainquire(VALUE mod, VALUE entrycode)
- 
-     i_count = (int)o_nflds;
-     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
--    ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
-+    ntype = hdfeos5_clongary2obj(o_ntype, i_count, 1, &i_count);
- 
-     return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
- }
 @@ -821,7 +807,7 @@ hdfeos5_zachunkinfo(VALUE mod, VALUE fldname)
      hid_t i_zaid;
      char *i_fldname;
      int o_chunk_rank;
 -    unsigned long long *o_chunk_dim;
-+    unsigned long *o_chunk_dim;
++    hsize_t *o_chunk_dim;
      herr_t o_rtn_val;
      VALUE chunk_rank;
      VALUE chunk_dims;
-@@ -835,12 +821,12 @@ hdfeos5_zachunkinfo(VALUE mod, VALUE fldname)
+@@ -835,7 +821,7 @@ hdfeos5_zachunkinfo(VALUE mod, VALUE fldname)
  
      o_rtn_val = HE5_ZAchunkinfo(i_zaid, i_fldname, &o_chunk_rank, NULL);
      if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
 -    o_chunk_dim = ALLOCA_N(unsigned long long, (o_chunk_rank + 1));
-+    o_chunk_dim = ALLOCA_N(unsigned long, (o_chunk_rank + 1));
++    o_chunk_dim = ALLOCA_N(hsize_t, (o_chunk_rank + 1));
  
      o_rtn_val = HE5_ZAchunkinfo(i_zaid, i_fldname, &o_chunk_rank, o_chunk_dim);
      if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
-     chunk_rank = INT2NUM(o_chunk_rank);
--    chunk_dims = hdfeos5_cunsint64ary2obj(o_chunk_dim, o_chunk_rank, 1, &o_chunk_rank);
-+    chunk_dims = hdfeos5_clongary2obj(o_chunk_dim, o_chunk_rank, 1, &o_chunk_rank);
- 
-     return rb_ary_new3(2, chunk_rank, chunk_dims);
- }
 @@ -1008,7 +994,7 @@ hdfeos5_zafldsrch(VALUE mod)
      char *i_fieldname;
      hid_t o_fieldid;
      int o_rank;
 -    unsigned long long *o_dims;
-+    unsigned long *o_dims;
++    hsize_t *o_dims;
      hid_t o_typeid;
      int o_fldgroup;
      VALUE fldgroup;
-@@ -1025,13 +1011,13 @@ hdfeos5_zafldsrch(VALUE mod)
+@@ -1025,7 +1011,7 @@ hdfeos5_zafldsrch(VALUE mod)
      o_fldgroup = HE5_ZAfldsrch(i_zaid, i_fieldname, &o_fieldid, &o_rank, NULL, &o_typeid);
      if(o_fldgroup == -1) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
  
 -    o_dims = ALLOCA_N(unsigned long long, (o_rank + 1));
-+    o_dims = ALLOCA_N(unsigned long, (o_rank + 1));
++    o_dims = ALLOCA_N(hsize_t, (o_rank + 1));
      o_fldgroup = HE5_ZAfldsrch(i_zaid, i_fieldname, &o_fieldid, &o_rank, o_dims, &o_typeid);
      if(o_fldgroup == -1) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
      fldgroup = INT2NUM(o_fldgroup);
-     fieldid = INT2NUM(o_fieldid);
-     rank    = INT2NUM(o_rank);
--    dims    = hdfeos5_cunsint64ary2obj(o_dims, o_rank, 1, &o_rank);
-+    dims    = hdfeos5_clongary2obj(o_dims, o_rank, 1, &o_rank);
-     type_id = INT2NUM(o_typeid);
- 
-     return rb_ary_new3(5, fldgroup, fieldid, rank, dims, type_id);
 @@ -1123,7 +1109,7 @@ hdfeos5_zawritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
      char *i_attrname;
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1141,12 +1127,12 @@ hdfeos5_zawritegrpattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
-     o_rtn_val = HE5_ZAwritegrpattr(i_zaid, i_attrname, i_numbertype, i_count, i_datbuf);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_count);
-+    hdfeos5_freeclongary(i_count);
-     return(rtn_val);
- }
- 
 @@ -1158,7 +1144,7 @@ hdfeos5_za_get_grpatt(VALUE mod, VALUE attrname)
      char *i_attrname;
      hid_t o_ntype;
      void *o_datbuf;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
      herr_t o_rtn_val;
  
      struct HE5Za *he5za;
@@ -3005,25 +2611,16 @@ index 98ba52c..558782b 100644
      hid_t i_numbertype;
      hid_t i_numbertypechk;
 -    unsigned long long *i_count;
-+    unsigned long *i_count;
++    hsize_t *i_count;
      void *i_datbuf;
      herr_t o_rtn_val;
      VALUE rtn_val;
-@@ -1231,7 +1217,7 @@ hdfeos5_zawritelocattr(VALUE mod, VALUE attrname, VALUE numbertype, VALUE count,
-     i_attrname = RSTRING_PTR(attrname);
-     i_numbertype    = change_numbertype(RSTRING_PTR(numbertype));
-     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
--    i_count = hdfeos5_obj2cunsint64ary(count);
-+    i_count = hdfeos5_obj2clongary(count);
-     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
- 
-     HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
 @@ -1251,7 +1237,7 @@ hdfeos5_zafield_get_att(VALUE mod,VALUE  attrname)
      void *o_datbuf;
      herr_t o_rtn_val;
      hid_t  o_ntype;
 -    unsigned long long o_count;
-+    unsigned long o_count;
++    hsize_t o_count;
  
      struct HE5ZaField *he5field;
      Data_Get_Struct(mod, struct HE5ZaField, he5field);
@@ -3032,48 +2629,19 @@ index 98ba52c..558782b 100644
      char  *i_filelist;
      off_t *i_offset;
 -    unsigned long long *i_size;
-+    unsigned long *i_size;
++    hsize_t *i_size;
      herr_t o_rtn_val;
      VALUE rtn_val;
  
-@@ -1563,13 +1549,13 @@ hdfeos5_zasetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
-       size = rb_Array(size);
-     }
-     i_filelist = RSTRING_PTR(filelist);
--    i_offset = hdfeos5_obj2cunsint64ary(offset);
--    i_size = hdfeos5_obj2cunsint64ary(size);
-+    i_offset = hdfeos5_obj2clongary(offset);
-+    i_size = hdfeos5_obj2clongary(size);
- 
-     o_rtn_val = HE5_ZAsetextdata(i_zaid, i_filelist, i_offset, i_size);
-     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
--    hdfeos5_freecunsint64ary(i_offset);
--    hdfeos5_freecunsint64ary(i_size);
-+    hdfeos5_freeclongary(i_offset);
-+    hdfeos5_freeclongary(i_size);
-     return rtn_val;
- }
- 
 @@ -1581,7 +1567,7 @@ hdfeos5_zagetextdata(VALUE mod, VALUE fieldname)
      size_t o_namelength=0;
      char  o_filelist[maxcharsize];
      off_t o_offset[maxcharsize];
 -    unsigned long long o_size[maxcharsize];
-+    unsigned long o_size[maxcharsize];
++    hsize_t o_size[maxcharsize];
      int o_rtn_val;
      VALUE rtn_val;
      VALUE namelength;
-@@ -1603,8 +1589,8 @@ hdfeos5_zagetextdata(VALUE mod, VALUE fieldname)
- 
-     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
-     filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
--    offset = hdfeos5_cunsint64ary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
--    size = hdfeos5_cunsint64ary2obj(o_size,o_rtn_val,1,&o_rtn_val);
-+    offset = hdfeos5_clongary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
-+    size = hdfeos5_clongary2obj(o_size,o_rtn_val,1,&o_rtn_val);
- 
-     return rb_ary_new3(5,rtn_val, namelength, filelist, offset, size);
- }
 @@ -1764,13 +1750,13 @@ hdfeos5_zawrite_char(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
  {
      hid_t i_zaid;
@@ -3081,14 +2649,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3097,7 +2665,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3106,7 +2674,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3115,7 +2683,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Cbyte_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3126,14 +2694,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3142,7 +2710,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3151,7 +2719,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3160,7 +2728,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Cshort_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3171,14 +2739,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3187,7 +2755,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3196,7 +2764,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3205,7 +2773,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Cint_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3216,14 +2784,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3232,7 +2800,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3241,7 +2809,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3250,7 +2818,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Clong_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3261,14 +2829,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3277,7 +2845,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3286,7 +2854,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3295,7 +2863,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Cfloat_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3306,14 +2874,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[maxcharsize];
-+    unsigned long hs_dims[maxcharsize];
++    hsize_t hs_dims[maxcharsize];
      char o_dimlist[maxcharsize];
      int  len,i;
      int  c_count_all=1;
@@ -3322,7 +2890,7 @@ index 98ba52c..558782b 100644
        rb_raise(rb_eHE5Error, "Length of 'start' is too short [%s:%d]",__FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i]);
        if(l_start < 0) {
@@ -3331,7 +2899,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3340,7 +2908,7 @@ index 98ba52c..558782b 100644
  
      Array_to_Cdouble_len_shape(data,i_data,len,shape);
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3351,14 +2919,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3367,7 +2935,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3376,7 +2944,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3385,7 +2953,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3405,14 +2973,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3421,7 +2989,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3430,7 +2998,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3439,7 +3007,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3459,14 +3027,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3475,7 +3043,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3484,7 +3052,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3493,7 +3061,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3513,14 +3081,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3529,7 +3097,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3538,7 +3106,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3547,7 +3115,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3567,14 +3135,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3583,7 +3151,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3592,7 +3160,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3601,7 +3169,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3621,14 +3189,14 @@ index 98ba52c..558782b 100644
 -    signed long long *c_start;
 -    unsigned long long *c_stride;
 -    unsigned long long *c_count;
-+    signed long *c_start;
-+    unsigned long *c_stride;
-+    unsigned long *c_count;
++    hsize_t *c_start;
++    hsize_t *c_stride;
++    hsize_t *c_count;
  
      int i_rank;
      hid_t i_ntype = FAIL;
 -    unsigned long long hs_dims[10];
-+    unsigned long hs_dims[10];
++    hsize_t hs_dims[10];
      int  i;
      long l_start, l_count;
      int  *shape;    /* NArray uses int instead of size_t */
@@ -3637,7 +3205,7 @@ index 98ba52c..558782b 100644
  	       __FILE__,__LINE__);
      }
 -    c_start=ALLOCA_N(signed long long,i_rank);
-+    c_start=ALLOCA_N(signed long,i_rank);
++    c_start=ALLOCA_N(hsize_t,i_rank);
      for(i=0; i<i_rank; i++){
        l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
        if(l_start < 0) {
@@ -3646,7 +3214,7 @@ index 98ba52c..558782b 100644
        c_start[i]=l_start;
      }
 -    c_stride=ALLOCA_N(unsigned long long,i_rank);
-+    c_stride=ALLOCA_N(unsigned long,i_rank);
++    c_stride=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(stride)){
      case T_NIL:
        for(i=0; i<i_rank; i++){
@@ -3655,7 +3223,7 @@ index 98ba52c..558782b 100644
        }
      }
 -    c_count=ALLOCA_N(unsigned long long,i_rank);
-+    c_count=ALLOCA_N(unsigned long,i_rank);
++    c_count=ALLOCA_N(hsize_t,i_rank);
      switch(TYPE(count)){
      case T_NIL:
        for(i=0; i<i_rank; i++){


=====================================
debian/patches/series
=====================================
@@ -7,4 +7,4 @@
 0007-Drop-obsolete-rb_secure-rb_safe_level.patch
 0008-Change-Encoding-Shift_JIS-to-UTF-8.patch
 gcc-14.patch
-0010-Fix-gcc-14-incompatible-pointer-issue-drop-long-long.patch
+0010-Fix-use-hsize_t.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/3507ebebc3f3fb1ba302b02db10e3ce835552978...ed6b17d1266af105407c7378c74aef0d63ebd3de

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/3507ebebc3f3fb1ba302b02db10e3ce835552978...ed6b17d1266af105407c7378c74aef0d63ebd3de
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20241227/53e0d786/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list