libhdf5-sys 0.2.0

Native bindings to the HDF5 library
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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
pub use self::H5T_class_t::*;
pub use self::H5T_order_t::*;
pub use self::H5T_sign_t::*;
pub use self::H5T_norm_t::*;
pub use self::H5T_cset_t::*;
pub use self::H5T_str_t::*;
pub use self::H5T_pad_t::*;
pub use self::H5T_cmd_t::*;
pub use self::H5T_bkg_t::*;
pub use self::H5T_pers_t::*;
pub use self::H5T_direction_t::*;
pub use self::H5T_conv_except_t::*;
pub use self::H5T_conv_ret_t::*;

use libc::{c_int, c_uint, c_void, c_char, size_t};

use h5::{herr_t, htri_t, hsize_t, hbool_t};
use h5i::hid_t;

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_class_t {
    H5T_NO_CLASS = -1,
    H5T_INTEGER = 0,
    H5T_FLOAT = 1,
    H5T_TIME = 2,
    H5T_STRING = 3,
    H5T_BITFIELD = 4,
    H5T_OPAQUE = 5,
    H5T_COMPOUND = 6,
    H5T_REFERENCE = 7,
    H5T_ENUM = 8,
    H5T_VLEN = 9,
    H5T_ARRAY = 10,
    H5T_NCLASSES = 11,
}

#[cfg(hdf5_1_8_6)]
#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_order_t {
    H5T_ORDER_ERROR = -1,
    H5T_ORDER_LE = 0,
    H5T_ORDER_BE = 1,
    H5T_ORDER_VAX = 2,
    H5T_ORDER_MIXED = 3,
    H5T_ORDER_NONE = 4,
}

#[cfg(not(hdf5_1_8_6))]
#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_order_t {
    H5T_ORDER_ERROR = -1,
    H5T_ORDER_LE = 0,
    H5T_ORDER_BE = 1,
    H5T_ORDER_VAX = 2,
    H5T_ORDER_NONE = 3,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_sign_t {
    H5T_SGN_ERROR = -1,
    H5T_SGN_NONE = 0,
    H5T_SGN_2 = 1,
    H5T_NSGN = 2,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_norm_t {
    H5T_NORM_ERROR = -1,
    H5T_NORM_IMPLIED = 0,
    H5T_NORM_MSBSET = 1,
    H5T_NORM_NONE = 2,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_cset_t {
    H5T_CSET_ERROR = -1,
    H5T_CSET_ASCII = 0,
    H5T_CSET_UTF8 = 1,
    H5T_CSET_RESERVED_2 = 2,
    H5T_CSET_RESERVED_3 = 3,
    H5T_CSET_RESERVED_4 = 4,
    H5T_CSET_RESERVED_5 = 5,
    H5T_CSET_RESERVED_6 = 6,
    H5T_CSET_RESERVED_7 = 7,
    H5T_CSET_RESERVED_8 = 8,
    H5T_CSET_RESERVED_9 = 9,
    H5T_CSET_RESERVED_10 = 10,
    H5T_CSET_RESERVED_11 = 11,
    H5T_CSET_RESERVED_12 = 12,
    H5T_CSET_RESERVED_13 = 13,
    H5T_CSET_RESERVED_14 = 14,
    H5T_CSET_RESERVED_15 = 15,
}

pub const H5T_NCSET: H5T_cset_t = H5T_CSET_RESERVED_2;

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_str_t {
    H5T_STR_ERROR = -1,
    H5T_STR_NULLTERM = 0,
    H5T_STR_NULLPAD = 1,
    H5T_STR_SPACEPAD = 2,
    H5T_STR_RESERVED_3 = 3,
    H5T_STR_RESERVED_4 = 4,
    H5T_STR_RESERVED_5 = 5,
    H5T_STR_RESERVED_6 = 6,
    H5T_STR_RESERVED_7 = 7,
    H5T_STR_RESERVED_8 = 8,
    H5T_STR_RESERVED_9 = 9,
    H5T_STR_RESERVED_10 = 10,
    H5T_STR_RESERVED_11 = 11,
    H5T_STR_RESERVED_12 = 12,
    H5T_STR_RESERVED_13 = 13,
    H5T_STR_RESERVED_14 = 14,
    H5T_STR_RESERVED_15 = 15,
}

pub const H5T_NSTR: H5T_str_t = H5T_STR_RESERVED_3;

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_pad_t {
    H5T_PAD_ERROR = -1,
    H5T_PAD_ZERO = 0,
    H5T_PAD_ONE = 1,
    H5T_PAD_BACKGROUND = 2,
    H5T_NPAD = 3,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_cmd_t {
    H5T_CONV_INIT = 0,
    H5T_CONV_CONV = 1,
    H5T_CONV_FREE = 2,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_bkg_t {
    H5T_BKG_NO = 0,
    H5T_BKG_TEMP = 1,
    H5T_BKG_YES = 2,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct H5T_cdata_t {
    pub command: H5T_cmd_t,
    pub need_bkg: H5T_bkg_t,
    pub recalc: hbool_t,
    pub _priv: *mut c_void,
}

impl Default for H5T_cdata_t {
    fn default() -> H5T_cdata_t { unsafe { ::std::mem::zeroed() } }
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_pers_t {
    H5T_PERS_DONTCARE = -1,
    H5T_PERS_HARD = 0,
    H5T_PERS_SOFT = 1,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_direction_t {
    H5T_DIR_DEFAULT = 0,
    H5T_DIR_ASCEND = 1,
    H5T_DIR_DESCEND = 2,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_conv_except_t {
    H5T_CONV_EXCEPT_RANGE_HI = 0,
    H5T_CONV_EXCEPT_RANGE_LOW = 1,
    H5T_CONV_EXCEPT_PRECISION = 2,
    H5T_CONV_EXCEPT_TRUNCATE = 3,
    H5T_CONV_EXCEPT_PINF = 4,
    H5T_CONV_EXCEPT_NINF = 5,
    H5T_CONV_EXCEPT_NAN = 6,
}

#[repr(C)]
#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)]
pub enum H5T_conv_ret_t {
    H5T_CONV_ABORT = -1,
    H5T_CONV_UNHANDLED = 0,
    H5T_CONV_HANDLED = 1,
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct hvl_t {
    pub len: size_t,
    pub p: *mut c_void,
}

impl Default for hvl_t {
    fn default() -> hvl_t { unsafe { ::std::mem::zeroed() } }
}

pub const H5T_VARIABLE: size_t = !0;

pub const H5T_OPAQUE_TAG_MAX: c_uint = 256;

pub type H5T_conv_t = Option<extern fn (src_id: hid_t, dst_id: hid_t, cdata: *mut H5T_cdata_t,
                                        nelmts: size_t, buf_stride: size_t, bkg_stride: size_t, buf:
                                        *mut c_void, bkg: *mut c_void, dset_xfer_plist: hid_t) ->
                                        herr_t>;
pub type H5T_conv_except_func_t = Option<extern fn (except_type: H5T_conv_except_t, src_id:
                                                    hid_t, dst_id: hid_t, src_buf: *mut c_void,
                                                    dst_buf: *mut c_void, user_data: *mut c_void) ->
                                                    H5T_conv_ret_t>;

extern {
    pub fn H5Tcreate(_type: H5T_class_t, size: size_t) -> hid_t;
    pub fn H5Tcopy(type_id: hid_t) -> hid_t;
    pub fn H5Tclose(type_id: hid_t) -> herr_t;
    pub fn H5Tequal(type1_id: hid_t, type2_id: hid_t) -> htri_t;
    pub fn H5Tlock(type_id: hid_t) -> herr_t;
    pub fn H5Tcommit2(loc_id: hid_t, name: *const c_char, type_id: hid_t, lcpl_id: hid_t, tcpl_id:
                      hid_t, tapl_id: hid_t) -> herr_t;
    pub fn H5Topen2(loc_id: hid_t, name: *const c_char, tapl_id: hid_t) -> hid_t;
    pub fn H5Tcommit_anon(loc_id: hid_t, type_id: hid_t, tcpl_id: hid_t, tapl_id: hid_t) -> herr_t;
    pub fn H5Tget_create_plist(type_id: hid_t) -> hid_t;
    pub fn H5Tcommitted(type_id: hid_t) -> htri_t;
    pub fn H5Tencode(obj_id: hid_t, buf: *mut c_void, nalloc: *mut size_t) -> herr_t;
    pub fn H5Tdecode(buf: *const c_void) -> hid_t;
    pub fn H5Tinsert(parent_id: hid_t, name: *const c_char, offset: size_t, member_id: hid_t) ->
                     herr_t;
    pub fn H5Tpack(type_id: hid_t) -> herr_t;
    pub fn H5Tenum_create(base_id: hid_t) -> hid_t;
    pub fn H5Tenum_insert(_type: hid_t, name: *const c_char, value: *const c_void) -> herr_t;
    pub fn H5Tenum_nameof(_type: hid_t, value: *const c_void, name: *mut c_char, size: size_t) ->
                          herr_t;
    pub fn H5Tenum_valueof(_type: hid_t, name: *const c_char, value: *mut c_void) -> herr_t;
    pub fn H5Tvlen_create(base_id: hid_t) -> hid_t;
    pub fn H5Tarray_create2(base_id: hid_t, ndims: c_uint, dim: *const hsize_t) -> hid_t;
    pub fn H5Tget_array_ndims(type_id: hid_t) -> c_int;
    pub fn H5Tget_array_dims2(type_id: hid_t, dims: *mut hsize_t) -> c_int;
    pub fn H5Tset_tag(_type: hid_t, tag: *const c_char) -> herr_t;
    pub fn H5Tget_tag(_type: hid_t) -> *mut c_char;
    pub fn H5Tget_super(_type: hid_t) -> hid_t;
    pub fn H5Tget_class(type_id: hid_t) -> H5T_class_t;
    pub fn H5Tdetect_class(type_id: hid_t, cls: H5T_class_t) -> htri_t;
    pub fn H5Tget_size(type_id: hid_t) -> size_t;
    pub fn H5Tget_order(type_id: hid_t) -> H5T_order_t;
    pub fn H5Tget_precision(type_id: hid_t) -> size_t;
    pub fn H5Tget_offset(type_id: hid_t) -> c_int;
    pub fn H5Tget_pad(type_id: hid_t, lsb: *mut H5T_pad_t, msb: *mut H5T_pad_t) -> herr_t;
    pub fn H5Tget_sign(type_id: hid_t) -> H5T_sign_t;
    pub fn H5Tget_fields(type_id: hid_t, spos: *mut size_t, epos: *mut size_t, esize: *mut size_t,
                         mpos: *mut size_t, msize: *mut size_t) -> herr_t;
    pub fn H5Tget_ebias(type_id: hid_t) -> size_t;
    pub fn H5Tget_norm(type_id: hid_t) -> H5T_norm_t;
    pub fn H5Tget_inpad(type_id: hid_t) -> H5T_pad_t;
    pub fn H5Tget_strpad(type_id: hid_t) -> H5T_str_t;
    pub fn H5Tget_nmembers(type_id: hid_t) -> c_int;
    pub fn H5Tget_member_name(type_id: hid_t, membno: c_uint) -> *mut c_char;
    pub fn H5Tget_member_index(type_id: hid_t, name: *const c_char) -> c_int;
    pub fn H5Tget_member_offset(type_id: hid_t, membno: c_uint) -> size_t;
    pub fn H5Tget_member_class(type_id: hid_t, membno: c_uint) -> H5T_class_t;
    pub fn H5Tget_member_type(type_id: hid_t, membno: c_uint) -> hid_t;
    pub fn H5Tget_member_value(type_id: hid_t, membno: c_uint, value: *mut c_void) -> herr_t;
    pub fn H5Tget_cset(type_id: hid_t) -> H5T_cset_t;
    pub fn H5Tis_variable_str(type_id: hid_t) -> htri_t;
    pub fn H5Tget_native_type(type_id: hid_t, direction: H5T_direction_t) -> hid_t;
    pub fn H5Tset_size(type_id: hid_t, size: size_t) -> herr_t;
    pub fn H5Tset_order(type_id: hid_t, order: H5T_order_t) -> herr_t;
    pub fn H5Tset_precision(type_id: hid_t, prec: size_t) -> herr_t;
    pub fn H5Tset_offset(type_id: hid_t, offset: size_t) -> herr_t;
    pub fn H5Tset_pad(type_id: hid_t, lsb: H5T_pad_t, msb: H5T_pad_t) -> herr_t;
    pub fn H5Tset_sign(type_id: hid_t, sign: H5T_sign_t) -> herr_t;
    pub fn H5Tset_fields(type_id: hid_t, spos: size_t, epos: size_t, esize: size_t, mpos: size_t,
                         msize: size_t) -> herr_t;
    pub fn H5Tset_ebias(type_id: hid_t, ebias: size_t) -> herr_t;
    pub fn H5Tset_norm(type_id: hid_t, norm: H5T_norm_t) -> herr_t;
    pub fn H5Tset_inpad(type_id: hid_t, pad: H5T_pad_t) -> herr_t;
    pub fn H5Tset_cset(type_id: hid_t, cset: H5T_cset_t) -> herr_t;
    pub fn H5Tset_strpad(type_id: hid_t, strpad: H5T_str_t) -> herr_t;
    pub fn H5Tregister(pers: H5T_pers_t, name: *const c_char, src_id: hid_t, dst_id: hid_t, func:
                       H5T_conv_t) -> herr_t;
    pub fn H5Tunregister(pers: H5T_pers_t, name: *const c_char, src_id: hid_t, dst_id: hid_t, func:
                         H5T_conv_t) -> herr_t;
    pub fn H5Tfind(src_id: hid_t, dst_id: hid_t, pcdata: *mut *mut H5T_cdata_t) -> H5T_conv_t;
    pub fn H5Tcompiler_conv(src_id: hid_t, dst_id: hid_t) -> htri_t;
    pub fn H5Tconvert(src_id: hid_t, dst_id: hid_t, nelmts: size_t, buf: *mut c_void, background:
                      *mut c_void, plist_id: hid_t) -> herr_t;
}

pub use self::globals::*;

#[cfg(not(target_env = "msvc"))]
mod globals {
    pub use h5i::hid_t as id_t;

    extern {
        // Datatypes
        static H5T_IEEE_F32BE_g: id_t;
        static H5T_IEEE_F32LE_g: id_t;
        static H5T_IEEE_F64BE_g: id_t;
        static H5T_IEEE_F64LE_g: id_t;
        static H5T_STD_I8BE_g: id_t;
        static H5T_STD_I8LE_g: id_t;
        static H5T_STD_I16BE_g: id_t;
        static H5T_STD_I16LE_g: id_t;
        static H5T_STD_I32BE_g: id_t;
        static H5T_STD_I32LE_g: id_t;
        static H5T_STD_I64BE_g: id_t;
        static H5T_STD_I64LE_g: id_t;
        static H5T_STD_U8BE_g: id_t;
        static H5T_STD_U8LE_g: id_t;
        static H5T_STD_U16BE_g: id_t;
        static H5T_STD_U16LE_g: id_t;
        static H5T_STD_U32BE_g: id_t;
        static H5T_STD_U32LE_g: id_t;
        static H5T_STD_U64BE_g: id_t;
        static H5T_STD_U64LE_g: id_t;
        static H5T_STD_B8BE_g: id_t;
        static H5T_STD_B8LE_g: id_t;
        static H5T_STD_B16BE_g: id_t;
        static H5T_STD_B16LE_g: id_t;
        static H5T_STD_B32BE_g: id_t;
        static H5T_STD_B32LE_g: id_t;
        static H5T_STD_B64BE_g: id_t;
        static H5T_STD_B64LE_g: id_t;
        static H5T_STD_REF_OBJ_g: id_t;
        static H5T_STD_REF_DSETREG_g: id_t;
        static H5T_UNIX_D32BE_g: id_t;
        static H5T_UNIX_D32LE_g: id_t;
        static H5T_UNIX_D64BE_g: id_t;
        static H5T_UNIX_D64LE_g: id_t;
        static H5T_C_S1_g: id_t;
        static H5T_FORTRAN_S1_g: id_t;
        static H5T_VAX_F32_g: id_t;
        static H5T_VAX_F64_g: id_t;
        static H5T_NATIVE_SCHAR_g: id_t;
        static H5T_NATIVE_UCHAR_g: id_t;
        static H5T_NATIVE_SHORT_g: id_t;
        static H5T_NATIVE_USHORT_g: id_t;
        static H5T_NATIVE_INT_g: id_t;
        static H5T_NATIVE_UINT_g: id_t;
        static H5T_NATIVE_LONG_g: id_t;
        static H5T_NATIVE_ULONG_g: id_t;
        static H5T_NATIVE_LLONG_g: id_t;
        static H5T_NATIVE_ULLONG_g: id_t;
        static H5T_NATIVE_FLOAT_g: id_t;
        static H5T_NATIVE_DOUBLE_g: id_t;
        static H5T_NATIVE_LDOUBLE_g: id_t;
        static H5T_NATIVE_B8_g: id_t;
        static H5T_NATIVE_B16_g: id_t;
        static H5T_NATIVE_B32_g: id_t;
        static H5T_NATIVE_B64_g: id_t;
        static H5T_NATIVE_OPAQUE_g: id_t;
        static H5T_NATIVE_HADDR_g: id_t;
        static H5T_NATIVE_HSIZE_g: id_t;
        static H5T_NATIVE_HSSIZE_g: id_t;
        static H5T_NATIVE_HERR_g: id_t;
        static H5T_NATIVE_HBOOL_g: id_t;
        static H5T_NATIVE_INT8_g: id_t;
        static H5T_NATIVE_UINT8_g: id_t;
        static H5T_NATIVE_INT_LEAST8_g: id_t;
        static H5T_NATIVE_UINT_LEAST8_g: id_t;
        static H5T_NATIVE_INT_FAST8_g: id_t;
        static H5T_NATIVE_UINT_FAST8_g: id_t;
        static H5T_NATIVE_INT16_g: id_t;
        static H5T_NATIVE_UINT16_g: id_t;
        static H5T_NATIVE_INT_LEAST16_g: id_t;
        static H5T_NATIVE_UINT_LEAST16_g: id_t;
        static H5T_NATIVE_INT_FAST16_g: id_t;
        static H5T_NATIVE_UINT_FAST16_g: id_t;
        static H5T_NATIVE_INT32_g: id_t;
        static H5T_NATIVE_UINT32_g: id_t;
        static H5T_NATIVE_INT_LEAST32_g: id_t;
        static H5T_NATIVE_UINT_LEAST32_g: id_t;
        static H5T_NATIVE_INT_FAST32_g: id_t;
        static H5T_NATIVE_UINT_FAST32_g: id_t;
        static H5T_NATIVE_INT64_g: id_t;
        static H5T_NATIVE_UINT64_g: id_t;
        static H5T_NATIVE_INT_LEAST64_g: id_t;
        static H5T_NATIVE_UINT_LEAST64_g: id_t;
        static H5T_NATIVE_INT_FAST64_g: id_t;
        static H5T_NATIVE_UINT_FAST64_g: id_t;
    }

    pub static H5T_IEEE_F32BE: &'static id_t = &H5T_IEEE_F32BE_g;
    pub static H5T_IEEE_F32LE: &'static id_t = &H5T_IEEE_F32LE_g;
    pub static H5T_IEEE_F64BE: &'static id_t = &H5T_IEEE_F64BE_g;
    pub static H5T_IEEE_F64LE: &'static id_t = &H5T_IEEE_F64LE_g;
    pub static H5T_STD_I8BE: &'static id_t = &H5T_STD_I8BE_g;
    pub static H5T_STD_I8LE: &'static id_t = &H5T_STD_I8LE_g;
    pub static H5T_STD_I16BE: &'static id_t = &H5T_STD_I16BE_g;
    pub static H5T_STD_I16LE: &'static id_t = &H5T_STD_I16LE_g;
    pub static H5T_STD_I32BE: &'static id_t = &H5T_STD_I32BE_g;
    pub static H5T_STD_I32LE: &'static id_t = &H5T_STD_I32LE_g;
    pub static H5T_STD_I64BE: &'static id_t = &H5T_STD_I64BE_g;
    pub static H5T_STD_I64LE: &'static id_t = &H5T_STD_I64LE_g;
    pub static H5T_STD_U8BE: &'static id_t = &H5T_STD_U8BE_g;
    pub static H5T_STD_U8LE: &'static id_t = &H5T_STD_U8LE_g;
    pub static H5T_STD_U16BE: &'static id_t = &H5T_STD_U16BE_g;
    pub static H5T_STD_U16LE: &'static id_t = &H5T_STD_U16LE_g;
    pub static H5T_STD_U32BE: &'static id_t = &H5T_STD_U32BE_g;
    pub static H5T_STD_U32LE: &'static id_t = &H5T_STD_U32LE_g;
    pub static H5T_STD_U64BE: &'static id_t = &H5T_STD_U64BE_g;
    pub static H5T_STD_U64LE: &'static id_t = &H5T_STD_U64LE_g;
    pub static H5T_STD_B8BE: &'static id_t = &H5T_STD_B8BE_g;
    pub static H5T_STD_B8LE: &'static id_t = &H5T_STD_B8LE_g;
    pub static H5T_STD_B16BE: &'static id_t = &H5T_STD_B16BE_g;
    pub static H5T_STD_B16LE: &'static id_t = &H5T_STD_B16LE_g;
    pub static H5T_STD_B32BE: &'static id_t = &H5T_STD_B32BE_g;
    pub static H5T_STD_B32LE: &'static id_t = &H5T_STD_B32LE_g;
    pub static H5T_STD_B64BE: &'static id_t = &H5T_STD_B64BE_g;
    pub static H5T_STD_B64LE: &'static id_t = &H5T_STD_B64LE_g;
    pub static H5T_STD_REF_OBJ: &'static id_t = &H5T_STD_REF_OBJ_g;
    pub static H5T_STD_REF_DSETREG: &'static id_t = &H5T_STD_REF_DSETREG_g;
    pub static H5T_UNIX_D32BE: &'static id_t = &H5T_UNIX_D32BE_g;
    pub static H5T_UNIX_D32LE: &'static id_t = &H5T_UNIX_D32LE_g;
    pub static H5T_UNIX_D64BE: &'static id_t = &H5T_UNIX_D64BE_g;
    pub static H5T_UNIX_D64LE: &'static id_t = &H5T_UNIX_D64LE_g;
    pub static H5T_C_S1: &'static id_t = &H5T_C_S1_g;
    pub static H5T_FORTRAN_S1: &'static id_t = &H5T_FORTRAN_S1_g;
    pub static H5T_VAX_F32: &'static id_t = &H5T_VAX_F32_g;
    pub static H5T_VAX_F64: &'static id_t = &H5T_VAX_F64_g;
    pub static H5T_NATIVE_SCHAR: &'static id_t = &H5T_NATIVE_SCHAR_g;
    pub static H5T_NATIVE_UCHAR: &'static id_t = &H5T_NATIVE_UCHAR_g;
    pub static H5T_NATIVE_SHORT: &'static id_t = &H5T_NATIVE_SHORT_g;
    pub static H5T_NATIVE_USHORT: &'static id_t = &H5T_NATIVE_USHORT_g;
    pub static H5T_NATIVE_INT: &'static id_t = &H5T_NATIVE_INT_g;
    pub static H5T_NATIVE_UINT: &'static id_t = &H5T_NATIVE_UINT_g;
    pub static H5T_NATIVE_LONG: &'static id_t = &H5T_NATIVE_LONG_g;
    pub static H5T_NATIVE_ULONG: &'static id_t = &H5T_NATIVE_ULONG_g;
    pub static H5T_NATIVE_LLONG: &'static id_t = &H5T_NATIVE_LLONG_g;
    pub static H5T_NATIVE_ULLONG: &'static id_t = &H5T_NATIVE_ULLONG_g;
    pub static H5T_NATIVE_FLOAT: &'static id_t = &H5T_NATIVE_FLOAT_g;
    pub static H5T_NATIVE_DOUBLE: &'static id_t = &H5T_NATIVE_DOUBLE_g;
    pub static H5T_NATIVE_LDOUBLE: &'static id_t = &H5T_NATIVE_LDOUBLE_g;
    pub static H5T_NATIVE_B8: &'static id_t = &H5T_NATIVE_B8_g;
    pub static H5T_NATIVE_B16: &'static id_t = &H5T_NATIVE_B16_g;
    pub static H5T_NATIVE_B32: &'static id_t = &H5T_NATIVE_B32_g;
    pub static H5T_NATIVE_B64: &'static id_t = &H5T_NATIVE_B64_g;
    pub static H5T_NATIVE_OPAQUE: &'static id_t = &H5T_NATIVE_OPAQUE_g;
    pub static H5T_NATIVE_HADDR: &'static id_t = &H5T_NATIVE_HADDR_g;
    pub static H5T_NATIVE_HSIZE: &'static id_t = &H5T_NATIVE_HSIZE_g;
    pub static H5T_NATIVE_HSSIZE: &'static id_t = &H5T_NATIVE_HSSIZE_g;
    pub static H5T_NATIVE_HERR: &'static id_t = &H5T_NATIVE_HERR_g;
    pub static H5T_NATIVE_HBOOL: &'static id_t = &H5T_NATIVE_HBOOL_g;
    pub static H5T_NATIVE_INT8: &'static id_t = &H5T_NATIVE_INT8_g;
    pub static H5T_NATIVE_UINT8: &'static id_t = &H5T_NATIVE_UINT8_g;
    pub static H5T_NATIVE_INT_LEAST8: &'static id_t = &H5T_NATIVE_INT_LEAST8_g;
    pub static H5T_NATIVE_UINT_LEAST8: &'static id_t = &H5T_NATIVE_UINT_LEAST8_g;
    pub static H5T_NATIVE_INT_FAST8: &'static id_t = &H5T_NATIVE_INT_FAST8_g;
    pub static H5T_NATIVE_UINT_FAST8: &'static id_t = &H5T_NATIVE_UINT_FAST8_g;
    pub static H5T_NATIVE_INT16: &'static id_t = &H5T_NATIVE_INT16_g;
    pub static H5T_NATIVE_UINT16: &'static id_t = &H5T_NATIVE_UINT16_g;
    pub static H5T_NATIVE_INT_LEAST16: &'static id_t = &H5T_NATIVE_INT_LEAST16_g;
    pub static H5T_NATIVE_UINT_LEAST16: &'static id_t = &H5T_NATIVE_UINT_LEAST16_g;
    pub static H5T_NATIVE_INT_FAST16: &'static id_t = &H5T_NATIVE_INT_FAST16_g;
    pub static H5T_NATIVE_UINT_FAST16: &'static id_t = &H5T_NATIVE_UINT_FAST16_g;
    pub static H5T_NATIVE_INT32: &'static id_t = &H5T_NATIVE_INT32_g;
    pub static H5T_NATIVE_UINT32: &'static id_t = &H5T_NATIVE_UINT32_g;
    pub static H5T_NATIVE_INT_LEAST32: &'static id_t = &H5T_NATIVE_INT_LEAST32_g;
    pub static H5T_NATIVE_UINT_LEAST32: &'static id_t = &H5T_NATIVE_UINT_LEAST32_g;
    pub static H5T_NATIVE_INT_FAST32: &'static id_t = &H5T_NATIVE_INT_FAST32_g;
    pub static H5T_NATIVE_UINT_FAST32: &'static id_t = &H5T_NATIVE_UINT_FAST32_g;
    pub static H5T_NATIVE_INT64: &'static id_t = &H5T_NATIVE_INT64_g;
    pub static H5T_NATIVE_UINT64: &'static id_t = &H5T_NATIVE_UINT64_g;
    pub static H5T_NATIVE_INT_LEAST64: &'static id_t = &H5T_NATIVE_INT_LEAST64_g;
    pub static H5T_NATIVE_UINT_LEAST64: &'static id_t = &H5T_NATIVE_UINT_LEAST64_g;
    pub static H5T_NATIVE_INT_FAST64: &'static id_t = &H5T_NATIVE_INT_FAST64_g;
    pub static H5T_NATIVE_UINT_FAST64: &'static id_t = &H5T_NATIVE_UINT_FAST64_g;
}

#[cfg(target_env = "msvc")]
mod globals {
    // dllimport hack
    pub type id_t = usize;

    extern {
        // Datatypes
        static __imp_H5T_IEEE_F32BE_g: id_t;
        static __imp_H5T_IEEE_F32LE_g: id_t;
        static __imp_H5T_IEEE_F64BE_g: id_t;
        static __imp_H5T_IEEE_F64LE_g: id_t;
        static __imp_H5T_STD_I8BE_g: id_t;
        static __imp_H5T_STD_I8LE_g: id_t;
        static __imp_H5T_STD_I16BE_g: id_t;
        static __imp_H5T_STD_I16LE_g: id_t;
        static __imp_H5T_STD_I32BE_g: id_t;
        static __imp_H5T_STD_I32LE_g: id_t;
        static __imp_H5T_STD_I64BE_g: id_t;
        static __imp_H5T_STD_I64LE_g: id_t;
        static __imp_H5T_STD_U8BE_g: id_t;
        static __imp_H5T_STD_U8LE_g: id_t;
        static __imp_H5T_STD_U16BE_g: id_t;
        static __imp_H5T_STD_U16LE_g: id_t;
        static __imp_H5T_STD_U32BE_g: id_t;
        static __imp_H5T_STD_U32LE_g: id_t;
        static __imp_H5T_STD_U64BE_g: id_t;
        static __imp_H5T_STD_U64LE_g: id_t;
        static __imp_H5T_STD_B8BE_g: id_t;
        static __imp_H5T_STD_B8LE_g: id_t;
        static __imp_H5T_STD_B16BE_g: id_t;
        static __imp_H5T_STD_B16LE_g: id_t;
        static __imp_H5T_STD_B32BE_g: id_t;
        static __imp_H5T_STD_B32LE_g: id_t;
        static __imp_H5T_STD_B64BE_g: id_t;
        static __imp_H5T_STD_B64LE_g: id_t;
        static __imp_H5T_STD_REF_OBJ_g: id_t;
        static __imp_H5T_STD_REF_DSETREG_g: id_t;
        static __imp_H5T_UNIX_D32BE_g: id_t;
        static __imp_H5T_UNIX_D32LE_g: id_t;
        static __imp_H5T_UNIX_D64BE_g: id_t;
        static __imp_H5T_UNIX_D64LE_g: id_t;
        static __imp_H5T_C_S1_g: id_t;
        static __imp_H5T_FORTRAN_S1_g: id_t;
        static __imp_H5T_VAX_F32_g: id_t;
        static __imp_H5T_VAX_F64_g: id_t;
        static __imp_H5T_NATIVE_SCHAR_g: id_t;
        static __imp_H5T_NATIVE_UCHAR_g: id_t;
        static __imp_H5T_NATIVE_SHORT_g: id_t;
        static __imp_H5T_NATIVE_USHORT_g: id_t;
        static __imp_H5T_NATIVE_INT_g: id_t;
        static __imp_H5T_NATIVE_UINT_g: id_t;
        static __imp_H5T_NATIVE_LONG_g: id_t;
        static __imp_H5T_NATIVE_ULONG_g: id_t;
        static __imp_H5T_NATIVE_LLONG_g: id_t;
        static __imp_H5T_NATIVE_ULLONG_g: id_t;
        static __imp_H5T_NATIVE_FLOAT_g: id_t;
        static __imp_H5T_NATIVE_DOUBLE_g: id_t;
        static __imp_H5T_NATIVE_LDOUBLE_g: id_t;
        static __imp_H5T_NATIVE_B8_g: id_t;
        static __imp_H5T_NATIVE_B16_g: id_t;
        static __imp_H5T_NATIVE_B32_g: id_t;
        static __imp_H5T_NATIVE_B64_g: id_t;
        static __imp_H5T_NATIVE_OPAQUE_g: id_t;
        static __imp_H5T_NATIVE_HADDR_g: id_t;
        static __imp_H5T_NATIVE_HSIZE_g: id_t;
        static __imp_H5T_NATIVE_HSSIZE_g: id_t;
        static __imp_H5T_NATIVE_HERR_g: id_t;
        static __imp_H5T_NATIVE_HBOOL_g: id_t;
        static __imp_H5T_NATIVE_INT8_g: id_t;
        static __imp_H5T_NATIVE_UINT8_g: id_t;
        static __imp_H5T_NATIVE_INT_LEAST8_g: id_t;
        static __imp_H5T_NATIVE_UINT_LEAST8_g: id_t;
        static __imp_H5T_NATIVE_INT_FAST8_g: id_t;
        static __imp_H5T_NATIVE_UINT_FAST8_g: id_t;
        static __imp_H5T_NATIVE_INT16_g: id_t;
        static __imp_H5T_NATIVE_UINT16_g: id_t;
        static __imp_H5T_NATIVE_INT_LEAST16_g: id_t;
        static __imp_H5T_NATIVE_UINT_LEAST16_g: id_t;
        static __imp_H5T_NATIVE_INT_FAST16_g: id_t;
        static __imp_H5T_NATIVE_UINT_FAST16_g: id_t;
        static __imp_H5T_NATIVE_INT32_g: id_t;
        static __imp_H5T_NATIVE_UINT32_g: id_t;
        static __imp_H5T_NATIVE_INT_LEAST32_g: id_t;
        static __imp_H5T_NATIVE_UINT_LEAST32_g: id_t;
        static __imp_H5T_NATIVE_INT_FAST32_g: id_t;
        static __imp_H5T_NATIVE_UINT_FAST32_g: id_t;
        static __imp_H5T_NATIVE_INT64_g: id_t;
        static __imp_H5T_NATIVE_UINT64_g: id_t;
        static __imp_H5T_NATIVE_INT_LEAST64_g: id_t;
        static __imp_H5T_NATIVE_UINT_LEAST64_g: id_t;
        static __imp_H5T_NATIVE_INT_FAST64_g: id_t;
        static __imp_H5T_NATIVE_UINT_FAST64_g: id_t;
    }

    pub static H5T_IEEE_F32BE: &'static id_t = &__imp_H5T_IEEE_F32BE_g;
    pub static H5T_IEEE_F32LE: &'static id_t = &__imp_H5T_IEEE_F32LE_g;
    pub static H5T_IEEE_F64BE: &'static id_t = &__imp_H5T_IEEE_F64BE_g;
    pub static H5T_IEEE_F64LE: &'static id_t = &__imp_H5T_IEEE_F64LE_g;
    pub static H5T_STD_I8BE: &'static id_t = &__imp_H5T_STD_I8BE_g;
    pub static H5T_STD_I8LE: &'static id_t = &__imp_H5T_STD_I8LE_g;
    pub static H5T_STD_I16BE: &'static id_t = &__imp_H5T_STD_I16BE_g;
    pub static H5T_STD_I16LE: &'static id_t = &__imp_H5T_STD_I16LE_g;
    pub static H5T_STD_I32BE: &'static id_t = &__imp_H5T_STD_I32BE_g;
    pub static H5T_STD_I32LE: &'static id_t = &__imp_H5T_STD_I32LE_g;
    pub static H5T_STD_I64BE: &'static id_t = &__imp_H5T_STD_I64BE_g;
    pub static H5T_STD_I64LE: &'static id_t = &__imp_H5T_STD_I64LE_g;
    pub static H5T_STD_U8BE: &'static id_t = &__imp_H5T_STD_U8BE_g;
    pub static H5T_STD_U8LE: &'static id_t = &__imp_H5T_STD_U8LE_g;
    pub static H5T_STD_U16BE: &'static id_t = &__imp_H5T_STD_U16BE_g;
    pub static H5T_STD_U16LE: &'static id_t = &__imp_H5T_STD_U16LE_g;
    pub static H5T_STD_U32BE: &'static id_t = &__imp_H5T_STD_U32BE_g;
    pub static H5T_STD_U32LE: &'static id_t = &__imp_H5T_STD_U32LE_g;
    pub static H5T_STD_U64BE: &'static id_t = &__imp_H5T_STD_U64BE_g;
    pub static H5T_STD_U64LE: &'static id_t = &__imp_H5T_STD_U64LE_g;
    pub static H5T_STD_B8BE: &'static id_t = &__imp_H5T_STD_B8BE_g;
    pub static H5T_STD_B8LE: &'static id_t = &__imp_H5T_STD_B8LE_g;
    pub static H5T_STD_B16BE: &'static id_t = &__imp_H5T_STD_B16BE_g;
    pub static H5T_STD_B16LE: &'static id_t = &__imp_H5T_STD_B16LE_g;
    pub static H5T_STD_B32BE: &'static id_t = &__imp_H5T_STD_B32BE_g;
    pub static H5T_STD_B32LE: &'static id_t = &__imp_H5T_STD_B32LE_g;
    pub static H5T_STD_B64BE: &'static id_t = &__imp_H5T_STD_B64BE_g;
    pub static H5T_STD_B64LE: &'static id_t = &__imp_H5T_STD_B64LE_g;
    pub static H5T_STD_REF_OBJ: &'static id_t = &__imp_H5T_STD_REF_OBJ_g;
    pub static H5T_STD_REF_DSETREG: &'static id_t = &__imp_H5T_STD_REF_DSETREG_g;
    pub static H5T_UNIX_D32BE: &'static id_t = &__imp_H5T_UNIX_D32BE_g;
    pub static H5T_UNIX_D32LE: &'static id_t = &__imp_H5T_UNIX_D32LE_g;
    pub static H5T_UNIX_D64BE: &'static id_t = &__imp_H5T_UNIX_D64BE_g;
    pub static H5T_UNIX_D64LE: &'static id_t = &__imp_H5T_UNIX_D64LE_g;
    pub static H5T_C_S1: &'static id_t = &__imp_H5T_C_S1_g;
    pub static H5T_FORTRAN_S1: &'static id_t = &__imp_H5T_FORTRAN_S1_g;
    pub static H5T_VAX_F32: &'static id_t = &__imp_H5T_VAX_F32_g;
    pub static H5T_VAX_F64: &'static id_t = &__imp_H5T_VAX_F64_g;
    pub static H5T_NATIVE_SCHAR: &'static id_t = &__imp_H5T_NATIVE_SCHAR_g;
    pub static H5T_NATIVE_UCHAR: &'static id_t = &__imp_H5T_NATIVE_UCHAR_g;
    pub static H5T_NATIVE_SHORT: &'static id_t = &__imp_H5T_NATIVE_SHORT_g;
    pub static H5T_NATIVE_USHORT: &'static id_t = &__imp_H5T_NATIVE_USHORT_g;
    pub static H5T_NATIVE_INT: &'static id_t = &__imp_H5T_NATIVE_INT_g;
    pub static H5T_NATIVE_UINT: &'static id_t = &__imp_H5T_NATIVE_UINT_g;
    pub static H5T_NATIVE_LONG: &'static id_t = &__imp_H5T_NATIVE_LONG_g;
    pub static H5T_NATIVE_ULONG: &'static id_t = &__imp_H5T_NATIVE_ULONG_g;
    pub static H5T_NATIVE_LLONG: &'static id_t = &__imp_H5T_NATIVE_LLONG_g;
    pub static H5T_NATIVE_ULLONG: &'static id_t = &__imp_H5T_NATIVE_ULLONG_g;
    pub static H5T_NATIVE_FLOAT: &'static id_t = &__imp_H5T_NATIVE_FLOAT_g;
    pub static H5T_NATIVE_DOUBLE: &'static id_t = &__imp_H5T_NATIVE_DOUBLE_g;
    pub static H5T_NATIVE_LDOUBLE: &'static id_t = &__imp_H5T_NATIVE_LDOUBLE_g;
    pub static H5T_NATIVE_B8: &'static id_t = &__imp_H5T_NATIVE_B8_g;
    pub static H5T_NATIVE_B16: &'static id_t = &__imp_H5T_NATIVE_B16_g;
    pub static H5T_NATIVE_B32: &'static id_t = &__imp_H5T_NATIVE_B32_g;
    pub static H5T_NATIVE_B64: &'static id_t = &__imp_H5T_NATIVE_B64_g;
    pub static H5T_NATIVE_OPAQUE: &'static id_t = &__imp_H5T_NATIVE_OPAQUE_g;
    pub static H5T_NATIVE_HADDR: &'static id_t = &__imp_H5T_NATIVE_HADDR_g;
    pub static H5T_NATIVE_HSIZE: &'static id_t = &__imp_H5T_NATIVE_HSIZE_g;
    pub static H5T_NATIVE_HSSIZE: &'static id_t = &__imp_H5T_NATIVE_HSSIZE_g;
    pub static H5T_NATIVE_HERR: &'static id_t = &__imp_H5T_NATIVE_HERR_g;
    pub static H5T_NATIVE_HBOOL: &'static id_t = &__imp_H5T_NATIVE_HBOOL_g;
    pub static H5T_NATIVE_INT8: &'static id_t = &__imp_H5T_NATIVE_INT8_g;
    pub static H5T_NATIVE_UINT8: &'static id_t = &__imp_H5T_NATIVE_UINT8_g;
    pub static H5T_NATIVE_INT_LEAST8: &'static id_t = &__imp_H5T_NATIVE_INT_LEAST8_g;
    pub static H5T_NATIVE_UINT_LEAST8: &'static id_t = &__imp_H5T_NATIVE_UINT_LEAST8_g;
    pub static H5T_NATIVE_INT_FAST8: &'static id_t = &__imp_H5T_NATIVE_INT_FAST8_g;
    pub static H5T_NATIVE_UINT_FAST8: &'static id_t = &__imp_H5T_NATIVE_UINT_FAST8_g;
    pub static H5T_NATIVE_INT16: &'static id_t = &__imp_H5T_NATIVE_INT16_g;
    pub static H5T_NATIVE_UINT16: &'static id_t = &__imp_H5T_NATIVE_UINT16_g;
    pub static H5T_NATIVE_INT_LEAST16: &'static id_t = &__imp_H5T_NATIVE_INT_LEAST16_g;
    pub static H5T_NATIVE_UINT_LEAST16: &'static id_t = &__imp_H5T_NATIVE_UINT_LEAST16_g;
    pub static H5T_NATIVE_INT_FAST16: &'static id_t = &__imp_H5T_NATIVE_INT_FAST16_g;
    pub static H5T_NATIVE_UINT_FAST16: &'static id_t = &__imp_H5T_NATIVE_UINT_FAST16_g;
    pub static H5T_NATIVE_INT32: &'static id_t = &__imp_H5T_NATIVE_INT32_g;
    pub static H5T_NATIVE_UINT32: &'static id_t = &__imp_H5T_NATIVE_UINT32_g;
    pub static H5T_NATIVE_INT_LEAST32: &'static id_t = &__imp_H5T_NATIVE_INT_LEAST32_g;
    pub static H5T_NATIVE_UINT_LEAST32: &'static id_t = &__imp_H5T_NATIVE_UINT_LEAST32_g;
    pub static H5T_NATIVE_INT_FAST32: &'static id_t = &__imp_H5T_NATIVE_INT_FAST32_g;
    pub static H5T_NATIVE_UINT_FAST32: &'static id_t = &__imp_H5T_NATIVE_UINT_FAST32_g;
    pub static H5T_NATIVE_INT64: &'static id_t = &__imp_H5T_NATIVE_INT64_g;
    pub static H5T_NATIVE_UINT64: &'static id_t = &__imp_H5T_NATIVE_UINT64_g;
    pub static H5T_NATIVE_INT_LEAST64: &'static id_t = &__imp_H5T_NATIVE_INT_LEAST64_g;
    pub static H5T_NATIVE_UINT_LEAST64: &'static id_t = &__imp_H5T_NATIVE_UINT_LEAST64_g;
    pub static H5T_NATIVE_INT_FAST64: &'static id_t = &__imp_H5T_NATIVE_INT_FAST64_g;
    pub static H5T_NATIVE_UINT_FAST64: &'static id_t = &__imp_H5T_NATIVE_UINT_FAST64_g;
}