Skip to content

Commit 9ad834b

Browse files
committed
---
yaml --- r: 179287 b: refs/heads/tmp c: cb4965e h: refs/heads/master i: 179285: e0de1f0 179283: 3158e29 179279: dd4be09 v: v3
1 parent ecb8873 commit 9ad834b

File tree

4 files changed

+38
-8
lines changed

4 files changed

+38
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 5ad3488f29bbccfcee074bb0f3971acec97cfc45
37+
refs/heads/tmp: cb4965ef3a826af8150ef863e98709b4ffa83767

branches/tmp/src/libstd/env.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,38 @@ pub mod consts {
562562
pub const EXE_EXTENSION: &'static str = "";
563563
}
564564

565+
/// Constants associated with the current target
566+
#[cfg(target_os = "openbsd")]
567+
pub mod consts {
568+
pub use super::arch_consts::ARCH;
569+
570+
pub const FAMILY: &'static str = "unix";
571+
572+
/// A string describing the specific operating system in use: in this
573+
/// case, `dragonfly`.
574+
pub const OS: &'static str = "openbsd";
575+
576+
/// Specifies the filename prefix used for shared libraries on this
577+
/// platform: in this case, `lib`.
578+
pub const DLL_PREFIX: &'static str = "lib";
579+
580+
/// Specifies the filename suffix used for shared libraries on this
581+
/// platform: in this case, `.so`.
582+
pub const DLL_SUFFIX: &'static str = ".so";
583+
584+
/// Specifies the file extension used for shared libraries on this
585+
/// platform that goes after the dot: in this case, `so`.
586+
pub const DLL_EXTENSION: &'static str = "so";
587+
588+
/// Specifies the filename suffix used for executable binaries on this
589+
/// platform: in this case, the empty string.
590+
pub const EXE_SUFFIX: &'static str = "";
591+
592+
/// Specifies the file extension, if any, used for executable binaries
593+
/// on this platform: in this case, the empty string.
594+
pub const EXE_EXTENSION: &'static str = "";
595+
}
596+
565597
/// Constants associated with the current target
566598
#[cfg(target_os = "android")]
567599
pub mod consts {

branches/tmp/src/libstd/os.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,8 @@ pub mod consts {
12891289
}
12901290

12911291
#[cfg(target_os = "openbsd")]
1292+
#[deprecated(since = "1.0.0", reason = "renamed to env::consts")]
1293+
#[unstable(feature = "os")]
12921294
pub mod consts {
12931295
pub use os::arch_consts::ARCH;
12941296

branches/tmp/src/libstd/sys/unix/os.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@ pub fn errno() -> i32 {
4747
}
4848

4949
#[cfg(target_os = "openbsd")]
50-
fn errno_location() -> *const c_int {
51-
extern {
52-
fn __errno() -> *const c_int;
53-
}
54-
unsafe {
55-
__errno()
56-
}
50+
unsafe fn errno_location() -> *const c_int {
51+
extern { fn __errno() -> *const c_int; }
52+
__errno()
5753
}
5854

5955
#[cfg(any(target_os = "linux", target_os = "android"))]

0 commit comments

Comments
 (0)