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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
/* automatically generated by rust-bindgen */

pub type __int8_t = ::libc::c_char;
pub type __uint8_t = ::libc::c_uchar;
pub type __int16_t = ::libc::c_short;
pub type __uint16_t = ::libc::c_ushort;
pub type __int32_t = ::libc::c_int;
pub type __uint32_t = ::libc::c_uint;
pub type __int64_t = ::libc::c_longlong;
pub type __uint64_t = ::libc::c_ulonglong;
pub type __darwin_intptr_t = ::libc::c_long;
pub type __darwin_natural_t = ::libc::c_uint;
pub type __darwin_ct_rune_t = ::libc::c_int;
#[repr(C)]
pub struct Union_Unnamed1 {
    pub data: [u64, ..16u],
}
impl Union_Unnamed1 {
    pub fn __mbstate8(&mut self) -> *mut [::libc::c_char, ..128u] {
        unsafe { ::std::mem::transmute(self) }
    }
    pub fn _mbstateL(&mut self) -> *mut ::libc::c_longlong {
        unsafe { ::std::mem::transmute(self) }
    }
}
pub type __mbstate_t = Union_Unnamed1;
pub type __darwin_mbstate_t = __mbstate_t;
pub type __darwin_ptrdiff_t = ::libc::c_long;
pub type __darwin_size_t = ::libc::c_ulong;
pub type __darwin_va_list = __builtin_va_list;
pub type __darwin_wchar_t = ::libc::c_int;
pub type __darwin_rune_t = __darwin_wchar_t;
pub type __darwin_wint_t = ::libc::c_int;
pub type __darwin_clock_t = ::libc::c_ulong;
pub type __darwin_socklen_t = __uint32_t;
pub type __darwin_ssize_t = ::libc::c_long;
pub type __darwin_time_t = ::libc::c_long;
pub type __darwin_blkcnt_t = __int64_t;
pub type __darwin_blksize_t = __int32_t;
pub type __darwin_dev_t = __int32_t;
pub type __darwin_fsblkcnt_t = ::libc::c_uint;
pub type __darwin_fsfilcnt_t = ::libc::c_uint;
pub type __darwin_gid_t = __uint32_t;
pub type __darwin_id_t = __uint32_t;
pub type __darwin_ino64_t = __uint64_t;
pub type __darwin_ino_t = __darwin_ino64_t;
pub type __darwin_mach_port_name_t = __darwin_natural_t;
pub type __darwin_mach_port_t = __darwin_mach_port_name_t;
pub type __darwin_mode_t = __uint16_t;
pub type __darwin_off_t = __int64_t;
pub type __darwin_pid_t = __int32_t;
pub type __darwin_sigset_t = __uint32_t;
pub type __darwin_suseconds_t = __int32_t;
pub type __darwin_uid_t = __uint32_t;
pub type __darwin_useconds_t = __uint32_t;
pub type __darwin_uuid_t = [::libc::c_uchar, ..16u];
pub type __darwin_uuid_string_t = [::libc::c_char, ..37u];
#[repr(C)]
pub struct Struct___darwin_pthread_handler_rec {
    pub __routine: ::std::option::Option<extern "C" fn
                                             (arg1: *mut ::libc::c_void)>,
    pub __arg: *mut ::libc::c_void,
    pub __next: *mut Struct___darwin_pthread_handler_rec,
}
#[repr(C)]
pub struct Struct__opaque_pthread_attr_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..56u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_cond_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..40u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_condattr_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..8u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_mutex_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..56u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_mutexattr_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..8u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_once_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..8u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_rwlock_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..192u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_rwlockattr_t {
    pub __sig: ::libc::c_long,
    pub __opaque: [::libc::c_char, ..16u],
}
#[repr(C)]
pub struct Struct__opaque_pthread_t {
    pub __sig: ::libc::c_long,
    pub __cleanup_stack: *mut Struct___darwin_pthread_handler_rec,
    pub __opaque: [::libc::c_char, ..8176u],
}
pub type __darwin_pthread_attr_t = Struct__opaque_pthread_attr_t;
pub type __darwin_pthread_cond_t = Struct__opaque_pthread_cond_t;
pub type __darwin_pthread_condattr_t = Struct__opaque_pthread_condattr_t;
pub type __darwin_pthread_key_t = ::libc::c_ulong;
pub type __darwin_pthread_mutex_t = Struct__opaque_pthread_mutex_t;
pub type __darwin_pthread_mutexattr_t = Struct__opaque_pthread_mutexattr_t;
pub type __darwin_pthread_once_t = Struct__opaque_pthread_once_t;
pub type __darwin_pthread_rwlock_t = Struct__opaque_pthread_rwlock_t;
pub type __darwin_pthread_rwlockattr_t = Struct__opaque_pthread_rwlockattr_t;
pub type __darwin_pthread_t = *mut Struct__opaque_pthread_t;
pub type size_t = __darwin_size_t;
pub type mode_t = __darwin_mode_t;
pub type off_t = __darwin_off_t;
pub type pid_t = __darwin_pid_t;
#[repr(C)]
pub struct Struct_flock {
    pub l_start: off_t,
    pub l_len: off_t,
    pub l_pid: pid_t,
    pub l_type: ::libc::c_short,
    pub l_whence: ::libc::c_short,
}
#[repr(C)]
pub struct Struct_timespec {
    pub tv_sec: __darwin_time_t,
    pub tv_nsec: ::libc::c_long,
}
#[repr(C)]
pub struct Struct_flocktimeout {
    pub fl: Struct_flock,
    pub timeout: Struct_timespec,
}
#[repr(C)]
pub struct Struct_radvisory {
    pub ra_offset: off_t,
    pub ra_count: ::libc::c_int,
}
#[repr(C)]
pub struct Struct_fcodeblobs {
    pub f_cd_hash: *mut ::libc::c_void,
    pub f_hash_size: size_t,
    pub f_cd_buffer: *mut ::libc::c_void,
    pub f_cd_size: size_t,
    pub f_out_size: *mut ::libc::c_uint,
    pub f_arch: ::libc::c_int,
    pub __padding: ::libc::c_int,
}
pub type fcodeblobs_t = Struct_fcodeblobs;
#[repr(C)]
pub struct Struct_fsignatures {
    pub fs_file_start: off_t,
    pub fs_blob_start: *mut ::libc::c_void,
    pub fs_blob_size: size_t,
}
pub type fsignatures_t = Struct_fsignatures;
#[repr(C)]
pub struct Struct_fstore {
    pub fst_flags: ::libc::c_uint,
    pub fst_posmode: ::libc::c_int,
    pub fst_offset: off_t,
    pub fst_length: off_t,
    pub fst_bytesalloc: off_t,
}
pub type fstore_t = Struct_fstore;
#[repr(C)]
pub struct Struct_fbootstraptransfer {
    pub fbt_offset: off_t,
    pub fbt_length: size_t,
    pub fbt_buffer: *mut ::libc::c_void,
}
pub type fbootstraptransfer_t = Struct_fbootstraptransfer;
#[repr(C)]
pub struct Struct_log2phys {
    pub l2p_flags: ::libc::c_uint,
    pub l2p_contigbytes: off_t,
    pub l2p_devoffset: off_t,
}
pub enum Struct__filesec { }
pub type filesec_t = *mut Struct__filesec;
pub type Enum_Unnamed2 = ::libc::c_uint;
pub const FILESEC_OWNER: ::libc::c_uint = 1;
pub const FILESEC_GROUP: ::libc::c_uint = 2;
pub const FILESEC_UUID: ::libc::c_uint = 3;
pub const FILESEC_MODE: ::libc::c_uint = 4;
pub const FILESEC_ACL: ::libc::c_uint = 5;
pub const FILESEC_GRPUUID: ::libc::c_uint = 6;
pub const FILESEC_ACL_RAW: ::libc::c_uint = 100;
pub const FILESEC_ACL_ALLOCSIZE: ::libc::c_uint = 101;
pub type filesec_property_t = Enum_Unnamed2;
pub type __darwin_nl_item = ::libc::c_int;
pub type __darwin_wctrans_t = ::libc::c_int;
pub type __darwin_wctype_t = __uint32_t;
pub type wchar_t = __darwin_wchar_t;
pub type int8_t = ::libc::c_char;
pub type int16_t = ::libc::c_short;
pub type int32_t = ::libc::c_int;
pub type int64_t = ::libc::c_longlong;
pub type uint8_t = ::libc::c_uchar;
pub type uint16_t = ::libc::c_ushort;
pub type uint32_t = ::libc::c_uint;
pub type uint64_t = ::libc::c_ulonglong;
pub type int_least8_t = int8_t;
pub type int_least16_t = int16_t;
pub type int_least32_t = int32_t;
pub type int_least64_t = int64_t;
pub type uint_least8_t = uint8_t;
pub type uint_least16_t = uint16_t;
pub type uint_least32_t = uint32_t;
pub type uint_least64_t = uint64_t;
pub type int_fast8_t = int8_t;
pub type int_fast16_t = int16_t;
pub type int_fast32_t = int32_t;
pub type int_fast64_t = int64_t;
pub type uint_fast8_t = uint8_t;
pub type uint_fast16_t = uint16_t;
pub type uint_fast32_t = uint32_t;
pub type uint_fast64_t = uint64_t;
pub type intptr_t = __darwin_intptr_t;
pub type uintptr_t = ::libc::c_ulong;
pub type intmax_t = ::libc::c_long;
pub type uintmax_t = ::libc::c_ulong;
#[repr(C)]
pub struct Struct_Unnamed3 {
    pub quot: intmax_t,
    pub rem: intmax_t,
}
pub type imaxdiv_t = Struct_Unnamed3;
pub type u_int8_t = ::libc::c_uchar;
pub type u_int16_t = ::libc::c_ushort;
pub type u_int32_t = ::libc::c_uint;
pub type u_int64_t = ::libc::c_ulonglong;
pub type register_t = int64_t;
pub type user_addr_t = u_int64_t;
pub type user_size_t = u_int64_t;
pub type user_ssize_t = int64_t;
pub type user_long_t = int64_t;
pub type user_ulong_t = u_int64_t;
pub type user_time_t = int64_t;
pub type user_off_t = int64_t;
pub type syscall_arg_t = u_int64_t;
pub type u_char = ::libc::c_uchar;
pub type u_short = ::libc::c_ushort;
pub type u_int = ::libc::c_uint;
pub type u_long = ::libc::c_ulong;
pub type ushort = ::libc::c_ushort;
pub type _uint = ::libc::c_uint;
pub type u_quad_t = u_int64_t;
pub type quad_t = int64_t;
pub type qaddr_t = *mut quad_t;
pub type caddr_t = *mut ::libc::c_char;
pub type daddr_t = int32_t;
pub type dev_t = __darwin_dev_t;
pub type fixpt_t = u_int32_t;
pub type blkcnt_t = __darwin_blkcnt_t;
pub type blksize_t = __darwin_blksize_t;
pub type gid_t = __darwin_gid_t;
pub type in_addr_t = __uint32_t;
pub type in_port_t = __uint16_t;
pub type ino_t = __darwin_ino_t;
pub type ino64_t = __darwin_ino64_t;
pub type key_t = __int32_t;
pub type nlink_t = __uint16_t;
pub type id_t = __darwin_id_t;
pub type segsz_t = int32_t;
pub type swblk_t = int32_t;
pub type uid_t = __darwin_uid_t;
pub type clock_t = __darwin_clock_t;
pub type ssize_t = __darwin_ssize_t;
pub type time_t = __darwin_time_t;
pub type useconds_t = __darwin_useconds_t;
pub type suseconds_t = __darwin_suseconds_t;
pub type rsize_t = __darwin_size_t;
pub type errno_t = ::libc::c_int;
#[repr(C)]
pub struct Struct_fd_set {
    pub fds_bits: [__int32_t, ..32u],
}
pub type fd_set = Struct_fd_set;
pub type fd_mask = __int32_t;
pub type pthread_attr_t = __darwin_pthread_attr_t;
pub type pthread_cond_t = __darwin_pthread_cond_t;
pub type pthread_condattr_t = __darwin_pthread_condattr_t;
pub type pthread_mutex_t = __darwin_pthread_mutex_t;
pub type pthread_mutexattr_t = __darwin_pthread_mutexattr_t;
pub type pthread_once_t = __darwin_pthread_once_t;
pub type pthread_rwlock_t = __darwin_pthread_rwlock_t;
pub type pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t;
pub type pthread_t = __darwin_pthread_t;
pub type pthread_key_t = __darwin_pthread_key_t;
pub type fsblkcnt_t = __darwin_fsblkcnt_t;
pub type fsfilcnt_t = __darwin_fsfilcnt_t;
#[repr(C)]
pub struct 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: *mut ::libc::c_char,
}
pub type va_list = __darwin_va_list;
pub type fpos_t = __darwin_off_t;
#[repr(C)]
pub struct Struct___sbuf {
    pub _base: *mut ::libc::c_uchar,
    pub _size: ::libc::c_int,
}
pub enum Struct___sFILEX { }
#[repr(C)]
pub struct Struct___sFILE {
    pub _p: *mut ::libc::c_uchar,
    pub _r: ::libc::c_int,
    pub _w: ::libc::c_int,
    pub _flags: ::libc::c_short,
    pub _file: ::libc::c_short,
    pub _bf: Struct___sbuf,
    pub _lbfsize: ::libc::c_int,
    pub _cookie: *mut ::libc::c_void,
    pub _close: ::std::option::Option<extern "C" fn(arg1: *mut ::libc::c_void)
                                          -> ::libc::c_int>,
    pub _read: ::std::option::Option<extern "C" fn
                                         (arg1: *mut ::libc::c_void,
                                          arg2: *mut ::libc::c_char,
                                          arg3: ::libc::c_int)
                                         -> ::libc::c_int>,
    pub _seek: ::std::option::Option<extern "C" fn
                                         (arg1: *mut ::libc::c_void,
                                          arg2: fpos_t, arg3: ::libc::c_int)
                                         -> fpos_t>,
    pub _write: ::std::option::Option<extern "C" fn
                                          (arg1: *mut ::libc::c_void,
                                           arg2: *const ::libc::c_char,
                                           arg3: ::libc::c_int)
                                          -> ::libc::c_int>,
    pub _ub: Struct___sbuf,
    pub _extra: *mut Struct___sFILEX,
    pub _ur: ::libc::c_int,
    pub _ubuf: [::libc::c_uchar, ..3u],
    pub _nbuf: [::libc::c_uchar, ..1u],
    pub _lb: Struct___sbuf,
    pub _blksize: ::libc::c_int,
    pub _offset: fpos_t,
}
pub type FILE = Struct___sFILE;
#[repr(C)]
pub struct Struct_Unnamed4 {
    pub dptr: *mut ::libc::c_char,
    pub dsize: ::libc::c_int,
}
pub type datum = Struct_Unnamed4;
#[repr(C)]
pub struct Struct_Unnamed5 {
    pub key: datum,
    pub val: datum,
}
pub type kvpair = Struct_Unnamed5;
#[repr(C)]
pub struct Struct_mdbm_iter {
    pub m_pageno: uint32_t,
    pub m_next: ::libc::c_int,
}
pub type MDBM_ITER = Struct_mdbm_iter;
pub enum Struct_mdbm { }
pub type MDBM = Struct_mdbm;
#[repr(C)]
pub struct Struct_mdbm_shake_data_v3 {
    pub page_num: uint32_t,
    pub page_begin: *const ::libc::c_char,
    pub page_end: *const ::libc::c_char,
    pub page_free_space: uint32_t,
    pub space_needed: uint32_t,
    pub page_num_items: uint32_t,
    pub reserved: uint32_t,
    pub page_items: *mut kvpair,
    pub page_item_sizes: *mut uint32_t,
    pub user_data: *mut ::libc::c_void,
}
pub type mdbm_shake_func_v3 =
    ::std::option::Option<extern "C" fn
                              (arg1: *mut MDBM, arg2: *const datum,
                               arg3: *const datum,
                               arg4: *mut Struct_mdbm_shake_data_v3)
                              -> ::libc::c_int>;
#[repr(C)]
pub struct Struct_mdbm_fetch_info {
    pub flags: uint32_t,
    pub cache_num_accesses: uint32_t,
    pub cache_access_time: uint32_t,
}
#[repr(C)]
pub struct Struct_mdbm_page_info {
    pub page_num: uint32_t,
    pub mapped_page_num: uint32_t,
    pub page_addr: intptr_t,
    pub page_size: uint32_t,
    pub page_bottom_of_data: uint32_t,
    pub page_free_space: uint32_t,
    pub page_active_entries: uint32_t,
    pub page_active_lob_entries: uint32_t,
    pub page_active_space: uint32_t,
    pub page_active_key_space: uint32_t,
    pub page_active_val_space: uint32_t,
    pub page_active_lob_space: uint32_t,
    pub page_overhead_space: uint32_t,
    pub page_deleted_entries: uint32_t,
    pub page_deleted_space: uint32_t,
    pub page_min_entry_size: uint32_t,
    pub page_max_entry_size: uint32_t,
    pub page_min_key_size: uint32_t,
    pub page_max_key_size: uint32_t,
    pub page_min_val_size: uint32_t,
    pub page_max_val_size: uint32_t,
    pub page_min_lob_size: uint32_t,
    pub page_max_lob_size: uint32_t,
}
pub type mdbm_page_info_t = Struct_mdbm_page_info;
#[repr(C)]
pub struct Struct_mdbm_entry_info {
    pub entry_flags: uint32_t,
    pub entry_index: uint32_t,
    pub entry_offset: uint32_t,
    pub key_offset: uint32_t,
    pub val_offset: uint32_t,
    pub lob_page_num: uint32_t,
    pub lob_num_pages: uint32_t,
    pub lob_page_addr: intptr_t,
    pub cache_num_accesses: uint32_t,
    pub cache_access_time: uint32_t,
    pub cache_priority: ::libc::c_float,
}
pub type mdbm_entry_info_t = Struct_mdbm_entry_info;
#[repr(C)]
pub struct Struct_mdbm_iterate_info {
    pub i_page: mdbm_page_info_t,
    pub i_entry: mdbm_entry_info_t,
}
pub type mdbm_iterate_info_t = Struct_mdbm_iterate_info;
pub type mdbm_iterate_func_t =
    ::std::option::Option<extern "C" fn
                              (arg1: *mut ::libc::c_void,
                               arg2: *const mdbm_iterate_info_t,
                               arg3: *const kvpair) -> ::libc::c_int>;
#[repr(C)]
pub struct Struct_mdbm_clean_data {
    pub user_data: *mut ::libc::c_void,
}
pub type mdbm_clean_func =
    ::std::option::Option<extern "C" fn
                              (arg1: *mut MDBM, arg2: *const datum,
                               arg3: *const datum,
                               arg4: *mut Struct_mdbm_clean_data,
                               arg5: *mut ::libc::c_int) -> ::libc::c_int>;
#[repr(C)]
pub struct Struct_mdbm_stats {
    pub s_size: uint32_t,
    pub s_page_size: uint32_t,
    pub s_page_count: uint32_t,
    pub s_pages_used: uint32_t,
    pub s_bytes_used: uint32_t,
    pub s_num_entries: uint32_t,
    pub s_min_level: uint32_t,
    pub s_max_level: uint32_t,
    pub s_large_page_size: uint32_t,
    pub s_large_page_count: uint32_t,
    pub s_large_threshold: uint32_t,
    pub s_large_pages_used: uint32_t,
    pub s_large_num_free_entries: uint32_t,
    pub s_large_max_free: uint32_t,
    pub s_large_num_entries: uint32_t,
    pub s_large_bytes_used: uint32_t,
    pub s_large_min_size: uint32_t,
    pub s_large_max_size: uint32_t,
    pub s_cache_mode: uint32_t,
}
pub type mdbm_stats_t = Struct_mdbm_stats;
pub type mdbm_counter_t = uint64_t;
pub type Enum_Unnamed6 = ::libc::c_uint;
pub const MDBM_STAT_TYPE_FETCH: ::libc::c_uint = 0;
pub const MDBM_STAT_TYPE_STORE: ::libc::c_uint = 1;
pub const MDBM_STAT_TYPE_DELETE: ::libc::c_uint = 2;
pub const MDBM_STAT_TYPE_MAX: ::libc::c_uint = 2;
pub type mdbm_stat_type = Enum_Unnamed6;
pub type mdbm_stat_cb =
    ::std::option::Option<extern "C" fn
                              (arg1: *mut MDBM, arg2: ::libc::c_int,
                               arg3: ::libc::c_int, arg4: uint64_t,
                               arg5: *mut ::libc::c_void)>;
#[repr(C)]
pub struct Struct_mdbm_db_info {
    pub db_page_size: uint32_t,
    pub db_num_pages: uint32_t,
    pub db_max_pages: uint32_t,
    pub db_num_dir_pages: uint32_t,
    pub db_dir_width: uint32_t,
    pub db_max_dir_shift: uint32_t,
    pub db_dir_min_level: uint32_t,
    pub db_dir_max_level: uint32_t,
    pub db_dir_num_nodes: uint32_t,
    pub db_hash_func: uint32_t,
    pub db_hash_funcname: *const ::libc::c_char,
    pub db_spill_size: uint32_t,
    pub db_cache_mode: uint32_t,
}
pub type mdbm_db_info_t = Struct_mdbm_db_info;
pub type Enum_Unnamed7 = ::libc::c_uint;
pub const MDBM_PTYPE_FREE: ::libc::c_uint = 0;
pub const MDBM_PTYPE_DATA: ::libc::c_uint = 1;
pub const MDBM_PTYPE_DIR: ::libc::c_uint = 2;
pub const MDBM_PTYPE_LOB: ::libc::c_uint = 3;
#[repr(C)]
pub struct Struct_mdbm_chunk_info {
    pub page_num: uint32_t,
    pub page_type: uint32_t,
    pub dir_page_num: uint32_t,
    pub num_pages: uint32_t,
    pub page_data: uint32_t,
    pub page_size: uint32_t,
    pub prev_num_pages: uint32_t,
    pub num_entries: uint32_t,
    pub used_space: uint32_t,
}
pub type mdbm_chunk_info_t = Struct_mdbm_chunk_info;
pub type mdbm_chunk_iterate_func_t =
    ::std::option::Option<extern "C" fn
                              (arg1: *mut ::libc::c_void,
                               arg2: *const mdbm_chunk_info_t)
                              -> ::libc::c_int>;
#[repr(C)]
pub struct Struct_mdbm_bucket_stat {
    pub num_pages: uint32_t,
    pub min_bytes: uint32_t,
    pub max_bytes: uint32_t,
    pub min_free_bytes: uint32_t,
    pub max_free_bytes: uint32_t,
    pub sum_entries: uint64_t,
    pub sum_bytes: uint64_t,
    pub sum_free_bytes: uint64_t,
}
pub type mdbm_bucket_stat_t = Struct_mdbm_bucket_stat;
#[repr(C)]
pub struct Struct_mdbm_stat_info {
    pub flags: ::libc::c_int,
    pub num_active_entries: uint64_t,
    pub num_active_lob_entries: uint64_t,
    pub sum_key_bytes: uint64_t,
    pub sum_lob_val_bytes: uint64_t,
    pub sum_normal_val_bytes: uint64_t,
    pub sum_overhead_bytes: uint64_t,
    pub min_entry_bytes: uint32_t,
    pub max_entry_bytes: uint32_t,
    pub min_key_bytes: uint32_t,
    pub max_key_bytes: uint32_t,
    pub min_val_bytes: uint32_t,
    pub max_val_bytes: uint32_t,
    pub min_lob_bytes: uint32_t,
    pub max_lob_bytes: uint32_t,
    pub max_page_used_space: uint32_t,
    pub max_data_pages: uint32_t,
    pub num_free_pages: uint32_t,
    pub num_active_pages: uint32_t,
    pub num_normal_pages: uint32_t,
    pub num_oversized_pages: uint32_t,
    pub num_lob_pages: uint32_t,
    pub buckets: [mdbm_bucket_stat_t, ..21u],
    pub max_page_entries: uint32_t,
    pub min_page_entries: uint32_t,
}
pub type mdbm_stat_info_t = Struct_mdbm_stat_info;
#[repr(C)]
pub struct Struct_mdbm_window_stats {
    pub w_num_reused: uint64_t,
    pub w_num_remapped: uint64_t,
    pub w_window_size: uint32_t,
    pub w_max_window_used: uint32_t,
}
pub type mdbm_window_stats_t = Struct_mdbm_window_stats;
#[repr(C)]
pub struct Struct_mdbm_bsops {
    pub bs_init: ::std::option::Option<extern "C" fn
                                           (arg1: *mut MDBM,
                                            arg2: *const ::libc::c_char,
                                            arg3: *mut ::libc::c_void,
                                            arg4: ::libc::c_int)
                                           -> *mut ::libc::c_void>,
    pub bs_term: ::std::option::Option<extern "C" fn
                                           (arg1: *mut ::libc::c_void,
                                            arg2: ::libc::c_int)
                                           -> ::libc::c_int>,
    pub bs_lock: ::std::option::Option<extern "C" fn
                                           (arg1: *mut ::libc::c_void,
                                            arg2: *const datum,
                                            arg3: ::libc::c_int)
                                           -> ::libc::c_int>,
    pub bs_unlock: ::std::option::Option<extern "C" fn
                                             (arg1: *mut ::libc::c_void,
                                              arg2: *const datum)
                                             -> ::libc::c_int>,
    pub bs_fetch: ::std::option::Option<extern "C" fn
                                            (arg1: *mut ::libc::c_void,
                                             arg2: *const datum,
                                             arg3: *mut datum,
                                             arg4: *mut datum,
                                             arg5: ::libc::c_int)
                                            -> ::libc::c_int>,
    pub bs_store: ::std::option::Option<extern "C" fn
                                            (arg1: *mut ::libc::c_void,
                                             arg2: *const datum,
                                             arg3: *const datum,
                                             arg4: ::libc::c_int)
                                            -> ::libc::c_int>,
    pub bs_delete: ::std::option::Option<extern "C" fn
                                             (arg1: *mut ::libc::c_void,
                                              arg2: *const datum,
                                              arg3: ::libc::c_int)
                                             -> ::libc::c_int>,
    pub bs_dup: ::std::option::Option<extern "C" fn
                                          (arg1: *mut MDBM, arg2: *mut MDBM,
                                           arg3: *mut ::libc::c_void)
                                          -> *mut ::libc::c_void>,
}
pub type mdbm_bsops_t = Struct_mdbm_bsops;
pub type mdbm_hash_t =
    ::std::option::Option<extern "C" fn
                              (arg1: *const uint8_t, arg2: ::libc::c_int)>;
pub type mdbm_hashval_t = uint32_t;
#[link(name = "mdbm")]
#[link(name = "stdc++")]
extern "C" {
    pub static mut tzname: *mut *mut ::libc::c_char;
    pub static mut getdate_err: ::libc::c_int;
    pub static mut timezone: ::libc::c_long;
    pub static mut daylight: ::libc::c_int;
    pub static mut __stdinp: *mut FILE;
    pub static mut __stdoutp: *mut FILE;
    pub static mut __stderrp: *mut FILE;
    pub static sys_nerr: ::libc::c_int;
    pub static mut sys_errlist: *const *const ::libc::c_char;
    pub static mut mdbm_hash_funcs: *mut mdbm_hash_t;
}
#[link(name = "mdbm")]
#[link(name = "stdc++")]
extern "C" {
    pub fn open(arg1: *const ::libc::c_char, arg2: ::libc::c_int, ...)
     -> ::libc::c_int;
    pub fn openat(arg1: ::libc::c_int, arg2: *const ::libc::c_char,
                  arg3: ::libc::c_int, ...) -> ::libc::c_int;
    pub fn creat(arg1: *const ::libc::c_char, arg2: mode_t) -> ::libc::c_int;
    pub fn fcntl(arg1: ::libc::c_int, arg2: ::libc::c_int, ...)
     -> ::libc::c_int;
    pub fn openx_np(arg1: *const ::libc::c_char, arg2: ::libc::c_int,
                    arg3: filesec_t) -> ::libc::c_int;
    pub fn open_dprotected_np(arg1: *const ::libc::c_char,
                              arg2: ::libc::c_int, arg3: ::libc::c_int,
                              arg4: ::libc::c_int, ...) -> ::libc::c_int;
    pub fn flock(arg1: ::libc::c_int, arg2: ::libc::c_int) -> ::libc::c_int;
    pub fn filesec_init() -> filesec_t;
    pub fn filesec_dup(arg1: filesec_t) -> filesec_t;
    pub fn filesec_free(arg1: filesec_t);
    pub fn filesec_get_property(arg1: filesec_t, arg2: filesec_property_t,
                                arg3: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn filesec_query_property(arg1: filesec_t, arg2: filesec_property_t,
                                  arg3: *mut ::libc::c_int) -> ::libc::c_int;
    pub fn filesec_set_property(arg1: filesec_t, arg2: filesec_property_t,
                                arg3: *const ::libc::c_void) -> ::libc::c_int;
    pub fn filesec_unset_property(arg1: filesec_t, arg2: filesec_property_t)
     -> ::libc::c_int;
    pub fn imaxabs(j: intmax_t) -> intmax_t;
    pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t;
    pub fn strtoimax(__nptr: *const ::libc::c_char,
                     __endptr: *mut *mut ::libc::c_char,
                     __base: ::libc::c_int) -> intmax_t;
    pub fn strtoumax(__nptr: *const ::libc::c_char,
                     __endptr: *mut *mut ::libc::c_char,
                     __base: ::libc::c_int) -> uintmax_t;
    pub fn wcstoimax(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t,
                     __base: ::libc::c_int) -> intmax_t;
    pub fn wcstoumax(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t,
                     __base: ::libc::c_int) -> uintmax_t;
    pub fn asctime(arg1: *const Struct_tm) -> *mut ::libc::c_char;
    pub fn clock() -> clock_t;
    pub fn ctime(arg1: *const time_t) -> *mut ::libc::c_char;
    pub fn difftime(arg1: time_t, arg2: time_t) -> ::libc::c_double;
    pub fn getdate(arg1: *const ::libc::c_char) -> *mut Struct_tm;
    pub fn gmtime(arg1: *const time_t) -> *mut Struct_tm;
    pub fn localtime(arg1: *const time_t) -> *mut Struct_tm;
    pub fn mktime(arg1: *mut Struct_tm) -> time_t;
    pub fn strftime(arg1: *mut ::libc::c_char, arg2: size_t,
                    arg3: *const ::libc::c_char, arg4: *const Struct_tm)
     -> size_t;
    pub fn strptime(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char,
                    arg3: *mut Struct_tm) -> *mut ::libc::c_char;
    pub fn time(arg1: *mut time_t) -> time_t;
    pub fn tzset();
    pub fn asctime_r(arg1: *const Struct_tm, arg2: *mut ::libc::c_char)
     -> *mut ::libc::c_char;
    pub fn ctime_r(arg1: *const time_t, arg2: *mut ::libc::c_char)
     -> *mut ::libc::c_char;
    pub fn gmtime_r(arg1: *const time_t, arg2: *mut Struct_tm)
     -> *mut Struct_tm;
    pub fn localtime_r(arg1: *const time_t, arg2: *mut Struct_tm)
     -> *mut Struct_tm;
    pub fn posix2time(arg1: time_t) -> time_t;
    pub fn tzsetwall();
    pub fn time2posix(arg1: time_t) -> time_t;
    pub fn timelocal(arg1: *mut Struct_tm) -> time_t;
    pub fn timegm(arg1: *mut Struct_tm) -> time_t;
    pub fn nanosleep(arg1: *const Struct_timespec, arg2: *mut Struct_timespec)
     -> ::libc::c_int;
    pub fn renameat(arg1: ::libc::c_int, arg2: *const ::libc::c_char,
                    arg3: ::libc::c_int, arg4: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn clearerr(arg1: *mut FILE);
    pub fn fclose(arg1: *mut FILE) -> ::libc::c_int;
    pub fn feof(arg1: *mut FILE) -> ::libc::c_int;
    pub fn ferror(arg1: *mut FILE) -> ::libc::c_int;
    pub fn fflush(arg1: *mut FILE) -> ::libc::c_int;
    pub fn fgetc(arg1: *mut FILE) -> ::libc::c_int;
    pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> ::libc::c_int;
    pub fn fgets(arg1: *mut ::libc::c_char, arg2: ::libc::c_int,
                 arg3: *mut FILE) -> *mut ::libc::c_char;
    pub fn fopen(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char)
     -> *mut FILE;
    pub fn fprintf(arg1: *mut FILE, arg2: *const ::libc::c_char, ...)
     -> ::libc::c_int;
    pub fn fputc(arg1: ::libc::c_int, arg2: *mut FILE) -> ::libc::c_int;
    pub fn fputs(arg1: *const ::libc::c_char, arg2: *mut FILE)
     -> ::libc::c_int;
    pub fn fread(arg1: *mut ::libc::c_void, arg2: size_t, arg3: size_t,
                 arg4: *mut FILE) -> size_t;
    pub fn freopen(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char,
                   arg3: *mut FILE) -> *mut FILE;
    pub fn fscanf(arg1: *mut FILE, arg2: *const ::libc::c_char, ...)
     -> ::libc::c_int;
    pub fn fseek(arg1: *mut FILE, arg2: ::libc::c_long, arg3: ::libc::c_int)
     -> ::libc::c_int;
    pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> ::libc::c_int;
    pub fn ftell(arg1: *mut FILE) -> ::libc::c_long;
    pub fn fwrite(arg1: *const ::libc::c_void, arg2: size_t, arg3: size_t,
                  arg4: *mut FILE) -> size_t;
    pub fn getc(arg1: *mut FILE) -> ::libc::c_int;
    pub fn getchar() -> ::libc::c_int;
    pub fn gets(arg1: *mut ::libc::c_char) -> *mut ::libc::c_char;
    pub fn perror(arg1: *const ::libc::c_char);
    pub fn printf(arg1: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn putc(arg1: ::libc::c_int, arg2: *mut FILE) -> ::libc::c_int;
    pub fn putchar(arg1: ::libc::c_int) -> ::libc::c_int;
    pub fn puts(arg1: *const ::libc::c_char) -> ::libc::c_int;
    pub fn remove(arg1: *const ::libc::c_char) -> ::libc::c_int;
    pub fn rename(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn rewind(arg1: *mut FILE);
    pub fn scanf(arg1: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn setbuf(arg1: *mut FILE, arg2: *mut ::libc::c_char);
    pub fn setvbuf(arg1: *mut FILE, arg2: *mut ::libc::c_char,
                   arg3: ::libc::c_int, arg4: size_t) -> ::libc::c_int;
    pub fn sprintf(arg1: *mut ::libc::c_char,
                   arg2: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn sscanf(arg1: *const ::libc::c_char,
                  arg2: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn tmpfile() -> *mut FILE;
    pub fn tmpnam(arg1: *mut ::libc::c_char) -> *mut ::libc::c_char;
    pub fn ungetc(arg1: ::libc::c_int, arg2: *mut FILE) -> ::libc::c_int;
    pub fn vfprintf(arg1: *mut FILE, arg2: *const ::libc::c_char,
                    arg3: va_list) -> ::libc::c_int;
    pub fn vprintf(arg1: *const ::libc::c_char, arg2: va_list)
     -> ::libc::c_int;
    pub fn vsprintf(arg1: *mut ::libc::c_char, arg2: *const ::libc::c_char,
                    arg3: va_list) -> ::libc::c_int;
    pub fn ctermid(arg1: *mut ::libc::c_char) -> *mut ::libc::c_char;
    pub fn fdopen(arg1: ::libc::c_int, arg2: *const ::libc::c_char)
     -> *mut FILE;
    pub fn fileno(arg1: *mut FILE) -> ::libc::c_int;
    pub fn pclose(arg1: *mut FILE) -> ::libc::c_int;
    pub fn popen(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char)
     -> *mut FILE;
    pub fn __srget(arg1: *mut FILE) -> ::libc::c_int;
    pub fn __svfscanf(arg1: *mut FILE, arg2: *const ::libc::c_char,
                      arg3: va_list) -> ::libc::c_int;
    pub fn __swbuf(arg1: ::libc::c_int, arg2: *mut FILE) -> ::libc::c_int;
    pub fn __sputc(_c: ::libc::c_int, _p: *mut FILE) -> ::libc::c_int;
    pub fn flockfile(arg1: *mut FILE);
    pub fn ftrylockfile(arg1: *mut FILE) -> ::libc::c_int;
    pub fn funlockfile(arg1: *mut FILE);
    pub fn getc_unlocked(arg1: *mut FILE) -> ::libc::c_int;
    pub fn getchar_unlocked() -> ::libc::c_int;
    pub fn putc_unlocked(arg1: ::libc::c_int, arg2: *mut FILE)
     -> ::libc::c_int;
    pub fn putchar_unlocked(arg1: ::libc::c_int) -> ::libc::c_int;
    pub fn getw(arg1: *mut FILE) -> ::libc::c_int;
    pub fn putw(arg1: ::libc::c_int, arg2: *mut FILE) -> ::libc::c_int;
    pub fn tempnam(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char)
     -> *mut ::libc::c_char;
    pub fn fseeko(arg1: *mut FILE, arg2: off_t, arg3: ::libc::c_int)
     -> ::libc::c_int;
    pub fn ftello(arg1: *mut FILE) -> off_t;
    pub fn snprintf(arg1: *mut ::libc::c_char, arg2: size_t,
                    arg3: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn vfscanf(arg1: *mut FILE, arg2: *const ::libc::c_char,
                   arg3: va_list) -> ::libc::c_int;
    pub fn vscanf(arg1: *const ::libc::c_char, arg2: va_list)
     -> ::libc::c_int;
    pub fn vsnprintf(arg1: *mut ::libc::c_char, arg2: size_t,
                     arg3: *const ::libc::c_char, arg4: va_list)
     -> ::libc::c_int;
    pub fn vsscanf(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char,
                   arg3: va_list) -> ::libc::c_int;
    pub fn dprintf(arg1: ::libc::c_int, arg2: *const ::libc::c_char, ...)
     -> ::libc::c_int;
    pub fn vdprintf(arg1: ::libc::c_int, arg2: *const ::libc::c_char,
                    arg3: va_list) -> ::libc::c_int;
    pub fn getdelim(arg1: *mut *mut ::libc::c_char, arg2: *mut size_t,
                    arg3: ::libc::c_int, arg4: *mut FILE) -> ssize_t;
    pub fn getline(arg1: *mut *mut ::libc::c_char, arg2: *mut size_t,
                   arg3: *mut FILE) -> ssize_t;
    pub fn asprintf(arg1: *mut *mut ::libc::c_char,
                    arg2: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn ctermid_r(arg1: *mut ::libc::c_char) -> *mut ::libc::c_char;
    pub fn fgetln(arg1: *mut FILE, arg2: *mut size_t) -> *mut ::libc::c_char;
    pub fn fmtcheck(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char)
     -> *const ::libc::c_char;
    pub fn fpurge(arg1: *mut FILE) -> ::libc::c_int;
    pub fn setbuffer(arg1: *mut FILE, arg2: *mut ::libc::c_char,
                     arg3: ::libc::c_int);
    pub fn setlinebuf(arg1: *mut FILE) -> ::libc::c_int;
    pub fn vasprintf(arg1: *mut *mut ::libc::c_char,
                     arg2: *const ::libc::c_char, arg3: va_list)
     -> ::libc::c_int;
    pub fn zopen(arg1: *const ::libc::c_char, arg2: *const ::libc::c_char,
                 arg3: ::libc::c_int) -> *mut FILE;
    pub fn funopen(arg1: *const ::libc::c_void,
                   arg2:
                       ::std::option::Option<extern "C" fn
                                                 (arg1: *mut ::libc::c_void,
                                                  arg2: *mut ::libc::c_char,
                                                  arg3: ::libc::c_int)
                                                 -> ::libc::c_int>,
                   arg3:
                       ::std::option::Option<extern "C" fn
                                                 (arg1: *mut ::libc::c_void,
                                                  arg2: *const ::libc::c_char,
                                                  arg3: ::libc::c_int)
                                                 -> ::libc::c_int>,
                   arg4:
                       ::std::option::Option<extern "C" fn
                                                 (arg1: *mut ::libc::c_void,
                                                  arg2: fpos_t,
                                                  arg3: ::libc::c_int)
                                                 -> fpos_t>,
                   arg5:
                       ::std::option::Option<extern "C" fn
                                                 (arg1: *mut ::libc::c_void)
                                                 -> ::libc::c_int>)
     -> *mut FILE;
    pub fn __sprintf_chk(arg1: *mut ::libc::c_char, arg2: ::libc::c_int,
                         arg3: size_t, arg4: *const ::libc::c_char, ...)
     -> ::libc::c_int;
    pub fn __snprintf_chk(arg1: *mut ::libc::c_char, arg2: size_t,
                          arg3: ::libc::c_int, arg4: size_t,
                          arg5: *const ::libc::c_char, ...) -> ::libc::c_int;
    pub fn __vsprintf_chk(arg1: *mut ::libc::c_char, arg2: ::libc::c_int,
                          arg3: size_t, arg4: *const ::libc::c_char,
                          arg5: va_list) -> ::libc::c_int;
    pub fn __vsnprintf_chk(arg1: *mut ::libc::c_char, arg2: size_t,
                           arg3: ::libc::c_int, arg4: size_t,
                           arg5: *const ::libc::c_char, arg6: va_list)
     -> ::libc::c_int;
    pub fn mdbm_open(file: *const ::libc::c_char, flags: ::libc::c_int,
                     mode: ::libc::c_int, psize: ::libc::c_int,
                     presize: ::libc::c_int) -> *mut MDBM;
    pub fn mdbm_close(db: *mut MDBM);
    pub fn mdbm_close_fd(db: *mut MDBM);
    pub fn mdbm_dup_handle(db: *mut MDBM, flags: ::libc::c_int) -> *mut MDBM;
    pub fn mdbm_sync(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_fsync(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_replace_db(db: *mut MDBM, newfile: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn mdbm_replace_file(oldfile: *const ::libc::c_char,
                             newfile: *const ::libc::c_char) -> ::libc::c_int;
    pub fn mdbm_replace_backing_store(cache: *mut MDBM,
                                      newfile: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn mdbm_pre_split(db: *mut MDBM, N: uint32_t) -> ::libc::c_int;
    pub fn mdbm_fcopy(db: *mut MDBM, fd: ::libc::c_int, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_save(db: *mut MDBM, file: *const ::libc::c_char,
                     flags: ::libc::c_int, mode: ::libc::c_int,
                     compressionLevel: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_restore(db: *mut MDBM, file: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn mdbm_stat_header(db: *mut MDBM);
    pub fn mdbm_get_hash(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_set_hash(db: *mut MDBM, hashid: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_sethash(db: *mut MDBM, hashid: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_setspillsize(db: *mut MDBM, size: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_get_alignment(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_set_alignment(db: *mut MDBM, align: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_get_limit_size(db: *mut MDBM) -> uint64_t;
    pub fn mdbm_limit_size_v3(db: *mut MDBM, max_page: uint32_t,
                              shake: mdbm_shake_func_v3,
                              user: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn mdbm_limit_dir_size(db: *mut MDBM, pages: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_get_version(db: *mut MDBM) -> uint32_t;
    pub fn mdbm_get_size(db: *mut MDBM) -> uint64_t;
    pub fn mdbm_get_page_size(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_get_magic_number(db: *mut MDBM, magic: *mut uint32_t)
     -> ::libc::c_int;
    pub fn mdbm_set_window_size(db: *mut MDBM, wsize: size_t)
     -> ::libc::c_int;
    pub fn mdbm_fetch(db: *mut MDBM, key: datum) -> datum;
    pub fn mdbm_fetch_r(db: *mut MDBM, key: *mut datum, val: *mut datum,
                        iter: *mut MDBM_ITER) -> ::libc::c_int;
    pub fn mdbm_fetch_buf(db: *mut MDBM, key: *mut datum, val: *mut datum,
                          buf: *mut datum, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_fetch_dup_r(db: *mut MDBM, key: *mut datum, val: *mut datum,
                            iter: *mut MDBM_ITER) -> ::libc::c_int;
    pub fn mdbm_fetch_str(db: *mut MDBM, key: *const ::libc::c_char)
     -> *mut ::libc::c_char;
    pub fn mdbm_fetch_info(db: *mut MDBM, key: *mut datum, val: *mut datum,
                           buf: *mut datum, info: *mut Struct_mdbm_fetch_info,
                           iter: *mut MDBM_ITER) -> ::libc::c_int;
    pub fn mdbm_delete(db: *mut MDBM, key: datum) -> ::libc::c_int;
    pub fn mdbm_delete_r(db: *mut MDBM, iter: *mut MDBM_ITER)
     -> ::libc::c_int;
    pub fn mdbm_delete_str(db: *mut MDBM, key: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn mdbm_store(db: *mut MDBM, key: datum, val: datum,
                      flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_store_r(db: *mut MDBM, key: *mut datum, val: *mut datum,
                        flags: ::libc::c_int, iter: *mut MDBM_ITER)
     -> ::libc::c_int;
    pub fn mdbm_store_str(db: *mut MDBM, key: *const ::libc::c_char,
                          val: *const ::libc::c_char, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_first(db: *mut MDBM) -> kvpair;
    pub fn mdbm_first_r(db: *mut MDBM, iter: *mut MDBM_ITER) -> kvpair;
    pub fn mdbm_next(db: *mut MDBM) -> kvpair;
    pub fn mdbm_next_r(db: *mut MDBM, iter: *mut MDBM_ITER) -> kvpair;
    pub fn mdbm_firstkey(db: *mut MDBM) -> datum;
    pub fn mdbm_firstkey_r(db: *mut MDBM, iter: *mut MDBM_ITER) -> datum;
    pub fn mdbm_nextkey(db: *mut MDBM) -> datum;
    pub fn mdbm_nextkey_r(db: *mut MDBM, iter: *mut MDBM_ITER) -> datum;
    pub fn mdbm_iterate(db: *mut MDBM, pagenum: ::libc::c_int,
                        func: mdbm_iterate_func_t, flags: ::libc::c_int,
                        user: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn mdbm_islocked(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_isowned(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_get_lockmode(db: *mut MDBM) -> uint32_t;
    pub fn mdbm_lock(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_unlock(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_trylock(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_plock(db: *mut MDBM, key: *const datum, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_punlock(db: *mut MDBM, key: *const datum,
                        flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_tryplock(db: *mut MDBM, key: *const datum,
                         flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_lock_shared(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_trylock_shared(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_lock_smart(db: *mut MDBM, key: *const datum,
                           flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_trylock_smart(db: *mut MDBM, key: *const datum,
                              flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_unlock_smart(db: *mut MDBM, key: *const datum,
                             flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_lock_reset(dbfilename: *const ::libc::c_char,
                           flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_delete_lockfiles(dbname: *const ::libc::c_char)
     -> ::libc::c_int;
    pub fn mdbm_compress_tree(db: *mut MDBM);
    pub fn mdbm_truncate(db: *mut MDBM);
    pub fn mdbm_prune(db: *mut MDBM,
                      prune:
                          ::std::option::Option<extern "C" fn
                                                    (arg1: *mut MDBM,
                                                     arg2: datum, arg3: datum,
                                                     arg4:
                                                         *mut ::libc::c_void)
                                                    -> ::libc::c_int>,
                      param: *mut ::libc::c_void);
    pub fn mdbm_purge(db: *mut MDBM);
    pub fn mdbm_set_cleanfunc(db: *mut MDBM, func: mdbm_clean_func,
                              data: *mut ::libc::c_void) -> ::libc::c_int;
    pub fn mdbm_clean(db: *mut MDBM, pagenum: ::libc::c_int,
                      flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_check(db: *mut MDBM, level: ::libc::c_int,
                      verbose: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_chk_error(db: *mut MDBM, pagenum: ::libc::c_int,
                          mapped_pagenum: ::libc::c_int,
                          index: ::libc::c_int);
    pub fn mdbm_chk_page(db: *mut MDBM, pagenum: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_chk_all_page(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_protect(db: *mut MDBM, protect: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_dump_all_page(db: *mut MDBM);
    pub fn mdbm_dump_page(db: *mut MDBM, pno: ::libc::c_int);
    pub fn mdbm_get_stat_counter(db: *mut MDBM, _type: mdbm_stat_type,
                                 value: *mut mdbm_counter_t) -> ::libc::c_int;
    pub fn mdbm_get_stat_time(db: *mut MDBM, _type: mdbm_stat_type,
                              value: *mut time_t) -> ::libc::c_int;
    pub fn mdbm_reset_stat_operations(db: *mut MDBM);
    pub fn mdbm_enable_stat_operations(db: *mut MDBM, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_set_stat_time_func(db: *mut MDBM, flags: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_get_stat_name(tag: ::libc::c_int) -> *const ::libc::c_char;
    pub fn mdbm_set_stats_func(db: *mut MDBM, flags: ::libc::c_int,
                               cb: mdbm_stat_cb, user: *mut ::libc::c_void)
     -> ::libc::c_int;
    pub fn mdbm_stat_all_page(db: *mut MDBM);
    pub fn mdbm_get_stats(db: *mut MDBM, s: *mut mdbm_stats_t,
                          stats_size: size_t) -> ::libc::c_int;
    pub fn mdbm_get_db_info(db: *mut MDBM, info: *mut mdbm_db_info_t)
     -> ::libc::c_int;
    pub fn mdbm_chunk_iterate(db: *mut MDBM, func: mdbm_chunk_iterate_func_t,
                              flags: ::libc::c_int, user: *mut ::libc::c_void)
     -> ::libc::c_int;
    pub fn mdbm_get_db_stats(db: *mut MDBM, info: *mut mdbm_db_info_t,
                             stats: *mut mdbm_stat_info_t,
                             flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_get_window_stats(db: *mut MDBM,
                                 stats: *mut mdbm_window_stats_t,
                                 s_size: size_t) -> ::libc::c_int;
    pub fn mdbm_count_records(db: *mut MDBM) -> uint64_t;
    pub fn mdbm_count_pages(db: *mut MDBM) -> uint32_t;
    pub fn mdbm_set_cachemode(db: *mut MDBM, cachemode: ::libc::c_int)
     -> ::libc::c_int;
    pub fn mdbm_get_cachemode(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_get_cachemode_name(cachemode: ::libc::c_int)
     -> *const ::libc::c_char;
    pub fn mdbm_set_backingstore(cachedb: *mut MDBM,
                                 bsops: *const mdbm_bsops_t,
                                 opt: *mut ::libc::c_void,
                                 flags: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_cdbdump_to_file(kv: kvpair, fp: *mut FILE) -> ::libc::c_int;
    pub fn mdbm_cdbdump_trailer_and_close(fp: *mut FILE) -> ::libc::c_int;
    pub fn mdbm_cdbdump_add_record(kv: kvpair, datasize: *mut uint32_t,
                                   bufptr: *mut *mut ::libc::c_char,
                                   bufsize: *mut uint32_t,
                                   buf_offset: uint32_t) -> ::libc::c_int;
    pub fn mdbm_dbdump_to_file(kv: kvpair, fp: *mut FILE) -> ::libc::c_int;
    pub fn mdbm_dbdump_trailer_and_close(fp: *mut FILE) -> ::libc::c_int;
    pub fn mdbm_dbdump_add_record(kv: kvpair, datasize: *mut uint32_t,
                                  bufptr: *mut *mut ::libc::c_char,
                                  bufsize: *mut uint32_t,
                                  buf_offset: uint32_t) -> ::libc::c_int;
    pub fn mdbm_dbdump_export_header(db: *mut MDBM, fp: *mut FILE)
     -> ::libc::c_int;
    pub fn mdbm_dbdump_import_header(fp: *mut FILE,
                                     pgsize: *mut ::libc::c_int,
                                     pgcount: *mut ::libc::c_int,
                                     large: *mut ::libc::c_int,
                                     lineno: *mut uint32_t) -> ::libc::c_int;
    pub fn mdbm_dbdump_import(db: *mut MDBM, fp: *mut FILE,
                              input_file: *const ::libc::c_char,
                              store_flag: ::libc::c_int,
                              lineno: *mut uint32_t) -> ::libc::c_int;
    pub fn mdbm_cdbdump_import(db: *mut MDBM, fp: *mut FILE,
                               input_file: *const ::libc::c_char,
                               store_flag: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_get_errno(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_get_hash_value(key: datum, hashFunctionCode: ::libc::c_int,
                               hashValue: *mut uint32_t) -> ::libc::c_int;
    pub fn mdbm_get_page(db: *mut MDBM, key: *const datum) -> uint32_t;
    pub fn mdbm_preload(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_check_residency(db: *mut MDBM, pgs_in: *mut uint32_t,
                                pgs_out: *mut uint32_t) -> ::libc::c_int;
    pub fn mdbm_sparsify_file(filename: *const ::libc::c_char,
                              blocksize: ::libc::c_int) -> ::libc::c_int;
    pub fn mdbm_lock_pages(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_unlock_pages(db: *mut MDBM) -> ::libc::c_int;
    pub fn mdbm_lock_dump(db: *mut MDBM);
    pub fn mdbm_hash(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash0(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash1(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash2(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash3(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash4(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash5(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
    pub fn mdbm_hash6(arg1: *mut ::libc::c_uchar, arg2: ::libc::c_int)
     -> uint32_t;
}