1#![allow(non_camel_case_types)]
2#![allow(non_upper_case_globals)]
3
4use libc::{c_int, c_long, c_uint, c_ulong, c_void, size_t};
5
6pub type slong = c_long;
9pub type ulong = c_ulong;
10pub type mp_limb_t = c_ulong;
11pub type mp_limb_signed_t = c_long;
12pub type mp_bitcnt_t = c_ulong;
13
14#[repr(C)]
15#[derive(Debug, Copy, Clone)]
16pub struct __mpz_struct {
17 pub _mp_alloc: c_int,
18 pub _mp_size: c_int,
19 pub _mp_d: *mut mp_limb_t,
20}
21
22pub type MP_INT = __mpz_struct;
23pub type mpz_t = [__mpz_struct; 1usize];
24pub type mp_ptr = *mut mp_limb_t;
25pub type mp_srcptr = *const mp_limb_t;
26pub type mp_size_t = c_long;
27pub type mp_exp_t = c_long;
28
29#[repr(C)]
30#[derive(Debug, Copy, Clone)]
31pub struct __mpq_struct {
32 pub _mp_num: __mpz_struct,
33 pub _mp_den: __mpz_struct,
34}
35
36pub type MP_RAT = __mpq_struct;
37pub type mpq_t = [__mpq_struct; 1usize];
38
39#[repr(C)]
40#[derive(Debug, Copy, Clone)]
41pub struct __mpf_struct {
42 pub _mp_prec: c_int,
43 pub _mp_size: c_int,
44 pub _mp_exp: mp_exp_t,
45 pub _mp_d: *mut mp_limb_t,
46}
47
48pub type mpf_t = [__mpf_struct; 1usize];
49pub type gmp_randalg_t = c_uint;
50pub const gmp_randalg_t_GMP_RAND_ALG_DEFAULT: gmp_randalg_t = 0;
51pub const gmp_randalg_t_GMP_RAND_ALG_LC: gmp_randalg_t = 0;
52
53#[repr(C)]
54#[derive(Copy, Clone)]
55pub union __gmp_randstate_struct__bindgen_ty_1 {
56 pub _mp_lc: *mut c_void,
57}
58
59#[repr(C)]
60#[derive(Copy, Clone)]
61pub struct __gmp_randstate_struct {
62 pub _mp_seed: mpz_t,
63 pub _mp_alg: gmp_randalg_t,
64 pub _mp_algdata: __gmp_randstate_struct__bindgen_ty_1,
65}
66
67pub type gmp_randstate_t = [__gmp_randstate_struct; 1usize];
68pub type mpz_srcptr = *const __mpz_struct;
69pub type mpz_ptr = *mut __mpz_struct;
70pub type mpf_srcptr = *const __mpf_struct;
71pub type mpf_ptr = *mut __mpf_struct;
72pub type mpq_srcptr = *const __mpq_struct;
73pub type mpq_ptr = *mut __mpq_struct;
74
75pub type mpfr_void = c_void;
78pub type mpfr_int = c_int;
79pub type mpfr_uint = c_uint;
80pub type mpfr_long = c_long;
81pub type mpfr_ulong = c_ulong;
82pub type mpfr_size_t = size_t;
83pub type mpfr_flags_t = c_uint;
84pub const mpfr_rnd_t_MPFR_RNDN: mpfr_rnd_t = 0;
85pub const mpfr_rnd_t_MPFR_RNDZ: mpfr_rnd_t = 1;
86pub const mpfr_rnd_t_MPFR_RNDU: mpfr_rnd_t = 2;
87pub const mpfr_rnd_t_MPFR_RNDD: mpfr_rnd_t = 3;
88pub const mpfr_rnd_t_MPFR_RNDA: mpfr_rnd_t = 4;
89pub const mpfr_rnd_t_MPFR_RNDF: mpfr_rnd_t = 5;
90pub const mpfr_rnd_t_MPFR_RNDNA: mpfr_rnd_t = -1;
91pub type mpfr_rnd_t = c_int;
92pub type mpfr_prec_t = c_long;
93pub type mpfr_uprec_t = c_ulong;
94pub type mpfr_sign_t = c_int;
95pub type mpfr_exp_t = c_long;
96pub type mpfr_uexp_t = c_ulong;
97
98#[repr(C)]
99#[derive(Debug, Copy, Clone)]
100pub struct __mpfr_struct {
101 pub _mpfr_prec: mpfr_prec_t,
102 pub _mpfr_sign: mpfr_sign_t,
103 pub _mpfr_exp: mpfr_exp_t,
104 pub _mpfr_d: *mut mp_limb_t,
105}
106
107pub type mpfr_t = [__mpfr_struct; 1usize];
108pub type mpfr_ptr = *mut __mpfr_struct;
109pub type mpfr_srcptr = *const __mpfr_struct;
110pub const mpfr_kind_t_MPFR_NAN_KIND: mpfr_kind_t = 0;
111pub const mpfr_kind_t_MPFR_INF_KIND: mpfr_kind_t = 1;
112pub const mpfr_kind_t_MPFR_ZERO_KIND: mpfr_kind_t = 2;
113pub const mpfr_kind_t_MPFR_REGULAR_KIND: mpfr_kind_t = 3;
114pub type mpfr_kind_t = c_uint;
115pub const mpfr_free_cache_t_MPFR_FREE_LOCAL_CACHE: mpfr_free_cache_t = 1;
116pub const mpfr_free_cache_t_MPFR_FREE_GLOBAL_CACHE: mpfr_free_cache_t = 2;
117pub type mpfr_free_cache_t = c_uint;