[Git][debian-gis-team/ruby-hdfeos5][master] 2 commits: Refresh patches, fix FTBFS gcc-14 (Closes: #1075463)
Youhei SASAKI (@uwabami)
gitlab at salsa.debian.org
Fri Dec 27 07:31:33 GMT 2024
Youhei SASAKI pushed to branch master at Debian GIS Project / ruby-hdfeos5
Commits:
45dd5979 by Youhei SASAKI at 2024-12-27T16:30:10+09:00
Refresh patches, fix FTBFS gcc-14 (Closes: #1075463)
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
- - - - -
dc8766e7 by Youhei SASAKI at 2024-12-27T16:30:35+09:00
Update d/changelog
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
- - - - -
12 changed files:
- debian/changelog
- debian/patches/0001-Fix-NArray-Library-Path.patch
- debian/patches/0002-Fix-test-data-path.patch
- debian/patches/0003-Fix-printf-debugging.patch
- debian/patches/0004-hdf5-dir.patch
- debian/patches/0005-length-typo.patch
- debian/patches/0006-hid_t.patch
- debian/patches/0007-Drop-obsolete-rb_secure-rb_safe_level.patch
- debian/patches/0008-Change-Encoding-Shift_JIS-to-UTF-8.patch
- + debian/patches/0010-Fix-gcc-14-incompatible-pointer-issue-drop-long-long.patch
- debian/patches/gcc-14.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,9 +1,13 @@
-ruby-hdfeos5 (1.2-13) UNRELEASED; urgency=medium
+ruby-hdfeos5 (1.2-13) unstable; urgency=medium
+ [ Bas Couwenberg ]
* Team upload.
* Bump Standards-Version to 4.7.0, no changes.
- -- Bas Couwenberg <sebastic at debian.org> Sun, 28 Jul 2024 20:02:06 +0200
+ [ Youhei SASAKI ]
+ * Refresh patches, Add patch: fix FTBFS gcc-14 (Closes: #1075463)
+
+ -- Youhei SASAKI <uwabami at gfd-dennou.org> Fri, 27 Dec 2024 16:30:15 +0900
ruby-hdfeos5 (1.2-12) unstable; urgency=medium
=====================================
debian/patches/0001-Fix-NArray-Library-Path.patch
=====================================
@@ -1,6 +1,7 @@
From: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Date: Fri, 5 Jul 2013 01:23:50 +0900
Subject: Fix NArray Library Path
+
Forwarded: yes
In Debian, NArray was installed $vendorarchdir.
=====================================
debian/patches/0002-Fix-test-data-path.patch
=====================================
@@ -1,6 +1,7 @@
From: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Date: Fri, 5 Jul 2013 01:23:51 +0900
Subject: Fix test data path
+
Forwarded: yes
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
=====================================
debian/patches/0003-Fix-printf-debugging.patch
=====================================
@@ -1,6 +1,7 @@
From: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Fri, 5 Jul 2013 01:30:20 +0900
Subject: Fix printf debugging
+
Forwarded: yes
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
=====================================
debian/patches/0004-hdf5-dir.patch
=====================================
@@ -1,8 +1,8 @@
From: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
Date: Fri, 4 Sep 2015 14:56:31 +0900
Subject: hdf5-dir
-Forwarded: yes
+Forwarded: yes
---
extconf.rb | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
=====================================
debian/patches/0005-length-typo.patch
=====================================
@@ -1,8 +1,8 @@
From: Bas Couwenberg <sebastic at debian.org>
Date: Wed, 20 Oct 2021 13:09:41 +0900
Subject: Fix 'lengh' typo, replace with 'length'.
-Forwarded: yes
+Forwarded: yes
---
hdfeos5gd_wrap.c | 12 ++++++------
hdfeos5sw_wrap.c | 12 ++++++------
=====================================
debian/patches/0006-hid_t.patch
=====================================
@@ -1,6 +1,7 @@
From: Gilles Filippini <pini at debian.org>
Date: Wed, 20 Oct 2021 13:09:41 +0900
Subject: Add support for HDF5 1.10.
+
Forwarded: yes
Bug-Debian: https://bugs.debian.org/846353
=====================================
debian/patches/0007-Drop-obsolete-rb_secure-rb_safe_level.patch
=====================================
@@ -1,6 +1,7 @@
From: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Wed, 20 Oct 2021 13:17:11 +0900
Subject: Drop obsolete rb_secure, rb_safe_level
+
Forwarded: yes
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
=====================================
debian/patches/0008-Change-Encoding-Shift_JIS-to-UTF-8.patch
=====================================
@@ -1,6 +1,7 @@
From: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Tue, 2 Nov 2021 15:41:14 +0900
Subject: Change Encoding: Shift_JIS to UTF-8
+
Forwarded: yes
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
=====================================
debian/patches/0010-Fix-gcc-14-incompatible-pointer-issue-drop-long-long.patch
=====================================
@@ -0,0 +1,3670 @@
+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'
+
+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(-)
+
+diff --git a/hdfeos5_chkdatatype.c b/hdfeos5_chkdatatype.c
+index f99b4ee..67a212e 100644
+--- a/hdfeos5_chkdatatype.c
++++ b/hdfeos5_chkdatatype.c
+@@ -18,6 +18,7 @@ static VALUE rb_eHE5Error;
+ void
+ HE5Wrap_make_NArray1D_or_str(int ntype, size_t count, VALUE *obj, void **ptr){
+
++ int i_count = (int) count;
+ 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){
+
+ case HE5T_NATIVE_INT8:
+ case HE5T_NATIVE_UINT8:
+- *obj = na_make_object(NA_BYTE, 1, &count, cNArray);
++ *obj = na_make_object(NA_BYTE, 1, &i_count, cNArray);
+ break;
+
+ case HE5T_NATIVE_SHORT:
+ case HE5T_NATIVE_USHORT:
+ case HE5T_NATIVE_INT16:
+ case HE5T_NATIVE_UINT16:
+- *obj = na_make_object(NA_SINT, 1, &count, cNArray);
++ *obj = na_make_object(NA_SINT, 1, &i_count, cNArray);
+ break;
+
+ case HE5T_NATIVE_INT:
+@@ -45,15 +46,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:
+- *obj = na_make_object(NA_LINT, 1, &count, cNArray);
++ *obj = na_make_object(NA_LINT, 1, &i_count, cNArray);
+ break;
+
+ case HE5T_NATIVE_FLOAT:
+- *obj = na_make_object(NA_SFLOAT, 1, &count, cNArray);
++ *obj = na_make_object(NA_SFLOAT, 1, &i_count, cNArray);
+ break;
+
+ case HE5T_NATIVE_DOUBLE:
+- *obj = na_make_object(NA_DFLOAT, 1, &count, cNArray);
++ *obj = na_make_object(NA_DFLOAT, 1, &i_count, cNArray);
+ 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){
+ }
+ }
+
+-int
++int
+ check_numbertype(char *numbertype)
+ {
+ if(strcmp(numbertype,"byte")==0) return(HE5T_NATIVE_CHAR);
+@@ -156,7 +157,7 @@ check_numbertype(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-hid_t
++hid_t
+ change_numbertype(char *numbertype)
+ {
+ if(strcmp(numbertype,"byte")==0) return(H5T_NATIVE_CHAR);
+@@ -172,7 +173,7 @@ change_numbertype(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ change_mergeflag(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_HDFE_NOMERGE")==0) return(HE5_HDFE_NOMERGE);
+@@ -182,7 +183,7 @@ change_mergeflag(char *numbertype)
+ }
+
+
+-int
++int
+ change_entrycode(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_HDFE_NENTDIM")==0) return(HE5_HDFE_NENTDIM);
+@@ -194,7 +195,7 @@ change_entrycode(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ 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)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ change_subsetmode(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_HDFE_MIDPOINT")==0) return(HE5_HDFE_MIDPOINT);
+@@ -220,7 +221,7 @@ change_subsetmode(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ 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)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ change_pixelregistcode(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_HDFE_CENTER")==0) return(HE5_HDFE_CENTER);
+@@ -240,7 +241,7 @@ change_pixelregistcode(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ change_projcode(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_GCTP_GEO")==0) return(HE5_GCTP_GEO);
+@@ -281,7 +282,7 @@ change_projcode(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ change_tilingcode(char *numbertype)
+ {
+ if(strcmp(numbertype,"HE5_HDFE_NOTILE")==0) return(HE5_HDFE_NOTILE);
+@@ -290,7 +291,7 @@ change_tilingcode(char *numbertype)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ 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)
+ __FILE__,__LINE__);
+ }
+
+-int
++int
+ 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)
+ case 4:
+ case 5:
+ case 56:
+- case 57:
++ case 57:
+ strcpy(str,"char");break;
+ case 13:
+ case 14:
+@@ -371,7 +372,7 @@ change_gridorigintype(hid_t numbertype, char *str)
+ }
+ }
+
+-void
++void
+ change_pixelregisttype(hid_t numbertype, char *str)
+ {
+ switch (numbertype){
+@@ -422,7 +423,7 @@ change_projtype(hid_t numbertype, char *str)
+ }
+ }
+
+-void
++void
+ change_tilingtype(hid_t numbertype, char *str)
+ {
+ switch (numbertype){
+@@ -431,7 +432,7 @@ change_tilingtype(hid_t numbertype, char *str)
+ }
+ }
+
+-void
++void
+ change_comptype(hid_t numbertype, char *str)
+ {
+ switch (numbertype){
+diff --git a/hdfeos5gd_wrap.c b/hdfeos5gd_wrap.c
+index 15d714e..8a186ff 100644
+--- a/hdfeos5gd_wrap.c
++++ b/hdfeos5gd_wrap.c
+@@ -5,20 +5,6 @@
+ #include "narray.h"
+ #include<string.h>
+
+-/* for compatibility with ruby 1.6 */
+-#ifndef RARRAY_PTR
+-#define RARRAY_PTR(a) (RARRAY(a)->ptr)
+-#endif
+-#ifndef RARRAY_LEN
+-#define RARRAY_LEN(a) (RARRAY(a)->len)
+-#endif
+-#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 hid_t change_numbertype(char *);
+ extern int change_entrycode(char *);
+@@ -41,19 +27,14 @@ 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 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 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 *);
+
+ 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)
+ rb_gc_mark(ptr);
+ }
+
+-VALUE
+-HE5Gd_clone(VALUE grid)
+-{
+- VALUE clone;
+- struct HE5Gd *he5gd1, *he5gd2;
+-
+- Data_Get_Struct(grid, struct HE5Gd, he5gd1);
+- he5gd2 = HE5Gd_init(he5gd1->gdid, he5gd1->name, he5gd1->fid, he5gd1->file);
+- clone = Data_Wrap_Struct(cHE5Gd, he5gd_mark_obj, HE5Gd_free, he5gd2);
+- CLONESETUP(clone, grid);
+- return clone;
+-}
+-
+-VALUE
+-HE5GdField_clone(VALUE field)
+-{
+- VALUE clone;
+- struct HE5GdField *he5fld1, *he5fld2;
+-
+- Data_Get_Struct(field, struct HE5GdField, he5fld1);
+- he5fld2 = HE5GdField_init(he5fld1->name, he5fld1->gdid, he5fld1->grid);
+- clone = Data_Wrap_Struct(cHE5GdField, he5gdfield_mark_obj, HE5GdField_free, he5fld2);
+- CLONESETUP(clone, field);
+- return clone;
+-}
++/* VALUE */
++/* HE5Gd_clone(VALUE grid) */
++/* { */
++/* VALUE clone; */
++/* struct HE5Gd *he5gd1, *he5gd2; */
++
++/* Data_Get_Struct(grid, struct HE5Gd, he5gd1); */
++/* he5gd2 = HE5Gd_init(he5gd1->gdid, he5gd1->name, he5gd1->fid, he5gd1->file); */
++/* clone = Data_Wrap_Struct(cHE5Gd, he5gd_mark_obj, HE5Gd_free, he5gd2); */
++/* CLONESETUP(clone, grid); */
++/* return clone; */
++/* } */
++
++/* VALUE */
++/* HE5GdField_clone(VALUE field) */
++/* { */
++/* VALUE clone; */
++/* struct HE5GdField *he5fld1, *he5fld2; */
++
++/* Data_Get_Struct(field, struct HE5GdField, he5fld1); */
++/* he5fld2 = HE5GdField_init(he5fld1->name, he5fld1->gdid, he5fld1->grid); */
++/* clone = Data_Wrap_Struct(cHE5GdField, he5gdfield_mark_obj, HE5GdField_free, he5fld2); */
++/* CLONESETUP(clone, field); */
++/* return clone; */
++/* } */
+
+ long
+ gdnentries_count(hid_t i_gridid, VALUE entrycode)
+@@ -386,7 +367,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;
+ 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)
+ hid_t i_gridid;
+ char *i_code;
+ long *i_offset;
+- unsigned long long *i_count;
++ unsigned long *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)
+ hid_t i_gridid;
+ int i_tilecode;
+ int i_tilerank;
+- unsigned long long *i_tiledims;
++ unsigned long *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,
+ int i_compcode;
+ int *i_compparm;
+ int i_tilerank;
+- unsigned long long *i_tiledims;
++ unsigned long *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)
+ {
+ hid_t i_gridid;
+ char *i_dimname;
+- unsigned long long o_ndim;
++ unsigned long o_ndim;
+ VALUE ndim;
+ struct HE5Gd *he5grid;
+
+@@ -757,7 +738,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];
+ 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)
+ char *i_fldname;
+ int o_tilecode;
+ int o_tilerank;
+- unsigned long long o_tiledims[maxcharsize];
++ unsigned long 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
+ char *i_attrname;
+ hid_t i_numbertype;
+ hid_t i_numbertypechk;
+- unsigned long long *i_count;
++ unsigned long *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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Gd *he5grid;
+@@ -1208,7 +1189,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;
+ long o_ndims;
+ VALUE ndims;
+ VALUE dimnames;
+@@ -1221,14 +1202,14 @@ 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);
+ 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)
+ int o_rank=0;
+ long o_size=0;
+ int i_npt=2;
+- unsigned long long o_dims[maxcharsize];
++ unsigned long 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,
+ char *i_attrname;
+ hid_t i_numbertype;
+ hid_t i_numbertypechk;
+- unsigned long long *i_count;
++ unsigned long *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)
+ void *o_datbuf;
+ herr_t o_rtn_val;
+ hid_t o_ntype;
+- unsigned long long o_count;
++ unsigned long 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,
+ char *i_attrname;
+ hid_t i_numbertype;
+ hid_t i_numbertypechk;
+- unsigned long long *i_count;
++ unsigned long *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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Gd *he5grid;
+@@ -1842,7 +1823,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;
+ 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)
+ 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];
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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)
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2876,13 +2855,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2989,13 +2966,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3102,13 +3077,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3215,13 +3188,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3328,13 +3299,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+diff --git a/hdfeos5pt_wrap.c b/hdfeos5pt_wrap.c
+index e52e489..9d18857 100644
+--- a/hdfeos5pt_wrap.c
++++ b/hdfeos5pt_wrap.c
+@@ -26,19 +26,14 @@ 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 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 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 *);
+
+ 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)
+ return 0;
+ }
+
+-VALUE
+-HE5Pt_clone(VALUE point)
+-{
+- VALUE clone;
+- struct HE5Pt *he5pt1, *he5pt2;
+-
+- Data_Get_Struct(point, struct HE5Pt, he5pt1);
+- he5pt2 = HE5Pt_init(he5pt1->ptid, he5pt1->name, he5pt1->fid, he5pt1->file);
+- clone = Data_Wrap_Struct(cHE5Pt, he5pt_mark_obj, HE5Pt_free, he5pt2);
+- CLONESETUP(clone, point);
+- return clone;
+-}
+-
+-VALUE
+-HE5PtField_clone(VALUE level)
+-{
+- VALUE clone;
+- struct HE5PtField *he5fld1, *he5fld2;
+-
+- Data_Get_Struct(level, struct HE5PtField, he5fld1);
+- he5fld2 = HE5PtField_init(he5fld1->name, he5fld1->levelname, he5fld1->ptid, he5fld1->point);
+- clone = Data_Wrap_Struct(cHE5PtField, he5ptfield_mark_obj, HE5PtField_free, he5fld2);
+- CLONESETUP(clone, level);
+- return clone;
+-}
++/* VALUE */
++/* HE5Pt_clone(VALUE point) */
++/* { */
++/* VALUE clone; */
++/* struct HE5Pt *he5pt1, *he5pt2; */
++
++/* Data_Get_Struct(point, struct HE5Pt, he5pt1); */
++/* he5pt2 = HE5Pt_init(he5pt1->ptid, he5pt1->name, he5pt1->fid, he5pt1->file); */
++/* clone = Data_Wrap_Struct(cHE5Pt, he5pt_mark_obj, HE5Pt_free, he5pt2); */
++/* CLONESETUP(clone, point); */
++/* return clone; */
++/* } */
++
++/* VALUE */
++/* HE5PtField_clone(VALUE level) */
++/* { */
++/* VALUE clone; */
++/* struct HE5PtField *he5fld1, *he5fld2; */
++
++/* Data_Get_Struct(level, struct HE5PtField, he5fld1); */
++/* he5fld2 = HE5PtField_init(he5fld1->name, he5fld1->levelname, he5fld1->ptid, he5fld1->point); */
++/* clone = Data_Wrap_Struct(cHE5PtField, he5ptfield_mark_obj, HE5PtField_free, he5fld2); */
++/* CLONESETUP(clone, level); */
++/* return clone; */
++/* } */
+
+ VALUE
+ hdfeos5_ptcreate(VALUE mod, VALUE pointname)
+@@ -877,7 +872,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;
+ 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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Pt *he5point;
+@@ -1140,7 +1135,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;
+ 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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Pt *he5point;
+@@ -1229,7 +1224,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;
+ 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)
+ void *o_datbuf;
+ herr_t o_rtn_val;
+ hid_t o_ntype;
+- unsigned long long o_count;
++ unsigned long o_count;
+
+ struct HE5PtField *he5point;
+ Data_Get_Struct(mod, struct HE5PtField, he5point);
+@@ -1951,9 +1946,6 @@ hdfeos5_ptreadlevel_char(VALUE mod)
+ *(char *)&o_data_new[i] = *(char *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2059,9 +2051,6 @@ hdfeos5_ptreadlevel_short(VALUE mod)
+ *(short *)&o_data_new[i] = *(short *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2167,9 +2156,6 @@ hdfeos5_ptreadlevel_int(VALUE mod)
+ *(int *)&o_data_new[i] = *(int *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2275,9 +2261,6 @@ hdfeos5_ptreadlevel_long(VALUE mod)
+ *(long *)&o_data_new[i] = *(long *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2383,9 +2366,6 @@ hdfeos5_ptreadlevel_float(VALUE mod)
+ *(float *)&o_data_new[i] = *(float *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2491,10 +2471,6 @@ hdfeos5_ptreadlevel_double(VALUE mod)
+ *(double *)&o_data_new[i] = *(double *)&o_data[*(int *)&shape_child[i]];
+ }
+ }
+-// linkage check end
+-
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+diff --git a/hdfeos5sw_wrap.c b/hdfeos5sw_wrap.c
+index 42764b0..2888a1f 100644
+--- a/hdfeos5sw_wrap.c
++++ b/hdfeos5sw_wrap.c
+@@ -5,20 +5,6 @@
+ #include "narray.h"
+ #include<string.h>
+
+-/* for compatibility with ruby 1.6 */
+-#ifndef RARRAY_PTR
+-#define RARRAY_PTR(a) (RARRAY(a)->ptr)
+-#endif
+-#ifndef RARRAY_LEN
+-#define RARRAY_LEN(a) (RARRAY(a)->len)
+-#endif
+-#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 change_entrycode(char *);
+@@ -39,13 +25,10 @@ extern unsigned long long *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 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 *);
+
+ 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)
+ rb_gc_mark(ptr);
+ }
+
+-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)
+ {
+ hid_t i_swathid;
+ char *i_dimname;
+- unsigned long long i_dim;
++ unsigned long i_dim;
+ herr_t o_rtn_val;
+ VALUE rtn_val;
+ struct HE5Sw *he5swath;
+@@ -383,7 +340,7 @@ hdfeos5_swdiminfo(VALUE mod, VALUE dimname)
+ {
+ hid_t i_swathid;
+ char *i_dimname;
+- unsigned long long o_ndim;
++ unsigned long o_ndim;
+ VALUE ndim;
+ struct HE5Sw *he5swath;
+
+@@ -440,7 +397,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;
+ VALUE gsize;
+ VALUE index;
+ VALUE dimsize;
+@@ -502,7 +459,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];
+ 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)
+ hid_t i_swathid;
+ char *i_fldname;
+ int o_chunk_rank;
+- unsigned long long *o_chunk_dim;
++ unsigned long *o_chunk_dim;
+ herr_t o_rtn_val;
+ VALUE chunk_rank;
+ VALUE chunk_dims;
+@@ -547,12 +504,12 @@ 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_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
+ 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;
+ herr_t o_rtn_val;
+ VALUE rtn_val;
+
+@@ -626,7 +583,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;
+ 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
+ int i_compcode;
+ int *i_compparm;
+ int i_rank;
+- unsigned long long *i_dim;
++ unsigned long *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
+ char *i_attrname;
+ hid_t i_numbertype;
+ hid_t i_numbertypechk;
+- unsigned long long *i_count;
++ unsigned long *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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Sw *he5swath;
+@@ -944,7 +901,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;
+ long o_ndims;
+ VALUE ndims;
+ VALUE dimnames;
+@@ -957,14 +914,14 @@ 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);
+ 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)
+ {
+ hid_t i_swathid;
+ char *o_idxmaps;
+- unsigned long long *hs_idxsizes;
++ unsigned long *hs_idxsizes;
+ long o_nmap;
+ int i_count;
+ long i_strbufsize;
+@@ -1025,14 +982,14 @@ 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);
+ 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)
+ char *i_fieldname;
+ hid_t o_fieldid;
+ int o_rank;
+- unsigned long long *o_dims;
++ unsigned long *o_dims;
+ hid_t o_typeid;
+ int o_fldgroup;
+ VALUE fldgroup;
+@@ -1339,13 +1296,13 @@ 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_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)
+ float *i_cornerlat;
+ int i_mode;
+ char o_geodim[maxcharsize]="";
+- unsigned long long o_idxrange;
++ unsigned long o_idxrange;
+ hid_t o_rtn_val;
+ VALUE rtn_val;
+ VALUE geodim;
+@@ -1651,7 +1608,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];
+ 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)
+ char *i_fieldname;
+ hid_t o_ntype;
+ int o_rank=0;
+- unsigned long long o_dims[maxcharsize];
++ unsigned long 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,
+ char *i_attrname;
+ hid_t i_numbertype;
+ hid_t i_numbertypechk;
+- unsigned long long *i_count;
++ unsigned long *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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Sw *he5swath;
+@@ -1885,7 +1842,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;
+ 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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_datbuf;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Sw *he5swath;
+@@ -1976,7 +1933,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;
+ 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)
+ void *o_datbuf;
+ herr_t o_rtn_val;
+ hid_t o_ntype;
+- unsigned long long o_count;
++ unsigned long 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
+ {
+ 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;
+ 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
+ {
+ 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;
+ 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)
+ 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;
+ 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,
+ hid_t i_swathid;
+ char *i_attrname;
+ hid_t i_numbertype;
+- unsigned long long *i_count;
++ unsigned long *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)
+ char *i_attrname;
+ hid_t o_ntype;
+ void *o_buffer;
+- unsigned long long o_count;
++ unsigned long o_count;
+ herr_t o_rtn_val;
+
+ struct HE5Sw *he5swath;
+@@ -2596,7 +2553,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;
+ 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)
+ 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];
+ 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)
+ char *i_object;
+ int o_rank;
+ char o_dimlist[maxcharsize]="";
+- unsigned long long *o_indices;
++ unsigned long *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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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
+ 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);
+ 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
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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
+ }
+
+ 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);
+ 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)
+ {
+ 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3525,13 +3480,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3638,13 +3591,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3751,13 +3702,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3864,13 +3813,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -3977,13 +3924,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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long 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)
+ 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);
+ 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)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,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)
+ }
+ }
+ }
+- c_edge=ALLOCA_N(unsigned long long,i_rank);
++ c_edge=ALLOCA_N(unsigned long,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)
+ 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__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+diff --git a/hdfeos5za_wrap.c b/hdfeos5za_wrap.c
+index 98ba52c..558782b 100644
+--- a/hdfeos5za_wrap.c
++++ b/hdfeos5za_wrap.c
+@@ -5,20 +5,6 @@
+ #include "narray.h"
+ #include<string.h>
+
+-/* for compatibility with ruby 1.6 */
+-#ifndef RARRAY_PTR
+-#define RARRAY_PTR(a) (RARRAY(a)->ptr)
+-#endif
+-#ifndef RARRAY_LEN
+-#define RARRAY_LEN(a) (RARRAY(a)->len)
+-#endif
+-#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 change_entrycode(char *);
+@@ -244,31 +230,31 @@ he5za_mark_obj(struct HE5Za *he5za)
+ rb_gc_mark(ptr);
+ }
+
+-VALUE
+-HE5Za_clone(VALUE za)
+-{
+- VALUE clone;
+- struct HE5Za *he5za1, *he5za2;
+-
+- Data_Get_Struct(za, struct HE5Za, he5za1);
+- he5za2 = HE5Za_init(he5za1->zaid, he5za1->name, he5za1->fid, he5za1->file);
+- clone = Data_Wrap_Struct(cHE5Za, he5za_mark_obj, HE5Za_free, he5za2);
+- CLONESETUP(clone, za);
+- return clone;
+-}
+-
+-VALUE
+-HE5ZaField_clone(VALUE field)
+-{
+- VALUE clone;
+- struct HE5ZaField *he5fld1, *he5fld2;
+-
+- Data_Get_Struct(field, struct HE5ZaField, he5fld1);
+- he5fld2 = HE5ZaField_init(he5fld1->name, he5fld1->zaid, he5fld1->za);
+- clone = Data_Wrap_Struct(cHE5ZaField, he5zafield_mark_obj, HE5ZaField_free, he5fld2);
+- CLONESETUP(clone, field);
+- return clone;
+-}
++/* VALUE */
++/* HE5Za_clone(VALUE za) */
++/* { */
++/* VALUE clone; */
++/* struct HE5Za *he5za1, *he5za2; */
++
++/* Data_Get_Struct(za, struct HE5Za, he5za1); */
++/* he5za2 = HE5Za_init(he5za1->zaid, he5za1->name, he5za1->fid, he5za1->file); */
++/* clone = Data_Wrap_Struct(cHE5Za, he5za_mark_obj, HE5Za_free, he5za2); */
++/* CLONESETUP(clone, za); */
++/* return clone; */
++/* } */
++
++/* VALUE */
++/* HE5ZaField_clone(VALUE field) */
++/* { */
++/* VALUE clone; */
++/* struct HE5ZaField *he5fld1, *he5fld2; */
++
++/* Data_Get_Struct(field, struct HE5ZaField, he5fld1); */
++/* he5fld2 = HE5ZaField_init(he5fld1->name, he5fld1->zaid, he5fld1->za); */
++/* clone = Data_Wrap_Struct(cHE5ZaField, he5zafield_mark_obj, HE5ZaField_free, he5fld2); */
++/* CLONESETUP(clone, field); */
++/* return clone; */
++/* } */
+
+ long
+ zanentries_count(hid_t i_zaid, VALUE entrycode)
+@@ -359,7 +345,7 @@ hdfeos5_zadefdim(VALUE mod, VALUE dimname, VALUE dim)
+ {
+ hid_t i_zaid;
+ char *i_dimname;
+- unsigned long long i_dim;
++ unsigned long i_dim;
+ herr_t o_rtn_val;
+ VALUE rtn_val;
+ struct HE5Za *he5za;
+@@ -381,7 +367,7 @@ hdfeos5_zadiminfo(VALUE mod, VALUE dimname)
+ {
+ hid_t i_zaid;
+ char *i_dimname;
+- unsigned long long o_ndim;
++ unsigned long o_ndim;
+ VALUE ndim;
+ struct HE5Za *he5za;
+
+@@ -431,7 +417,7 @@ hdfeos5_zainfo(VALUE mod)
+ char *i_fldname;
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long 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;
+ 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;
+ 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;
+ 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;
+ herr_t o_rtn_val;
+
+ struct HE5Za *he5za;
+@@ -708,7 +694,7 @@ hdfeos5_zainqdims(VALUE mod, VALUE entrycode)
+ int i_count;
+ long i_strbufsize;
+ char *o_dimnames;
+- unsigned long long *hs_dims;
++ unsigned long *hs_dims;
+ long o_ndims;
+ VALUE ndims;
+ VALUE dimnames;
+@@ -721,14 +707,14 @@ 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);
+ 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;
+ herr_t o_rtn_val;
+ VALUE chunk_rank;
+ VALUE chunk_dims;
+@@ -835,12 +821,12 @@ 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_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;
+ hid_t o_typeid;
+ int o_fldgroup;
+ VALUE fldgroup;
+@@ -1025,13 +1011,13 @@ 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_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;
+ 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;
+ herr_t o_rtn_val;
+
+ struct HE5Za *he5za;
+@@ -1212,7 +1198,7 @@ hdfeos5_zawritelocattr(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;
+ 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;
+
+ struct HE5ZaField *he5field;
+ Data_Get_Struct(mod, struct HE5ZaField, he5field);
+@@ -1546,7 +1532,7 @@ hdfeos5_zasetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
+ hid_t i_zaid;
+ char *i_filelist;
+ off_t *i_offset;
+- unsigned long long *i_size;
++ unsigned long *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];
+ 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;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -1790,7 +1776,7 @@ hdfeos5_zawrite_char(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -1798,7 +1784,7 @@ hdfeos5_zawrite_char(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -1819,7 +1805,7 @@ hdfeos5_zawrite_char(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -1859,13 +1845,13 @@ hdfeos5_zawrite_short(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -1885,7 +1871,7 @@ hdfeos5_zawrite_short(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -1893,7 +1879,7 @@ hdfeos5_zawrite_short(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -1914,7 +1900,7 @@ hdfeos5_zawrite_short(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -1954,13 +1940,13 @@ hdfeos5_zawrite_int(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE dat
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -1980,7 +1966,7 @@ hdfeos5_zawrite_int(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE dat
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -1988,7 +1974,7 @@ hdfeos5_zawrite_int(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE dat
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2009,7 +1995,7 @@ hdfeos5_zawrite_int(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE dat
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2049,13 +2035,13 @@ hdfeos5_zawrite_long(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -2075,7 +2061,7 @@ hdfeos5_zawrite_long(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -2083,7 +2069,7 @@ hdfeos5_zawrite_long(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2104,7 +2090,7 @@ hdfeos5_zawrite_long(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2144,13 +2130,13 @@ hdfeos5_zawrite_float(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -2170,7 +2156,7 @@ hdfeos5_zawrite_float(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -2178,7 +2164,7 @@ hdfeos5_zawrite_float(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2199,7 +2185,7 @@ hdfeos5_zawrite_float(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2239,13 +2225,13 @@ hdfeos5_zawrite_double(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[maxcharsize];
++ unsigned long hs_dims[maxcharsize];
+ char o_dimlist[maxcharsize];
+ int len,i;
+ int c_count_all=1;
+@@ -2265,7 +2251,7 @@ hdfeos5_zawrite_double(VALUE mod, VALUE start, VALUE stride, VALUE count, 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i]);
+ if(l_start < 0) {
+@@ -2273,7 +2259,7 @@ hdfeos5_zawrite_double(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2294,7 +2280,7 @@ hdfeos5_zawrite_double(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE
+ }
+
+ 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);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2334,13 +2320,13 @@ hdfeos5_zaread_char(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2360,7 +2346,7 @@ hdfeos5_zaread_char(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2368,7 +2354,7 @@ hdfeos5_zaread_char(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2398,7 +2384,7 @@ hdfeos5_zaread_char(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2437,8 +2423,6 @@ hdfeos5_zaread_char(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2447,13 +2431,13 @@ hdfeos5_zaread_short(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2473,7 +2457,7 @@ hdfeos5_zaread_short(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2481,7 +2465,7 @@ hdfeos5_zaread_short(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2511,7 +2495,7 @@ hdfeos5_zaread_short(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2550,8 +2534,6 @@ hdfeos5_zaread_short(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2560,13 +2542,13 @@ hdfeos5_zaread_int(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2586,7 +2568,7 @@ hdfeos5_zaread_int(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2594,7 +2576,7 @@ hdfeos5_zaread_int(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2624,7 +2606,7 @@ hdfeos5_zaread_int(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2663,8 +2645,6 @@ hdfeos5_zaread_int(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2673,13 +2653,13 @@ hdfeos5_zaread_long(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2699,7 +2679,7 @@ hdfeos5_zaread_long(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2707,7 +2687,7 @@ hdfeos5_zaread_long(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2737,7 +2717,7 @@ hdfeos5_zaread_long(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2776,8 +2756,6 @@ hdfeos5_zaread_long(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2786,13 +2764,13 @@ hdfeos5_zaread_float(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2812,7 +2790,7 @@ hdfeos5_zaread_float(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2820,7 +2798,7 @@ hdfeos5_zaread_float(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2850,7 +2828,7 @@ hdfeos5_zaread_float(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2889,8 +2867,6 @@ hdfeos5_zaread_float(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
+@@ -2899,13 +2875,13 @@ hdfeos5_zaread_double(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ {
+ hid_t i_zaid;
+ char *i_fldname;
+- 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;
+
+ int i_rank;
+ hid_t i_ntype = FAIL;
+- unsigned long long hs_dims[10];
++ unsigned long hs_dims[10];
+ int i;
+ long l_start, l_count;
+ int *shape; /* NArray uses int instead of size_t */
+@@ -2925,7 +2901,7 @@ hdfeos5_zaread_double(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ 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);
+ for(i=0; i<i_rank; i++){
+ l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+ if(l_start < 0) {
+@@ -2933,7 +2909,7 @@ hdfeos5_zaread_double(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ c_start[i]=l_start;
+ }
+- c_stride=ALLOCA_N(unsigned long long,i_rank);
++ c_stride=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(stride)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -2963,7 +2939,7 @@ hdfeos5_zaread_double(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ }
+ }
+ }
+- c_count=ALLOCA_N(unsigned long long,i_rank);
++ c_count=ALLOCA_N(unsigned long,i_rank);
+ switch(TYPE(count)){
+ case T_NIL:
+ for(i=0; i<i_rank; i++){
+@@ -3002,8 +2978,6 @@ hdfeos5_zaread_double(VALUE mod, VALUE start, VALUE stride, VALUE count)
+ status = HE5_ZAread(i_zaid, i_fldname, c_start, c_stride, c_count, o_data);
+ if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+
+- OBJ_TAINT(NArray);
+-
+ return(NArray);
+ }
+
=====================================
debian/patches/gcc-14.patch
=====================================
@@ -1,8 +1,15 @@
-Description: Fix FTBFS with GCC 14 [-Werror=implicit-function-declaration].
-Author: Bas Couwenberg <sebastic at debian.org>
+From: Bas Couwenberg <sebastic at debian.org>
+Date: Fri, 27 Dec 2024 14:43:25 +0900
+Subject: Fix FTBFS with GCC 14 [-Werror=implicit-function-declaration].
+
Bug-Debian: https://bugs.debian.org/1067059
Forwarded: not-needed
+---
+ hdfeos5pt_wrap.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+diff --git a/hdfeos5pt_wrap.c b/hdfeos5pt_wrap.c
+index 4fed64f..e52e489 100644
--- a/hdfeos5pt_wrap.c
+++ b/hdfeos5pt_wrap.c
@@ -15,6 +15,10 @@
=====================================
debian/patches/series
=====================================
@@ -7,3 +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
View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/321cc7985ab2f0a1cce20f80f37fd389a16c3b6d...dc8766e769dc4d2d905300754b41d3fed74ff2e5
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/321cc7985ab2f0a1cce20f80f37fd389a16c3b6d...dc8766e769dc4d2d905300754b41d3fed74ff2e5
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/f64ab099/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list