]> git.lizzy.rs Git - rust.git/blob - src/libstd/sys/unix/env.rs
66ff2fec8327e6292fcc35e5def581f180fae563
[rust.git] / src / libstd / sys / unix / env.rs
1 // Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #[cfg(target_os = "linux")]
12 pub mod os {
13     pub const FAMILY: &'static str = "unix";
14     pub const OS: &'static str = "linux";
15     pub const DLL_PREFIX: &'static str = "lib";
16     pub const DLL_SUFFIX: &'static str = ".so";
17     pub const DLL_EXTENSION: &'static str = "so";
18     pub const EXE_SUFFIX: &'static str = "";
19     pub const EXE_EXTENSION: &'static str = "";
20 }
21
22 #[cfg(target_os = "macos")]
23 pub mod os {
24     pub const FAMILY: &'static str = "unix";
25     pub const OS: &'static str = "macos";
26     pub const DLL_PREFIX: &'static str = "lib";
27     pub const DLL_SUFFIX: &'static str = ".dylib";
28     pub const DLL_EXTENSION: &'static str = "dylib";
29     pub const EXE_SUFFIX: &'static str = "";
30     pub const EXE_EXTENSION: &'static str = "";
31 }
32
33 #[cfg(target_os = "ios")]
34 pub mod os {
35     pub const FAMILY: &'static str = "unix";
36     pub const OS: &'static str = "ios";
37     pub const DLL_PREFIX: &'static str = "lib";
38     pub const DLL_SUFFIX: &'static str = ".dylib";
39     pub const DLL_EXTENSION: &'static str = "dylib";
40     pub const EXE_SUFFIX: &'static str = "";
41     pub const EXE_EXTENSION: &'static str = "";
42 }
43
44 #[cfg(target_os = "freebsd")]
45 pub mod os {
46     pub const FAMILY: &'static str = "unix";
47     pub const OS: &'static str = "freebsd";
48     pub const DLL_PREFIX: &'static str = "lib";
49     pub const DLL_SUFFIX: &'static str = ".so";
50     pub const DLL_EXTENSION: &'static str = "so";
51     pub const EXE_SUFFIX: &'static str = "";
52     pub const EXE_EXTENSION: &'static str = "";
53 }
54
55 #[cfg(target_os = "dragonfly")]
56 pub mod os {
57     pub const FAMILY: &'static str = "unix";
58     pub const OS: &'static str = "dragonfly";
59     pub const DLL_PREFIX: &'static str = "lib";
60     pub const DLL_SUFFIX: &'static str = ".so";
61     pub const DLL_EXTENSION: &'static str = "so";
62     pub const EXE_SUFFIX: &'static str = "";
63     pub const EXE_EXTENSION: &'static str = "";
64 }
65
66 #[cfg(target_os = "bitrig")]
67 pub mod os {
68     pub const FAMILY: &'static str = "unix";
69     pub const OS: &'static str = "bitrig";
70     pub const DLL_PREFIX: &'static str = "lib";
71     pub const DLL_SUFFIX: &'static str = ".so";
72     pub const DLL_EXTENSION: &'static str = "so";
73     pub const EXE_SUFFIX: &'static str = "";
74     pub const EXE_EXTENSION: &'static str = "";
75 }
76
77 #[cfg(target_os = "netbsd")]
78 pub mod os {
79     pub const FAMILY: &'static str = "unix";
80     pub const OS: &'static str = "netbsd";
81     pub const DLL_PREFIX: &'static str = "lib";
82     pub const DLL_SUFFIX: &'static str = ".so";
83     pub const DLL_EXTENSION: &'static str = "so";
84     pub const EXE_SUFFIX: &'static str = "";
85     pub const EXE_EXTENSION: &'static str = "";
86 }
87
88 #[cfg(target_os = "openbsd")]
89 pub mod os {
90     pub const FAMILY: &'static str = "unix";
91     pub const OS: &'static str = "openbsd";
92     pub const DLL_PREFIX: &'static str = "lib";
93     pub const DLL_SUFFIX: &'static str = ".so";
94     pub const DLL_EXTENSION: &'static str = "so";
95     pub const EXE_SUFFIX: &'static str = "";
96     pub const EXE_EXTENSION: &'static str = "";
97 }
98
99 #[cfg(target_os = "android")]
100 pub mod os {
101     pub const FAMILY: &'static str = "unix";
102     pub const OS: &'static str = "android";
103     pub const DLL_PREFIX: &'static str = "lib";
104     pub const DLL_SUFFIX: &'static str = ".so";
105     pub const DLL_EXTENSION: &'static str = "so";
106     pub const EXE_SUFFIX: &'static str = "";
107     pub const EXE_EXTENSION: &'static str = "";
108 }
109
110 #[cfg(target_os = "solaris")]
111 pub mod os {
112     pub const FAMILY: &'static str = "unix";
113     pub const OS: &'static str = "solaris";
114     pub const DLL_PREFIX: &'static str = "lib";
115     pub const DLL_SUFFIX: &'static str = ".so";
116     pub const DLL_EXTENSION: &'static str = "so";
117     pub const EXE_SUFFIX: &'static str = "";
118     pub const EXE_EXTENSION: &'static str = "";
119 }
120
121 #[cfg(all(target_os = "nacl", not(target_arch = "le32")))]
122 pub mod os {
123     pub const FAMILY: &'static str = "unix";
124     pub const OS: &'static str = "nacl";
125     pub const DLL_PREFIX: &'static str = "lib";
126     pub const DLL_SUFFIX: &'static str = ".so";
127     pub const DLL_EXTENSION: &'static str = "so";
128     pub const EXE_SUFFIX: &'static str = ".nexe";
129     pub const EXE_EXTENSION: &'static str = "nexe";
130 }
131 #[cfg(all(target_os = "nacl", target_arch = "le32"))]
132 pub mod os {
133     pub const FAMILY: &'static str = "unix";
134     pub const OS: &'static str = "pnacl";
135     pub const DLL_PREFIX: &'static str = "lib";
136     pub const DLL_SUFFIX: &'static str = ".pso";
137     pub const DLL_EXTENSION: &'static str = "pso";
138     pub const EXE_SUFFIX: &'static str = ".pexe";
139     pub const EXE_EXTENSION: &'static str = "pexe";
140 }
141
142 #[cfg(target_os = "haiku")]
143 pub mod os {
144     pub const FAMILY: &'static str = "unix";
145     pub const OS: &'static str = "haiku";
146     pub const DLL_PREFIX: &'static str = "lib";
147     pub const DLL_SUFFIX: &'static str = ".so";
148     pub const DLL_EXTENSION: &'static str = "so";
149     pub const EXE_SUFFIX: &'static str = "";
150     pub const EXE_EXTENSION: &'static str = "";
151 }
152
153 #[cfg(all(target_os = "emscripten", target_arch = "asmjs"))]
154 pub mod os {
155     pub const FAMILY: &'static str = "unix";
156     pub const OS: &'static str = "emscripten";
157     pub const DLL_PREFIX: &'static str = "lib";
158     pub const DLL_SUFFIX: &'static str = ".so";
159     pub const DLL_EXTENSION: &'static str = "so";
160     pub const EXE_SUFFIX: &'static str = ".js";
161     pub const EXE_EXTENSION: &'static str = "js";
162 }
163
164 #[cfg(all(target_os = "emscripten", target_arch = "wasm32"))]
165 pub mod os {
166     pub const FAMILY: &'static str = "unix";
167     pub const OS: &'static str = "emscripten";
168     pub const DLL_PREFIX: &'static str = "lib";
169     pub const DLL_SUFFIX: &'static str = ".so";
170     pub const DLL_EXTENSION: &'static str = "so";
171     pub const EXE_SUFFIX: &'static str = ".js";
172     pub const EXE_EXTENSION: &'static str = "js";
173 }