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