diff options
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | libc-test/Cargo.toml | 4 | ||||
-rw-r--r-- | libc-test/semver/android.txt | 5 | ||||
-rw-r--r-- | libc-test/semver/apple.txt | 3 | ||||
-rw-r--r-- | libc-test/semver/dragonfly.txt | 3 | ||||
-rw-r--r-- | libc-test/semver/freebsd.txt | 3 | ||||
-rw-r--r-- | libc-test/semver/linux.txt | 5 | ||||
-rw-r--r-- | libc-test/semver/netbsd.txt | 3 | ||||
-rw-r--r-- | libc-test/semver/openbsd.txt | 3 | ||||
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 3 | ||||
-rw-r--r-- | src/unix/bsd/mod.rs | 6 | ||||
-rw-r--r-- | src/unix/haiku/mod.rs | 6 | ||||
-rw-r--r-- | src/unix/linux_like/mod.rs | 9 | ||||
-rw-r--r-- | src/windows/mod.rs | 12 |
14 files changed, 61 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml index 6df0c87240..bace47fa63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libc" -version = "0.2.126" +version = "0.2.127" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" diff --git a/libc-test/Cargo.toml b/libc-test/Cargo.toml index 34a77feb48..70b9ac5590 100644 --- a/libc-test/Cargo.toml +++ b/libc-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libc-test" -version = "0.2.126" +version = "0.2.127" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" build = "build.rs" @@ -12,7 +12,7 @@ A test crate for the libc crate. [dependencies.libc] path = ".." -version = "0.2.126" +version = "0.2.127" default-features = false [build-dependencies] diff --git a/libc-test/semver/android.txt b/libc-test/semver/android.txt index d368e7fe3a..62f96299c6 100644 --- a/libc-test/semver/android.txt +++ b/libc-test/semver/android.txt @@ -176,6 +176,11 @@ BS0 BS1 BSDLY BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR +BUS_MCEERR_AR +BUS_MCEERR_AO CBAUD CBAUDEX CIBAUD diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index 16463e5f5b..60e8391ce0 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -108,6 +108,9 @@ BS0 BS1 BSDLY BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR CCStatus CCCryptorStatus CCRandomGenerateBytes diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt index b76e62f033..e58d636489 100644 --- a/libc-test/semver/dragonfly.txt +++ b/libc-test/semver/dragonfly.txt @@ -107,6 +107,9 @@ BOOT_TIME BPF_ALIGNMENT BTUARTDISC BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR CCAR_OFLOW CCTS_OFLOW CDSR_OFLOW diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 491c579170..930f810378 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -133,6 +133,9 @@ BIOCVERSION BOOT_TIME BPF_ALIGNMENT BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR CCAR_OFLOW CCTS_OFLOW CDSR_OFLOW diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index cb9f387c2a..87a195bdcd 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -198,6 +198,11 @@ BS0 BS1 BSDLY BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR +BUS_MCEERR_AR +BUS_MCEERR_AO CANFD_BRS CANFD_ESI CANFD_MAX_DLC diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index 27e5b61b9a..8e178c57a6 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -123,6 +123,9 @@ BIOCSSEESENT BIOCVERSION BOOT_TIME BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR CCTS_OFLOW CDTRCTS CHWFLOW diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index 6a2dc3379c..c9585a87ec 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -86,6 +86,9 @@ BIOCSHDRCMPLT BIOCSRSIG BIOCVERSION BUFSIZ +BUS_ADRALN +BUS_ADRERR +BUS_OBJERR CCTS_OFLOW CHWFLOW CIGNORE diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 1026b73dd9..a831ca850f 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1051,7 +1051,8 @@ s_no_extra_traits! { pub f_fstypename: [::c_char; 16], pub f_mntonname: [::c_char; 1024], pub f_mntfromname: [::c_char; 1024], - pub f_reserved: [u32; 8], + pub f_flags_ext: u32, + pub f_reserved: [u32; 7], } pub struct dirent { diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 8ebca09301..20e203bde3 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -449,6 +449,12 @@ pub const TCP_MAXSEG: ::c_int = 2; pub const PIPE_BUF: usize = 512; +// si_code values for SIGBUS signal +pub const BUS_ADRALN: ::c_int = 1; +pub const BUS_ADRERR: ::c_int = 2; +pub const BUS_OBJERR: ::c_int = 3; + +// si_code values for SIGCHLD signal pub const CLD_EXITED: ::c_int = 1; pub const CLD_KILLED: ::c_int = 2; pub const CLD_DUMPED: ::c_int = 3; diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index db53784d9a..bb2e0351bf 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -1243,6 +1243,12 @@ pub const WEXITED: ::c_int = 0x08; pub const WSTOPPED: ::c_int = 0x10; pub const WNOWAIT: ::c_int = 0x20; +// si_code values for SIGBUS signal +pub const BUS_ADRALN: ::c_int = 40; +pub const BUS_ADRERR: ::c_int = 41; +pub const BUS_OBJERR: ::c_int = 42; + +// si_code values for SIGCHLD signal pub const CLD_EXITED: ::c_int = 60; pub const CLD_KILLED: ::c_int = 61; pub const CLD_DUMPED: ::c_int = 62; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index e74f1811cc..57600f24b8 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1211,6 +1211,15 @@ pub const PIPE_BUF: usize = 4096; pub const SI_LOAD_SHIFT: ::c_uint = 16; +// si_code values for SIGBUS signal +pub const BUS_ADRALN: ::c_int = 1; +pub const BUS_ADRERR: ::c_int = 2; +pub const BUS_OBJERR: ::c_int = 3; +// Linux-specific si_code values for SIGBUS signal +pub const BUS_MCEERR_AR: ::c_int = 4; +pub const BUS_MCEERR_AO: ::c_int = 5; + +// si_code values for SIGCHLD signal pub const CLD_EXITED: ::c_int = 1; pub const CLD_KILLED: ::c_int = 2; pub const CLD_DUMPED: ::c_int = 3; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 08cba4edd0..acb0de9895 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -277,6 +277,16 @@ impl ::Clone for fpos_t { } } +// Special handling for all print and scan type functions because of https://github.com/rust-lang/libc/issues/2860 +#[cfg_attr( + all(windows, target_env = "msvc"), + link(name = "legacy_stdio_definitions") +)] +extern "C" { + pub fn printf(format: *const c_char, ...) -> ::c_int; + pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> ::c_int; +} + extern "C" { pub fn isalnum(c: c_int) -> c_int; pub fn isalpha(c: c_int) -> c_int; @@ -319,8 +329,6 @@ extern "C" { pub fn feof(stream: *mut FILE) -> c_int; pub fn ferror(stream: *mut FILE) -> c_int; pub fn perror(s: *const c_char); - pub fn printf(format: *const c_char, ...) -> ::c_int; - pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> ::c_int; pub fn atoi(s: *const c_char) -> c_int; pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double; pub fn strtof(s: *const c_char, endp: *mut *mut c_char) -> c_float; |