summarylogtreecommitdiffstats
path: root/scilab-5.5.2-hdf5-1.8.10.patch
blob: ac51e90895d016f85977e54c2d03e23419c661c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
===================================================================
--- scilab-5.5.2.orig/modules/hdf5/src/c/h5_readDataFromFile.c
+++ scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile.c
@@ -716,7 +716,11 @@ int readCommonPolyMatrix(int _iDatasetId
         /*
          * Open the referenced object, get its name and type.
          */
-        obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pData[i]);
+        obj = H5Rdereference(_iDatasetId,
+    #if H5_VERSION_GE(1,10,0)
+                             H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                             H5R_OBJECT, &pData[i]);
         if (_iComplex)
         {
             status = readComplexPoly(obj, &_piNbCoef[i], &_pdblReal[i], &_pdblImg[i]);
@@ -950,7 +954,11 @@ int readCommonSparseComplexMatrix(int _i
     }
 
     //read Row data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[0]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[0]);
     status = readInteger32Matrix(obj, _piNbItemRow);
     if (status < 0)
     {
@@ -958,7 +966,11 @@ int readCommonSparseComplexMatrix(int _i
     }
 
     //read cols data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[1]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[1]);
     status = readInteger32Matrix(obj, _piColPos);
     if (status < 0)
     {
@@ -966,7 +978,11 @@ int readCommonSparseComplexMatrix(int _i
     }
 
     //read sparse data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[2]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[2]);
 
     if (_iComplex)
     {
@@ -1017,7 +1033,11 @@ int readBooleanSparseMatrix(int _iDatase
     }
 
     //read Row data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[0]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[0]);
     status = readInteger32Matrix(obj, _piNbItemRow);
     if (status < 0)
     {
@@ -1027,7 +1047,11 @@ int readBooleanSparseMatrix(int _iDatase
     if (_iNbItem != 0)
     {
         //read cols data
-        obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[1]);
+        obj = H5Rdereference(_iDatasetId,
+    #if H5_VERSION_GE(1,10,0)
+                             H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                             H5R_OBJECT, &pRef[1]);
         status = readInteger32Matrix(obj, _piColPos);
         if (status < 0)
         {
@@ -1132,7 +1156,11 @@ int getListItemDataset(int _iDatasetId,
 {
     hobj_ref_t poRef = ((hobj_ref_t *) _piItemRef)[_iItemPos];
 
-    *_piItemDataset = H5Rdereference(_iDatasetId, H5R_OBJECT, &poRef);
+    *_piItemDataset = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                                     H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                                     H5R_OBJECT, &poRef);
 
     if (*_piItemDataset == 0)
     {
Index: scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
===================================================================
--- scilab-5.5.2.orig/modules/hdf5/src/c/h5_readDataFromFile_v1.c
+++ scilab-5.5.2/modules/hdf5/src/c/h5_readDataFromFile_v1.c
@@ -471,7 +471,11 @@ int readDoubleMatrix_v1(int _iDatasetId,
         }
 
         //Open the referenced object, get its name and type.
-        obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &Ref);
+        obj = H5Rdereference(_iDatasetId,
+    #if H5_VERSION_GE(1,10,0)
+                             H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                             H5R_OBJECT, &Ref);
         readDouble_v1(obj, _iRows, _iCols, _pdblData);
     }
 
@@ -498,14 +502,22 @@ int readDoubleComplexMatrix_v1(int _iDat
     }
 
     //Open the referenced object, get its name and type.
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[0]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[0]);
     status = readDouble_v1(obj, _iRows, _iCols, _pdblReal);
     if (status < 0)
     {
         return -1;
     }
 
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[1]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[1]);
     status = readDouble_v1(obj, _iRows, _iCols, _pdblImg);
     if (status < 0)
     {
@@ -831,7 +843,11 @@ int readCommonPolyMatrix_v1(int _iDatase
         /*
         * Open the referenced object, get its name and type.
         */
-        obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pData[i]);
+        obj = H5Rdereference(_iDatasetId,
+    #if H5_VERSION_GE(1,10,0)
+                             H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                             H5R_OBJECT, &pData[i]);
         if (_iComplex)
         {
             status = readComplexPoly_v1(obj, &_piNbCoef[i], &_pdblReal[i], &_pdblImg[i]);
@@ -1066,7 +1082,11 @@ int readCommonSparseComplexMatrix_v1(int
     }
 
     //read Row data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[0]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[0]);
     status = readInteger32Matrix_v1(obj, 1, _iRows, _piNbItemRow);
     if (status < 0)
     {
@@ -1074,7 +1094,11 @@ int readCommonSparseComplexMatrix_v1(int
     }
 
     //read cols data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[1]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[1]);
     status = readInteger32Matrix_v1(obj, 1, _iNbItem, _piColPos);
     if (status < 0)
     {
@@ -1082,7 +1106,11 @@ int readCommonSparseComplexMatrix_v1(int
     }
 
     //read sparse data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[2]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[2]);
 
     if (_iComplex)
     {
@@ -1128,7 +1156,11 @@ int readBooleanSparseMatrix_v1(int _iDat
     }
 
     //read Row data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[0]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[0]);
     status = readInteger32Matrix_v1(obj, 1, _iRows, _piNbItemRow);
     if (status < 0)
     {
@@ -1136,7 +1168,11 @@ int readBooleanSparseMatrix_v1(int _iDat
     }
 
     //read cols data
-    obj = H5Rdereference(_iDatasetId, H5R_OBJECT, &pRef[1]);
+    obj = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         H5R_OBJECT, &pRef[1]);
     status = readInteger32Matrix_v1(obj, 1, _iNbItem, _piColPos);
     if (status < 0)
     {
@@ -1235,7 +1271,11 @@ int getListItemDataset_v1(int _iDatasetI
 {
     hobj_ref_t poRef = ((hobj_ref_t *) _piItemRef)[_iItemPos];
 
-    *_piItemDataset = H5Rdereference(_iDatasetId, H5R_OBJECT, &poRef);
+    *_piItemDataset = H5Rdereference(_iDatasetId,
+#if H5_VERSION_GE(1,10,0)
+                                     H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                                     H5R_OBJECT, &poRef);
 
     if (*_piItemDataset == 0)
     {
Index: scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
===================================================================
--- scilab-5.5.2.orig/modules/hdf5/src/cpp/H5ReferenceData.cpp
+++ scilab-5.5.2/modules/hdf5/src/cpp/H5ReferenceData.cpp
@@ -39,7 +39,11 @@ const char ** H5ReferenceData::getRefere
     for (int i = 0; i < totalSize; i++)
     {
         void * ref = &(((void **)cdata)[i]);
-        hid_t obj = H5Rdereference(file, datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
+        hid_t obj = H5Rdereference(file,
+    #if H5_VERSION_GE(1,10,0)
+                                   H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                                   datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
         H5O_info_t info;
         H5Oget_info(obj, &info);
         H5Oclose(obj);
@@ -81,7 +85,11 @@ H5Object & H5ReferenceData::getData(cons
 
     file = getFile().getH5Id();
     ref = &(((void **)cdata)[0]);
-    obj = H5Rdereference(file, datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
+    obj = H5Rdereference(file,
+#if H5_VERSION_GE(1,10,0)
+                         H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                         datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
     if (obj < 0)
     {
         throw H5Exception(__LINE__, __FILE__, _("Cannot open object at the given position."));
@@ -123,7 +131,11 @@ H5Object ** H5ReferenceData::getReferenc
     for (int i = 0; i < totalSize; i++)
     {
         void * ref = &(((void **)cdata)[i]);
-        hid_t obj = H5Rdereference(file, datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
+        hid_t obj = H5Rdereference(file,
+    #if H5_VERSION_GE(1,10,0)
+                                   H5P_DATASET_ACCESS_DEFAULT,
+    #endif
+                                   datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
         objs[i] = &H5Object::getObject(getParent(), obj);
     }
 
@@ -178,7 +190,11 @@ void H5ReferenceData::printData(std::ost
     char * cdata = static_cast<char *>(data) + offset + pos * (stride ? stride : dataSize);
     void ** ref = &(((void **)cdata)[0]);
     hid_t file = getFile().getH5Id();
-    hid_t obj = H5Rdereference(file, datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
+    hid_t obj = H5Rdereference(file,
+#if H5_VERSION_GE(1,10,0)
+                               H5P_DATASET_ACCESS_DEFAULT,
+#endif
+                               datasetReference ? H5R_DATASET_REGION : H5R_OBJECT, ref);
     if (obj < 0)
     {
         os << "NULL";