@@ -41,138 +41,106 @@ cfg_if! {
4141
4242pub use core:: ffi:: c_void;
4343
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-
7644cfg_if ! {
7745 if #[ cfg( windows) ] {
78- mod fixed_width_ints ;
79- pub use crate :: fixed_width_ints :: * ;
46+ mod primitives ;
47+ pub use crate :: primitives :: * ;
8048
8149 mod windows;
8250 pub use crate :: windows:: * ;
8351
8452 prelude!( ) ;
8553 } 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 :: * ;
8856
8957 mod fuchsia;
9058 pub use crate :: fuchsia:: * ;
9159
9260 prelude!( ) ;
9361 } else if #[ cfg( target_os = "switch" ) ] {
94- mod fixed_width_ints ;
95- pub use fixed_width_ints :: * ;
62+ mod primitives ;
63+ pub use primitives :: * ;
9664
9765 mod switch;
9866 pub use switch:: * ;
9967
10068 prelude!( ) ;
10169 } 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 :: * ;
10472
10573 mod psp;
10674 pub use crate :: psp:: * ;
10775
10876 prelude!( ) ;
10977 } 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 :: * ;
11280
11381 mod vxworks;
11482 pub use crate :: vxworks:: * ;
11583
11684 prelude!( ) ;
11785 } 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 :: * ;
12088
12189 mod solid;
12290 pub use crate :: solid:: * ;
12391
12492 prelude!( ) ;
12593 } else if #[ cfg( unix) ] {
126- mod fixed_width_ints ;
127- pub use crate :: fixed_width_ints :: * ;
94+ mod primitives ;
95+ pub use crate :: primitives :: * ;
12896
12997 mod unix;
13098 pub use crate :: unix:: * ;
13199
132100 prelude!( ) ;
133101 } 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 :: * ;
136104
137105 mod hermit;
138106 pub use crate :: hermit:: * ;
139107
140108 prelude!( ) ;
141109 } else if #[ cfg( target_os = "teeos" ) ] {
142- mod fixed_width_ints ;
143- pub use fixed_width_ints :: * ;
110+ mod primitives ;
111+ pub use primitives :: * ;
144112
145113 mod teeos;
146114 pub use teeos:: * ;
147115
148116 prelude!( ) ;
149117 } 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 :: * ;
152120
153121 mod trusty;
154122 pub use crate :: trusty:: * ;
155123
156124 prelude!( ) ;
157125 } 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 :: * ;
160128
161129 mod sgx;
162130 pub use crate :: sgx:: * ;
163131
164132 prelude!( ) ;
165133 } 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 :: * ;
168136
169137 mod wasi;
170138 pub use crate :: wasi:: * ;
171139
172140 prelude!( ) ;
173141 } 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 :: * ;
176144
177145 mod xous;
178146 pub use crate :: xous:: * ;
0 commit comments