Skip to content

Commit fe05591

Browse files
committed
wip
1 parent c72519b commit fe05591

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

build.rs

+11-4
Original file line numberDiff line numberDiff line change
@@ -208,40 +208,47 @@ fn is_gnu_time64_abi() -> bool {
208208
match env::var("CARGO_CFG_TARGET_ENV") {
209209
Ok(target_env) => {
210210
if target_env != "gnu" {
211-
return false;
211+
panic!("Not GNU");
212+
//return false;
212213
}
213214
}
214215
Err(_) => panic!("CARGO_CFG_TARGET_ENV not set"),
215216
}
216217
match env::var("CARGO_CFG_TARGET_OS") {
217218
Ok(target_os) => {
218219
if target_os != "linux" {
219-
return false;
220+
panic!("Not linux");
221+
//return false;
220222
}
221223
}
222224
Err(_) => panic!("CARGO_CFG_TARGET_OS not set"),
223225
}
224226
match env::var("CARGO_CFG_TARGET_POINTER_WIDTH") {
225227
Ok(bits) => {
226228
if bits == "64" {
227-
return false;
229+
panic!("Not 32 bit pointers");
230+
//return false;
228231
}
229232
}
230233
Err(_) => panic!("CARGO_CFG_TARGET_POINTER_WIDTH not set"),
231234
}
232235
match env::var("RUST_LIBC_TIME_BITS") {
233236
Ok(time_bits) => {
234237
if time_bits == "64" {
238+
//panic!("time bits 64");
235239
return true;
236240
}
237241
if time_bits == "32" {
242+
//panic!("time bits 32");
238243
return false;
239244
}
240245
if time_bits != "default" {
241246
panic!("Invalid value for RUST_LIBC_TIME_BITS");
242247
}
243248
}
244-
Err(_) => {}
249+
Err(_) => {
250+
panic!("shouldn't happen");
251+
}
245252
}
246253
// At this point, we _know_ it is *-*-linux-gnu* with 32 bit
247254
// pointers. Some 64 bit arch still have 32 bit pointers though.

src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,6 @@ cfg_if! {
126126
pub use xous::*;
127127
} else {
128128
// non-supported targets: empty...
129+
panic!("non-supported targets: empty...");
129130
}
130131
}

src/unix/linux_like/linux/gnu/b32/time64.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
//! 32-bit specific definitions for linux-like values when gnu_time64_abi is set
22
33
s! {
4+
pub struct stat {
5+
pub st_rdev: ::dev_t,
6+
}
47
pub struct timex {
58
pub modes: ::c_uint,
69

src/unix/linux_like/linux/gnu/b32/x86/time64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use stat;
2-
pub type stat64 = stat;
1+
// use stat;
2+
// pub type stat64 = stat;
33

44
s! {
55
pub struct statfs64 {

0 commit comments

Comments
 (0)