/
gdal_2.4.rs
10200 lines (10199 loc) · 296 KB
/
gdal_2.4.rs
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
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* automatically generated by rust-bindgen */
pub type va_list = __builtin_va_list;
pub type __dev_t = libc::c_ulong;
pub type __uid_t = libc::c_uint;
pub type __gid_t = libc::c_uint;
pub type __ino_t = libc::c_ulong;
pub type __mode_t = libc::c_uint;
pub type __nlink_t = libc::c_ulong;
pub type __off_t = libc::c_long;
pub type __off64_t = libc::c_long;
pub type __time_t = libc::c_long;
pub type __blksize_t = libc::c_long;
pub type __blkcnt_t = libc::c_long;
pub type __syscall_slong_t = libc::c_long;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = libc::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: libc::c_int,
pub _IO_read_ptr: *mut libc::c_char,
pub _IO_read_end: *mut libc::c_char,
pub _IO_read_base: *mut libc::c_char,
pub _IO_write_base: *mut libc::c_char,
pub _IO_write_ptr: *mut libc::c_char,
pub _IO_write_end: *mut libc::c_char,
pub _IO_buf_base: *mut libc::c_char,
pub _IO_buf_end: *mut libc::c_char,
pub _IO_save_base: *mut libc::c_char,
pub _IO_backup_base: *mut libc::c_char,
pub _IO_save_end: *mut libc::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: libc::c_int,
pub _flags2: libc::c_int,
pub _old_offset: __off_t,
pub _cur_column: libc::c_ushort,
pub _vtable_offset: libc::c_schar,
pub _shortbuf: [libc::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut libc::c_void,
pub __pad5: usize,
pub _mode: libc::c_int,
pub _unused2: [libc::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
pub type time_t = __time_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
pub tv_sec: __time_t,
pub tv_nsec: __syscall_slong_t,
}
#[test]
fn bindgen_test_layout_timespec() {
assert_eq!(
::std::mem::size_of::<timespec>(),
16usize,
concat!("Size of: ", stringify!(timespec))
);
assert_eq!(
::std::mem::align_of::<timespec>(),
8usize,
concat!("Alignment of ", stringify!(timespec))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<timespec>())).tv_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<timespec>())).tv_nsec as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_nsec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tm {
pub tm_sec: libc::c_int,
pub tm_min: libc::c_int,
pub tm_hour: libc::c_int,
pub tm_mday: libc::c_int,
pub tm_mon: libc::c_int,
pub tm_year: libc::c_int,
pub tm_wday: libc::c_int,
pub tm_yday: libc::c_int,
pub tm_isdst: libc::c_int,
pub tm_gmtoff: libc::c_long,
pub tm_zone: *const libc::c_char,
}
#[test]
fn bindgen_test_layout_tm() {
assert_eq!(
::std::mem::size_of::<tm>(),
56usize,
concat!("Size of: ", stringify!(tm))
);
assert_eq!(
::std::mem::align_of::<tm>(),
8usize,
concat!("Alignment of ", stringify!(tm))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_sec as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_sec)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_min as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_hour as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_hour)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_mday as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_mday)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_mon as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_mon)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_year as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_year)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_wday as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_wday)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_yday as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_yday)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_isdst as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_isdst)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_gmtoff as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_gmtoff)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<tm>())).tm_zone as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(tm),
"::",
stringify!(tm_zone)
)
);
}
#[doc = " Int32 type"]
pub type GInt32 = libc::c_int;
#[doc = " Unsigned int32 type"]
pub type GUInt32 = libc::c_uint;
#[doc = " Int16 type"]
pub type GInt16 = libc::c_short;
#[doc = " Unsigned byte type"]
pub type GByte = libc::c_uchar;
#[doc = " Large signed integer type (generally 64-bit integer type)."]
#[doc = " Use GInt64 when exactly 64 bit is needed"]
pub type GIntBig = libc::c_longlong;
#[doc = " Large unsigned integer type (generally 64-bit unsigned integer type)."]
#[doc = " Use GUInt64 when exactly 64 bit is needed"]
pub type GUIntBig = libc::c_ulonglong;
#[doc = " Type of a constant null-terminated list of nul terminated strings."]
#[doc = " Seen as char** from C and const char* const* from C++"]
pub type CSLConstList = *mut *mut libc::c_char;
pub type GDALProgressFunc = ::std::option::Option<
unsafe extern "C" fn(
dfComplete: f64,
pszMessage: *const libc::c_char,
pProgressArg: *mut libc::c_void,
) -> libc::c_int,
>;
extern "C" {
pub fn GDALDummyProgress(
arg1: f64,
arg2: *const libc::c_char,
arg3: *mut libc::c_void,
) -> libc::c_int;
}
extern "C" {
pub fn GDALTermProgress(
arg1: f64,
arg2: *const libc::c_char,
arg3: *mut libc::c_void,
) -> libc::c_int;
}
extern "C" {
pub fn GDALScaledProgress(
arg1: f64,
arg2: *const libc::c_char,
arg3: *mut libc::c_void,
) -> libc::c_int;
}
extern "C" {
pub fn GDALCreateScaledProgress(
arg1: f64,
arg2: f64,
arg3: GDALProgressFunc,
arg4: *mut libc::c_void,
) -> *mut libc::c_void;
}
extern "C" {
pub fn GDALDestroyScaledProgress(arg1: *mut libc::c_void);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct stat {
pub st_dev: __dev_t,
pub st_ino: __ino_t,
pub st_nlink: __nlink_t,
pub st_mode: __mode_t,
pub st_uid: __uid_t,
pub st_gid: __gid_t,
pub __pad0: libc::c_int,
pub st_rdev: __dev_t,
pub st_size: __off_t,
pub st_blksize: __blksize_t,
pub st_blocks: __blkcnt_t,
pub st_atim: timespec,
pub st_mtim: timespec,
pub st_ctim: timespec,
pub __glibc_reserved: [__syscall_slong_t; 3usize],
}
#[test]
fn bindgen_test_layout_stat() {
assert_eq!(
::std::mem::size_of::<stat>(),
144usize,
concat!("Size of: ", stringify!(stat))
);
assert_eq!(
::std::mem::align_of::<stat>(),
8usize,
concat!("Alignment of ", stringify!(stat))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_dev as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_dev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_ino as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_nlink as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_nlink)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_mode as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_mode)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_uid as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_gid as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_gid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).__pad0 as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(__pad0)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_rdev as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_rdev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_size as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_blksize as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_blksize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_blocks as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_blocks)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_atim as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_atim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_mtim as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_mtim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).st_ctim as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(st_ctim)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<stat>())).__glibc_reserved as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(stat),
"::",
stringify!(__glibc_reserved)
)
);
}
extern "C" {
#[doc = " @cond Doxygen_Suppress"]
pub fn VSIFOpen(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut FILE;
}
extern "C" {
pub fn VSIFClose(arg1: *mut FILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFSeek(arg1: *mut FILE, arg2: libc::c_long, arg3: libc::c_int) -> libc::c_int;
}
extern "C" {
pub fn VSIFTell(arg1: *mut FILE) -> libc::c_long;
}
extern "C" {
pub fn VSIRewind(arg1: *mut FILE);
}
extern "C" {
pub fn VSIFFlush(arg1: *mut FILE);
}
extern "C" {
pub fn VSIFRead(arg1: *mut libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE) -> usize;
}
extern "C" {
pub fn VSIFWrite(arg1: *const libc::c_void, arg2: usize, arg3: usize, arg4: *mut FILE)
-> usize;
}
extern "C" {
pub fn VSIFGets(
arg1: *mut libc::c_char,
arg2: libc::c_int,
arg3: *mut FILE,
) -> *mut libc::c_char;
}
extern "C" {
pub fn VSIFPuts(arg1: *const libc::c_char, arg2: *mut FILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFPrintf(arg1: *mut FILE, arg2: *const libc::c_char, ...) -> libc::c_int;
}
extern "C" {
pub fn VSIFGetc(arg1: *mut FILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFPutc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
}
extern "C" {
pub fn VSIUngetc(arg1: libc::c_int, arg2: *mut FILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFEof(arg1: *mut FILE) -> libc::c_int;
}
#[doc = " @cond Doxygen_Suppress"]
pub type VSIStatBuf = stat;
extern "C" {
pub fn VSIStat(arg1: *const libc::c_char, arg2: *mut VSIStatBuf) -> libc::c_int;
}
#[doc = " Type for a file offset"]
pub type vsi_l_offset = GUIntBig;
#[doc = " Opaque type for a FILE that implements the VSIVirtualHandle API"]
pub type VSILFILE = FILE;
extern "C" {
pub fn VSIFOpenL(arg1: *const libc::c_char, arg2: *const libc::c_char) -> *mut VSILFILE;
}
extern "C" {
pub fn VSIFOpenExL(
arg1: *const libc::c_char,
arg2: *const libc::c_char,
arg3: libc::c_int,
) -> *mut VSILFILE;
}
extern "C" {
pub fn VSIFCloseL(arg1: *mut VSILFILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFSeekL(arg1: *mut VSILFILE, arg2: vsi_l_offset, arg3: libc::c_int) -> libc::c_int;
}
extern "C" {
pub fn VSIFTellL(arg1: *mut VSILFILE) -> vsi_l_offset;
}
extern "C" {
pub fn VSIRewindL(arg1: *mut VSILFILE);
}
extern "C" {
pub fn VSIFReadL(
arg1: *mut libc::c_void,
arg2: usize,
arg3: usize,
arg4: *mut VSILFILE,
) -> usize;
}
extern "C" {
pub fn VSIFReadMultiRangeL(
nRanges: libc::c_int,
ppData: *mut *mut libc::c_void,
panOffsets: *const vsi_l_offset,
panSizes: *const usize,
arg1: *mut VSILFILE,
) -> libc::c_int;
}
extern "C" {
pub fn VSIFWriteL(
arg1: *const libc::c_void,
arg2: usize,
arg3: usize,
arg4: *mut VSILFILE,
) -> usize;
}
extern "C" {
pub fn VSIFEofL(arg1: *mut VSILFILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFTruncateL(arg1: *mut VSILFILE, arg2: vsi_l_offset) -> libc::c_int;
}
extern "C" {
pub fn VSIFFlushL(arg1: *mut VSILFILE) -> libc::c_int;
}
extern "C" {
pub fn VSIFPrintfL(arg1: *mut VSILFILE, arg2: *const libc::c_char, ...) -> libc::c_int;
}
extern "C" {
pub fn VSIFPutcL(arg1: libc::c_int, arg2: *mut VSILFILE) -> libc::c_int;
}
pub mod VSIRangeStatus {
#[doc = " Range status"]
pub type Type = u32;
#[doc = "< Unknown"]
pub const VSI_RANGE_STATUS_UNKNOWN: Type = 0;
#[doc = "< Data present"]
pub const VSI_RANGE_STATUS_DATA: Type = 1;
#[doc = "< Hole"]
pub const VSI_RANGE_STATUS_HOLE: Type = 2;
}
extern "C" {
pub fn VSIFGetRangeStatusL(
fp: *mut VSILFILE,
nStart: vsi_l_offset,
nLength: vsi_l_offset,
) -> VSIRangeStatus::Type;
}
extern "C" {
pub fn VSIIngestFile(
fp: *mut VSILFILE,
pszFilename: *const libc::c_char,
ppabyRet: *mut *mut GByte,
pnSize: *mut vsi_l_offset,
nMaxSize: GIntBig,
) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct stat64 {
_unused: [u8; 0],
}
#[doc = " Type for VSIStatL()"]
pub type VSIStatBufL = stat64;
extern "C" {
pub fn VSIStatL(arg1: *const libc::c_char, arg2: *mut VSIStatBufL) -> libc::c_int;
}
extern "C" {
pub fn VSIStatExL(
pszFilename: *const libc::c_char,
psStatBuf: *mut VSIStatBufL,
nFlags: libc::c_int,
) -> libc::c_int;
}
extern "C" {
pub fn VSIIsCaseSensitiveFS(pszFilename: *const libc::c_char) -> libc::c_int;
}
extern "C" {
pub fn VSISupportsSparseFiles(pszPath: *const libc::c_char) -> libc::c_int;
}
extern "C" {
pub fn VSIHasOptimizedReadMultiRange(pszPath: *const libc::c_char) -> libc::c_int;
}
extern "C" {
pub fn VSIGetActualURL(pszFilename: *const libc::c_char) -> *const libc::c_char;
}
extern "C" {
pub fn VSIGetSignedURL(
pszFilename: *const libc::c_char,
papszOptions: CSLConstList,
) -> *mut libc::c_char;
}
extern "C" {
pub fn VSIGetFileSystemOptions(pszFilename: *const libc::c_char) -> *const libc::c_char;
}
extern "C" {
pub fn VSIGetFileSystemsPrefixes() -> *mut *mut libc::c_char;
}
extern "C" {
pub fn VSIFGetNativeFileDescriptorL(arg1: *mut VSILFILE) -> *mut libc::c_void;
}
extern "C" {
pub fn VSICalloc(arg1: usize, arg2: usize) -> *mut libc::c_void;
}
extern "C" {
pub fn VSIMalloc(arg1: usize) -> *mut libc::c_void;
}
extern "C" {
pub fn VSIFree(arg1: *mut libc::c_void);
}
extern "C" {
pub fn VSIRealloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void;
}
extern "C" {
pub fn VSIStrdup(arg1: *const libc::c_char) -> *mut libc::c_char;
}
extern "C" {
pub fn VSIMallocAligned(nAlignment: usize, nSize: usize) -> *mut libc::c_void;
}
extern "C" {
pub fn VSIMallocAlignedAuto(nSize: usize) -> *mut libc::c_void;
}
extern "C" {
pub fn VSIFreeAligned(ptr: *mut libc::c_void);
}