Skip to content

Commit 1d21cfa

Browse files
committed
---
yaml --- r: 179454 b: refs/heads/snap-stage3 c: cb4965e h: refs/heads/master v: v3
1 parent 2c54737 commit 1d21cfa

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5ad3488f29bbccfcee074bb0f3971acec97cfc45
4+
refs/heads/snap-stage3: cb4965ef3a826af8150ef863e98709b4ffa83767
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/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/snap-stage3/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/snap-stage3/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)