Skip to content

Commit 94827af

Browse files
committed
add aarch64-unknown-openbsd definition
move c_char definition more deeper to make it 'u8' on aarch64-unknown-openbsd.
1 parent b63e15f commit 94827af

File tree

13 files changed

+41
-15
lines changed

13 files changed

+41
-15
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//!
33
//! This covers *-apple-* triples currently
44
5+
pub type c_char = i8;
56
pub type clock_t = c_ulong;
67
pub type time_t = c_long;
78
pub type suseconds_t = i32;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub type c_char = i8;
12
pub type dev_t = u32;
23
pub type mode_t = u16;
34
pub type pthread_attr_t = *mut ::c_void;

src/unix/bsd/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use dox::{mem, Option};
22

3-
pub type c_char = i8;
43
pub type wchar_t = i32;
54
pub type off_t = i64;
65
pub type useconds_t = u32;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use dox::mem;
22

3+
pub type c_char = i8;
34
pub type clock_t = ::c_uint;
45
pub type suseconds_t = ::c_int;
56
pub type dev_t = u64;

src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs renamed to src/unix/bsd/netbsdlike/openbsdlike/bitrig/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub type c_char = i8;
2+
13
s! {
24
pub struct lconv {
35
pub decimal_point: *mut ::c_char,
@@ -73,3 +75,15 @@ extern {
7375
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
7476
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
7577
}
78+
79+
cfg_if! {
80+
if #[cfg(target_arch = "x86")] {
81+
mod x86;
82+
pub use self::x86::*;
83+
} else if #[cfg(target_arch = "x86_64")] {
84+
mod x86_64;
85+
pub use self::x86_64::*;
86+
} else {
87+
// Unknown target_arch
88+
}
89+
}

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,3 @@ cfg_if! {
748748
// Unknown target_os
749749
}
750750
}
751-
752-
mod other;
753-
pub use self::other::*;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
3+
pub type c_char = u8;

src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs renamed to src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,18 @@ extern {
3333
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
3434
envp: *const *const ::c_char) -> ::c_int;
3535
}
36+
37+
cfg_if! {
38+
if #[cfg(target_arch = "x86")] {
39+
mod x86;
40+
pub use self::x86::*;
41+
} else if #[cfg(target_arch = "x86_64")] {
42+
mod x86_64;
43+
pub use self::x86_64::*;
44+
} else if #[cfg(target_arch = "aarch64")] {
45+
mod aarch64;
46+
pub use self::aarch64::*;
47+
} else {
48+
// Unknown target_arch
49+
}
50+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_long = i32;
2+
pub type c_ulong = u32;
3+
pub type c_char = i8;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
3+
pub type c_char = i8;

src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)