libcore: Some more fixes to Windows libc stuff. rs=bustage

This commit is contained in:
Patrick Walton 2013-01-09 21:14:28 -08:00
parent bd737d41a1
commit bea3a7a14c
2 changed files with 11 additions and 4 deletions

View File

@ -514,8 +514,9 @@ pub mod types {
} }
pub mod extra { pub mod extra {
use libc::types::common::c95::c_void; use libc::types::common::c95::c_void;
use libc::types::os::arch::c95::{c_char, c_int, use libc::types::os::arch::c95::{c_char, c_int, c_uint};
c_ulong, wchar_t}; use libc::types::os::arch::c95::{c_long, c_ulong};
use libc::types::os::arch::c95::{wchar_t};
use libc::types::os::arch::c99::{c_ulonglong}; use libc::types::os::arch::c99::{c_ulonglong};
pub type BOOL = c_int; pub type BOOL = c_int;
@ -1195,6 +1196,7 @@ pub mod funcs {
use libc::types::common::c95::c_void; use libc::types::common::c95::c_void;
use libc::types::os::arch::c95::{c_int, c_uint, c_char, use libc::types::os::arch::c95::{c_int, c_uint, c_char,
c_long, size_t}; c_long, size_t};
use libc::types::os::arch::c99::intptr_t;
#[link_name = "_access"] #[link_name = "_access"]
fn access(path: *c_char, amode: c_int) -> c_int; fn access(path: *c_char, amode: c_int) -> c_int;
@ -1490,6 +1492,10 @@ pub mod funcs {
#[cfg(target_os = "win32")] #[cfg(target_os = "win32")]
pub mod extra { pub mod extra {
use libc::types::os::arch::c95::c_int;
use libc::types::os::arch::extra::{DWORD, HMODULE, LPCWSTR, LPWSTR};
use libc::types::os::arch::extra::{BOOL, LPSECURITY_ATTRIBUTES};
#[abi = "stdcall"] #[abi = "stdcall"]
pub extern mod kernel32 { pub extern mod kernel32 {
fn GetEnvironmentVariableW(n: LPCWSTR, fn GetEnvironmentVariableW(n: LPCWSTR,

View File

@ -64,8 +64,7 @@ extern mod rustrt {
fn rust_set_exit_status(code: libc::intptr_t); fn rust_set_exit_status(code: libc::intptr_t);
} }
pub const tmpbuf_sz : uint = 1000u;
const tmpbuf_sz : uint = 1000u;
pub fn getcwd() -> Path { pub fn getcwd() -> Path {
Path(rustrt::rust_getcwd()) Path(rustrt::rust_getcwd())
@ -92,7 +91,9 @@ pub mod win32 {
use libc; use libc;
use vec; use vec;
use str; use str;
use option::{None, Option};
use option; use option;
use os::tmpbuf_sz;
use libc::types::os::arch::extra::DWORD; use libc::types::os::arch::extra::DWORD;
pub fn fill_utf16_buf_and_decode(f: fn(*mut u16, DWORD) -> DWORD) pub fn fill_utf16_buf_and_decode(f: fn(*mut u16, DWORD) -> DWORD)