3
3
#[ forbid( deprecated_mode) ] ;
4
4
#[ forbid( deprecated_pattern) ] ;
5
5
6
- export c_float;
7
- export c_double;
8
-
9
6
// uncomment once #1433 is fixed
10
7
// FIXME (#1433): export c_float_math_consts;
11
8
// FIXME (#1433): export c_double_math_consts;
12
9
13
- export c_float_targ_consts;
14
- export c_double_targ_consts;
15
-
16
10
use libc:: c_int;
17
11
use libc:: c_float;
18
12
use libc:: c_double;
@@ -22,8 +16,7 @@ use libc::c_double;
22
16
23
17
#[ link_name = "m" ]
24
18
#[ abi = "cdecl" ]
25
- extern mod c_double {
26
- #[ legacy_exports] ;
19
+ pub extern mod c_double {
27
20
28
21
// Alpabetically sorted by link_name
29
22
@@ -98,8 +91,7 @@ extern mod c_double {
98
91
99
92
#[ link_name = "m" ]
100
93
#[ abi = "cdecl" ]
101
- extern mod c_float {
102
- #[ legacy_exports] ;
94
+ pub extern mod c_float {
103
95
104
96
// Alpabetically sorted by link_name
105
97
@@ -167,36 +159,34 @@ extern mod c_float {
167
159
168
160
// FIXME obtain machine float/math constants automatically (Issue #1986)
169
161
170
- mod c_float_targ_consts {
171
- #[ legacy_exports] ;
172
- const radix: uint = 2 u;
173
- const mantissa_digits: uint = 24 u;
174
- const digits: uint = 6 u;
175
- const min_exp: uint = -125 u;
176
- const max_exp: uint = 128 u;
177
- const min_10_exp: int = -37 ;
178
- const max_10_exp: int = 38 ;
162
+ pub mod c_float_targ_consts {
163
+ pub const radix: uint = 2 u;
164
+ pub const mantissa_digits: uint = 24 u;
165
+ pub const digits: uint = 6 u;
166
+ pub const min_exp: uint = -125 u;
167
+ pub const max_exp: uint = 128 u;
168
+ pub const min_10_exp: int = -37 ;
169
+ pub const max_10_exp: int = 38 ;
179
170
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
180
171
// below.
181
- const min_value: f32 = 1.175494e-38_f32 ;
182
- const max_value: f32 = 3.402823e+38_f32 ;
183
- const epsilon: f32 = 0.000000_f32 ;
172
+ pub const min_value: f32 = 1.175494e-38_f32 ;
173
+ pub const max_value: f32 = 3.402823e+38_f32 ;
174
+ pub const epsilon: f32 = 0.000000_f32 ;
184
175
}
185
176
186
- mod c_double_targ_consts {
187
- #[ legacy_exports] ;
188
- const radix: uint = 2 u;
189
- const mantissa_digits: uint = 53 u;
190
- const digits: uint = 15 u;
191
- const min_exp: uint = -1021 u;
192
- const max_exp: uint = 1024 u;
193
- const min_10_exp: int = -307 ;
194
- const max_10_exp: int = 308 ;
177
+ pub mod c_double_targ_consts {
178
+ pub const radix: uint = 2 u;
179
+ pub const mantissa_digits: uint = 53 u;
180
+ pub const digits: uint = 15 u;
181
+ pub const min_exp: uint = -1021 u;
182
+ pub const max_exp: uint = 1024 u;
183
+ pub const min_10_exp: int = -307 ;
184
+ pub const max_10_exp: int = 308 ;
195
185
// FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
196
186
// below.
197
- const min_value: f64 = 2.225074e-308_f64 ;
198
- const max_value: f64 = 1.797693e+308_f64 ;
199
- const epsilon: f64 = 2.220446e-16_f64 ;
187
+ pub const min_value: f64 = 2.225074e-308_f64 ;
188
+ pub const max_value: f64 = 1.797693e+308_f64 ;
189
+ pub const epsilon: f64 = 2.220446e-16_f64 ;
200
190
}
201
191
202
192
/*
0 commit comments