Skip to content

Commit f4013be

Browse files
committed
---
yaml --- r: 179133 b: refs/heads/auto c: cb4965e h: refs/heads/master i: 179131: c3a6ad3 v: v3
1 parent 166cc25 commit f4013be

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 5ad3488f29bbccfcee074bb0f3971acec97cfc45
13+
refs/heads/auto: cb4965ef3a826af8150ef863e98709b4ffa83767
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/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)