@@ -38,130 +38,98 @@ cfg_if! {
3838
3939pub use core:: ffi:: c_void;
4040
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-
7341cfg_if ! {
7442 if #[ cfg( windows) ] {
75- mod fixed_width_ints ;
76- pub use crate :: fixed_width_ints :: * ;
43+ mod primitives ;
44+ pub use crate :: primitives :: * ;
7745
7846 mod windows;
7947 pub use crate :: windows:: * ;
8048
8149 prelude!( ) ;
8250 } 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 :: * ;
8553
8654 mod fuchsia;
8755 pub use crate :: fuchsia:: * ;
8856
8957 prelude!( ) ;
9058 } else if #[ cfg( target_os = "switch" ) ] {
91- mod fixed_width_ints ;
92- pub use fixed_width_ints :: * ;
59+ mod primitives ;
60+ pub use primitives :: * ;
9361
9462 mod switch;
9563 pub use switch:: * ;
9664
9765 prelude!( ) ;
9866 } 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 :: * ;
10169
10270 mod vxworks;
10371 pub use crate :: vxworks:: * ;
10472
10573 prelude!( ) ;
10674 } 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 :: * ;
10977
11078 mod solid;
11179 pub use crate :: solid:: * ;
11280
11381 prelude!( ) ;
11482 } else if #[ cfg( unix) ] {
115- mod fixed_width_ints ;
116- pub use crate :: fixed_width_ints :: * ;
83+ mod primitives ;
84+ pub use crate :: primitives :: * ;
11785
11886 mod unix;
11987 pub use crate :: unix:: * ;
12088
12189 prelude!( ) ;
12290 } 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 :: * ;
12593
12694 mod hermit;
12795 pub use crate :: hermit:: * ;
12896
12997 prelude!( ) ;
13098 } else if #[ cfg( target_os = "teeos" ) ] {
131- mod fixed_width_ints ;
132- pub use fixed_width_ints :: * ;
99+ mod primitives ;
100+ pub use primitives :: * ;
133101
134102 mod teeos;
135103 pub use teeos:: * ;
136104
137105 prelude!( ) ;
138106 } 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 :: * ;
141109
142110 mod trusty;
143111 pub use crate :: trusty:: * ;
144112
145113 prelude!( ) ;
146114 } 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 :: * ;
149117
150118 mod sgx;
151119 pub use crate :: sgx:: * ;
152120
153121 prelude!( ) ;
154122 } 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 :: * ;
157125
158126 mod wasi;
159127 pub use crate :: wasi:: * ;
160128
161129 prelude!( ) ;
162130 } 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 :: * ;
165133
166134 mod xous;
167135 pub use crate :: xous:: * ;
0 commit comments