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 {
use libc::types::common::c95::c_void;
use libc::types::os::arch::c95::{c_char, c_int,
c_ulong, wchar_t};
use libc::types::os::arch::c95::{c_char, c_int, c_uint};
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};
pub type BOOL = c_int;
@ -1195,6 +1196,7 @@ pub mod funcs {
use libc::types::common::c95::c_void;
use libc::types::os::arch::c95::{c_int, c_uint, c_char,
c_long, size_t};
use libc::types::os::arch::c99::intptr_t;
#[link_name = "_access"]
fn access(path: *c_char, amode: c_int) -> c_int;
@ -1490,6 +1492,10 @@ pub mod funcs {
#[cfg(target_os = "win32")]
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"]
pub extern mod kernel32 {
fn GetEnvironmentVariableW(n: LPCWSTR,

View File

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