Skip to content

Commit bea3a7a

Browse files
committed
libcore: Some more fixes to Windows libc stuff. rs=bustage
1 parent bd737d4 commit bea3a7a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/libcore/libc.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,9 @@ pub mod types {
514514
}
515515
pub mod extra {
516516
use libc::types::common::c95::c_void;
517-
use libc::types::os::arch::c95::{c_char, c_int,
518-
c_ulong, wchar_t};
517+
use libc::types::os::arch::c95::{c_char, c_int, c_uint};
518+
use libc::types::os::arch::c95::{c_long, c_ulong};
519+
use libc::types::os::arch::c95::{wchar_t};
519520
use libc::types::os::arch::c99::{c_ulonglong};
520521

521522
pub type BOOL = c_int;
@@ -1195,6 +1196,7 @@ pub mod funcs {
11951196
use libc::types::common::c95::c_void;
11961197
use libc::types::os::arch::c95::{c_int, c_uint, c_char,
11971198
c_long, size_t};
1199+
use libc::types::os::arch::c99::intptr_t;
11981200

11991201
#[link_name = "_access"]
12001202
fn access(path: *c_char, amode: c_int) -> c_int;
@@ -1490,6 +1492,10 @@ pub mod funcs {
14901492

14911493
#[cfg(target_os = "win32")]
14921494
pub mod extra {
1495+
use libc::types::os::arch::c95::c_int;
1496+
use libc::types::os::arch::extra::{DWORD, HMODULE, LPCWSTR, LPWSTR};
1497+
use libc::types::os::arch::extra::{BOOL, LPSECURITY_ATTRIBUTES};
1498+
14931499
#[abi = "stdcall"]
14941500
pub extern mod kernel32 {
14951501
fn GetEnvironmentVariableW(n: LPCWSTR,

src/libcore/os.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ extern mod rustrt {
6464
fn rust_set_exit_status(code: libc::intptr_t);
6565
}
6666

67-
68-
const tmpbuf_sz : uint = 1000u;
67+
pub const tmpbuf_sz : uint = 1000u;
6968

7069
pub fn getcwd() -> Path {
7170
Path(rustrt::rust_getcwd())
@@ -92,7 +91,9 @@ pub mod win32 {
9291
use libc;
9392
use vec;
9493
use str;
94+
use option::{None, Option};
9595
use option;
96+
use os::tmpbuf_sz;
9697
use libc::types::os::arch::extra::DWORD;
9798

9899
pub fn fill_utf16_buf_and_decode(f: fn(*mut u16, DWORD) -> DWORD)

0 commit comments

Comments
 (0)