@@ -38,130 +38,98 @@ cfg_if! {
38
38
39
39
pub use core:: ffi:: c_void;
40
40
41
- cfg_if ! {
42
- // This configuration comes from `rust-lang/rust` in `library/core/src/ffi/mod.rs`.
43
- if #[ cfg( all(
44
- not( windows) ,
45
- // FIXME(ctest): just use `target_vendor` = "apple"` once `ctest` supports it
46
- not( any(
47
- target_os = "macos" ,
48
- target_os = "ios" ,
49
- target_os = "tvos" ,
50
- target_os = "watchos" ,
51
- target_os = "visionos" ,
52
- ) ) ,
53
- any(
54
- target_arch = "aarch64" ,
55
- target_arch = "arm" ,
56
- target_arch = "csky" ,
57
- target_arch = "hexagon" ,
58
- target_arch = "msp430" ,
59
- target_arch = "powerpc" ,
60
- target_arch = "powerpc64" ,
61
- target_arch = "riscv64" ,
62
- target_arch = "riscv32" ,
63
- target_arch = "s390x" ,
64
- target_arch = "xtensa" ,
65
- )
66
- ) ) ] {
67
- pub type c_char = u8 ;
68
- } else {
69
- pub type c_char = i8 ;
70
- }
71
- }
72
-
73
41
cfg_if ! {
74
42
if #[ cfg( windows) ] {
75
- mod fixed_width_ints ;
76
- pub use crate :: fixed_width_ints :: * ;
43
+ mod primitives ;
44
+ pub use crate :: primitives :: * ;
77
45
78
46
mod windows;
79
47
pub use crate :: windows:: * ;
80
48
81
49
prelude!( ) ;
82
50
} else if #[ cfg( target_os = "fuchsia" ) ] {
83
- mod fixed_width_ints ;
84
- pub use crate :: fixed_width_ints :: * ;
51
+ mod primitives ;
52
+ pub use crate :: primitives :: * ;
85
53
86
54
mod fuchsia;
87
55
pub use crate :: fuchsia:: * ;
88
56
89
57
prelude!( ) ;
90
58
} else if #[ cfg( target_os = "switch" ) ] {
91
- mod fixed_width_ints ;
92
- pub use fixed_width_ints :: * ;
59
+ mod primitives ;
60
+ pub use primitives :: * ;
93
61
94
62
mod switch;
95
63
pub use switch:: * ;
96
64
97
65
prelude!( ) ;
98
66
} else if #[ cfg( target_os = "vxworks" ) ] {
99
- mod fixed_width_ints ;
100
- pub use crate :: fixed_width_ints :: * ;
67
+ mod primitives ;
68
+ pub use crate :: primitives :: * ;
101
69
102
70
mod vxworks;
103
71
pub use crate :: vxworks:: * ;
104
72
105
73
prelude!( ) ;
106
74
} else if #[ cfg( target_os = "solid_asp3" ) ] {
107
- mod fixed_width_ints ;
108
- pub use crate :: fixed_width_ints :: * ;
75
+ mod primitives ;
76
+ pub use crate :: primitives :: * ;
109
77
110
78
mod solid;
111
79
pub use crate :: solid:: * ;
112
80
113
81
prelude!( ) ;
114
82
} else if #[ cfg( unix) ] {
115
- mod fixed_width_ints ;
116
- pub use crate :: fixed_width_ints :: * ;
83
+ mod primitives ;
84
+ pub use crate :: primitives :: * ;
117
85
118
86
mod unix;
119
87
pub use crate :: unix:: * ;
120
88
121
89
prelude!( ) ;
122
90
} else if #[ cfg( target_os = "hermit" ) ] {
123
- mod fixed_width_ints ;
124
- pub use crate :: fixed_width_ints :: * ;
91
+ mod primitives ;
92
+ pub use crate :: primitives :: * ;
125
93
126
94
mod hermit;
127
95
pub use crate :: hermit:: * ;
128
96
129
97
prelude!( ) ;
130
98
} else if #[ cfg( target_os = "teeos" ) ] {
131
- mod fixed_width_ints ;
132
- pub use fixed_width_ints :: * ;
99
+ mod primitives ;
100
+ pub use primitives :: * ;
133
101
134
102
mod teeos;
135
103
pub use teeos:: * ;
136
104
137
105
prelude!( ) ;
138
106
} else if #[ cfg( target_os = "trusty" ) ] {
139
- mod fixed_width_ints ;
140
- pub use crate :: fixed_width_ints :: * ;
107
+ mod primitives ;
108
+ pub use crate :: primitives :: * ;
141
109
142
110
mod trusty;
143
111
pub use crate :: trusty:: * ;
144
112
145
113
prelude!( ) ;
146
114
} else if #[ cfg( all( target_env = "sgx" , target_vendor = "fortanix" ) ) ] {
147
- mod fixed_width_ints ;
148
- pub use crate :: fixed_width_ints :: * ;
115
+ mod primitives ;
116
+ pub use crate :: primitives :: * ;
149
117
150
118
mod sgx;
151
119
pub use crate :: sgx:: * ;
152
120
153
121
prelude!( ) ;
154
122
} else if #[ cfg( any( target_env = "wasi" , target_os = "wasi" ) ) ] {
155
- mod fixed_width_ints ;
156
- pub use crate :: fixed_width_ints :: * ;
123
+ mod primitives ;
124
+ pub use crate :: primitives :: * ;
157
125
158
126
mod wasi;
159
127
pub use crate :: wasi:: * ;
160
128
161
129
prelude!( ) ;
162
130
} else if #[ cfg( target_os = "xous" ) ] {
163
- mod fixed_width_ints ;
164
- pub use crate :: fixed_width_ints :: * ;
131
+ mod primitives ;
132
+ pub use crate :: primitives :: * ;
165
133
166
134
mod xous;
167
135
pub use crate :: xous:: * ;
0 commit comments