From: akl Date: Fri, 12 Dec 2008 09:52:44 +0000 (+0000) Subject: Fix of internal bugs 20610 and 20710: Fatal error in 5x on activate Mesh for 4x study... X-Git-Tag: V5_1_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c062e303fb1267104271baa13e82e34bd8b47fa6;p=modules%2Fkernel.git Fix of internal bugs 20610 and 20710: Fatal error in 5x on activate Mesh for 4x study. Add PCLINUX64 to PCLINUX preprocessor command to correct HDF work on 64-bit platforms. --- diff --git a/src/HDFPersist/HDFattrCreate.c b/src/HDFPersist/HDFattrCreate.c index 034572e3e..51bdd16e1 100644 --- a/src/HDFPersist/HDFattrCreate.c +++ b/src/HDFPersist/HDFattrCreate.c @@ -46,7 +46,7 @@ hdf_idt HDFattrCreate(hdf_idt pid,char *name,hdf_type type, size_t size) switch(type) { case HDF_FLOAT64 : -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) type_hdf = H5T_IEEE_F64BE; #else type_hdf = H5T_IEEE_F64LE; @@ -54,7 +54,7 @@ hdf_idt HDFattrCreate(hdf_idt pid,char *name,hdf_type type, size_t size) break; case HDF_INT32 : -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) type_hdf = H5T_STD_I32BE; #else type_hdf = H5T_NATIVE_INT; diff --git a/src/HDFPersist/HDFattrRead.c b/src/HDFPersist/HDFattrRead.c index f370f840f..8e43c46b7 100644 --- a/src/HDFPersist/HDFattrRead.c +++ b/src/HDFPersist/HDFattrRead.c @@ -43,7 +43,7 @@ hdf_err HDFattrRead(hdf_idt id,void *val) hdf_idt type_hdf; if ((type_hdf = H5Aget_type(id)) >= 0) { -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if ((H5Tget_class(type_hdf) == H5T_INTEGER) && (H5Tget_size(type_hdf) == 4)) type_hdf = H5T_NATIVE_INT; #endif diff --git a/src/HDFPersist/HDFattrWrite.c b/src/HDFPersist/HDFattrWrite.c index d47d9d5b0..ebadb5a78 100644 --- a/src/HDFPersist/HDFattrWrite.c +++ b/src/HDFPersist/HDFattrWrite.c @@ -41,14 +41,14 @@ hdf_err HDFattrWrite(hdf_idt id, void *val) { hdf_idt type_id; int ret = 0; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) int isI32BE = 0; #endif if ((type_id = H5Aget_type(id)) < 0) return -1; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if((H5Tget_class(type_id) == H5T_INTEGER) && (H5Tget_size(type_id) == 4)) { isI32BE = 1; /* See HDFattrCreate */ if (H5Tconvert(H5T_NATIVE_INT,H5T_STD_I32BE,1,(void *)val,NULL,(hid_t)NULL) < 0) @@ -59,7 +59,7 @@ hdf_err HDFattrWrite(hdf_idt id, void *val) ret = H5Awrite(id,type_id, val); -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if (isI32BE && (H5Tconvert(H5T_STD_I32BE,H5T_NATIVE_INT,1,(void *)val,NULL,(hid_t)NULL) < 0)) return -1; #endif diff --git a/src/HDFPersist/HDFdatasetCreate.c b/src/HDFPersist/HDFdatasetCreate.c index d04719216..12e8e79be 100644 --- a/src/HDFPersist/HDFdatasetCreate.c +++ b/src/HDFPersist/HDFdatasetCreate.c @@ -51,7 +51,7 @@ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, switch(type) { case HDF_FLOAT64 : -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) type_hdf = H5T_IEEE_F64BE; #else type_hdf = H5T_IEEE_F64LE; @@ -59,7 +59,7 @@ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, break; case HDF_INT32 : -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) type_hdf = H5T_STD_I32BE; #else type_hdf = H5T_NATIVE_INT; diff --git a/src/HDFPersist/HDFdatasetRead.c b/src/HDFPersist/HDFdatasetRead.c index ca0412b14..4d370347f 100644 --- a/src/HDFPersist/HDFdatasetRead.c +++ b/src/HDFPersist/HDFdatasetRead.c @@ -45,7 +45,7 @@ hdf_err HDFdatasetRead(hdf_idt id, void *val) if ((datatype = H5Dget_type(id)) < 0) return -1; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if ((H5Tget_class(datatype) == H5T_INTEGER) && (H5Tget_size(datatype) == 4)) datatype = H5T_NATIVE_INT; #endif diff --git a/src/HDFPersist/HDFdatasetWrite.c b/src/HDFPersist/HDFdatasetWrite.c index a30d97809..1d7052b83 100644 --- a/src/HDFPersist/HDFdatasetWrite.c +++ b/src/HDFPersist/HDFdatasetWrite.c @@ -42,7 +42,7 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) { hdf_idt datatype; hdf_err ret; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) int isI32BE = 0; int size = 0; #endif @@ -50,7 +50,7 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) if ((datatype = H5Dget_type(id)) < 0) return -1; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if((H5Tget_class(datatype) == H5T_INTEGER) && (H5Tget_size(datatype) == 4)) { isI32BE = 1; /* See HDFdatasetCreate */ @@ -75,7 +75,7 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) if ((ret = H5Dwrite(id, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, val)) < 0) return -1; -#ifdef PCLINUX +#if defined (PCLINUX) || defined (PCLINUX64) if (isI32BE && (H5Tconvert(H5T_STD_I32BE, H5T_NATIVE_INT, size, (void *)val, NULL, (hid_t)0) < 0)) return -1; #endif