diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-05-08 15:28:30 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-05-15 12:19:14 -0700 |
| commit | cc2897d559742c5f7630557975aa72c12a0eff01 (patch) | |
| tree | 3f35b1caaf4f3f31124ac2f89c21b24abb100796 /src/libcore | |
| parent | f6401bad24d2fb1e1f959595c2f57cb4964e7082 (diff) | |
core: Replace use of libc::getenv with os::getenv
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/unstable/lang.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcore/unstable/lang.rs b/src/libcore/unstable/lang.rs index ce32cb4c282..071d21ae8a8 100644 --- a/src/libcore/unstable/lang.rs +++ b/src/libcore/unstable/lang.rs @@ -423,16 +423,14 @@ pub unsafe fn strdup_uniq(ptr: *c_uchar, len: uint) -> ~str { #[lang="start"] pub fn start(main: *u8, argc: int, argv: **c_char, crate_map: *u8) -> int { - use libc::getenv; use rt; use sys::Closure; use ptr; use cast; + use os; unsafe { - let use_old_rt = do str::as_c_str("RUST_NEWRT") |s| { - getenv(s).is_null() - }; + let use_old_rt = os::getenv("RUST_NEWRT").is_none(); if use_old_rt { return rust_start(main as *c_void, argc as c_int, argv, crate_map as *c_void) as int; |
