Skip to content

Commit 6114db3

Browse files
committed
rollup merge of rust-lang#19160: mahkoh/arm_char
c_char is u8 on ARM [breaking-change] ------- closes rust-lang#18597 Doesn't break any correct code.
2 parents b279ef1 + 216e5a8 commit 6114db3

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/liblibc/lib.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,9 @@ pub mod types {
511511
target_arch = "mips",
512512
target_arch = "mipsel"))]
513513
pub mod arch {
514+
#[cfg(any(target_arch = "x86",
515+
target_arch = "mips",
516+
target_arch = "mipsel"))]
514517
pub mod c95 {
515518
pub type c_char = i8;
516519
pub type c_schar = i8;
@@ -530,6 +533,26 @@ pub mod types {
530533
pub type suseconds_t = i32;
531534
pub type wchar_t = i32;
532535
}
536+
#[cfg(target_arch = "arm")]
537+
pub mod c95 {
538+
pub type c_char = u8;
539+
pub type c_schar = i8;
540+
pub type c_uchar = u8;
541+
pub type c_short = i16;
542+
pub type c_ushort = u16;
543+
pub type c_int = i32;
544+
pub type c_uint = u32;
545+
pub type c_long = i32;
546+
pub type c_ulong = u32;
547+
pub type c_float = f32;
548+
pub type c_double = f64;
549+
pub type size_t = u32;
550+
pub type ptrdiff_t = i32;
551+
pub type clock_t = i32;
552+
pub type time_t = i32;
553+
pub type suseconds_t = i32;
554+
pub type wchar_t = i32;
555+
}
533556
pub mod c99 {
534557
pub type c_longlong = i64;
535558
pub type c_ulonglong = u64;
@@ -1804,6 +1827,7 @@ pub mod types {
18041827

18051828
#[cfg(any(target_arch = "arm", target_arch = "x86"))]
18061829
pub mod arch {
1830+
#[cfg(target_arch = "x86")]
18071831
pub mod c95 {
18081832
pub type c_char = i8;
18091833
pub type c_schar = i8;
@@ -1823,6 +1847,26 @@ pub mod types {
18231847
pub type suseconds_t = i32;
18241848
pub type wchar_t = i32;
18251849
}
1850+
#[cfg(target_arch = "arm")]
1851+
pub mod c95 {
1852+
pub type c_char = u8;
1853+
pub type c_schar = i8;
1854+
pub type c_uchar = u8;
1855+
pub type c_short = i16;
1856+
pub type c_ushort = u16;
1857+
pub type c_int = i32;
1858+
pub type c_uint = u32;
1859+
pub type c_long = i32;
1860+
pub type c_ulong = u32;
1861+
pub type c_float = f32;
1862+
pub type c_double = f64;
1863+
pub type size_t = u32;
1864+
pub type ptrdiff_t = i32;
1865+
pub type clock_t = u32;
1866+
pub type time_t = i32;
1867+
pub type suseconds_t = i32;
1868+
pub type wchar_t = i32;
1869+
}
18261870
pub mod c99 {
18271871
pub type c_longlong = i64;
18281872
pub type c_ulonglong = u64;

0 commit comments

Comments
 (0)