Skip to content

Commit 5b96ddf

Browse files
authored
Merge pull request #3653 from bjorn3/dragonfly_no_thread_local
Avoid usage of thread_local on DragonFlyBSD
2 parents 2dc96f3 + de76fee commit 5b96ddf

File tree

5 files changed

+1
-33
lines changed

5 files changed

+1
-33
lines changed

build.rs

-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
1616
"libc_const_extern_fn",
1717
"libc_const_extern_fn_unstable",
1818
"libc_deny_warnings",
19-
"libc_thread_local",
2019
];
2120

2221
// Extra values to allow for check-cfg.
@@ -65,11 +64,6 @@ fn main() {
6564
set_cfg("libc_deny_warnings");
6665
}
6766

68-
// #[thread_local] is currently unstable
69-
if rustc_dep_of_std {
70-
set_cfg("libc_thread_local");
71-
}
72-
7367
// Rust >= 1.62.0 allows to use `const_extern_fn` for "Rust" and "C".
7468
if rustc_minor_ver >= 62 {
7569
set_cfg("libc_const_extern_fn");

libc-test/build.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,7 @@ fn do_ctest() {
6767
}
6868

6969
fn ctest_cfg() -> ctest::TestGenerator {
70-
let mut cfg = ctest::TestGenerator::new();
71-
let libc_cfgs = ["libc_thread_local"];
72-
for f in &libc_cfgs {
73-
cfg.cfg(f, None);
74-
}
75-
cfg
70+
ctest::TestGenerator::new()
7671
}
7772

7873
fn do_semver() {

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![cfg_attr(libc_deny_warnings, deny(warnings))]
1717
// Attributes needed when building as part of the standard library
1818
#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, no_core))]
19-
#![cfg_attr(libc_thread_local, feature(thread_local))]
2019
// Enable extra lints:
2120
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
2221
#![deny(missing_copy_implementations, safe_packed_borrows)]

src/unix/bsd/freebsdlike/dragonfly/errno.rs

-13
This file was deleted.

src/unix/bsd/freebsdlike/dragonfly/mod.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1723,10 +1723,3 @@ extern "C" {
17231723
entry: vm_map_entry_t,
17241724
) -> vm_map_entry_t;
17251725
}
1726-
1727-
cfg_if! {
1728-
if #[cfg(libc_thread_local)] {
1729-
mod errno;
1730-
pub use self::errno::*;
1731-
}
1732-
}

0 commit comments

Comments
 (0)