Skip to content

Commit

Permalink
auto merge of #12136 : alexcrichton/rust/issue-12123, r=brson
Browse files Browse the repository at this point in the history
Closes #12123
  • Loading branch information
bors committed Feb 10, 2014
2 parents 47e1445 + 882e2c3 commit 5bad63c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/libnative/io/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ pub fn symlink(src: &CString, dst: &CString) -> IoResult<()> {
super::mkerr_winbool(as_utf16_p(src.as_str().unwrap(), |src| {
as_utf16_p(dst.as_str().unwrap(), |dst| {
unsafe { libc::CreateSymbolicLinkW(dst, src, 0) }
})
}) as libc::BOOL
}))
}

Expand Down
18 changes: 10 additions & 8 deletions src/libstd/libc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ pub mod types {

pub type BOOL = c_int;
pub type BYTE = u8;
pub type BOOLEAN = BYTE;
pub type CCHAR = c_char;
pub type CHAR = c_char;

Expand Down Expand Up @@ -3984,15 +3985,16 @@ pub mod funcs {

pub mod kernel32 {
use libc::types::os::arch::c95::{c_uint};
use libc::types::os::arch::extra::{BOOL, DWORD, SIZE_T, HMODULE};
use libc::types::os::arch::extra::{LPCWSTR, LPWSTR, LPCSTR, LPSTR, LPCH,
LPDWORD, LPVOID,
LPCVOID, LPOVERLAPPED};
use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES, LPSTARTUPINFO,
use libc::types::os::arch::extra::{BOOL, DWORD, SIZE_T, HMODULE,
LPCWSTR, LPWSTR, LPCSTR, LPSTR,
LPCH, LPDWORD, LPVOID,
LPCVOID, LPOVERLAPPED,
LPSECURITY_ATTRIBUTES,
LPSTARTUPINFO,
LPPROCESS_INFORMATION,
LPMEMORY_BASIC_INFORMATION,
LPSYSTEM_INFO};
use libc::types::os::arch::extra::{HANDLE, LPHANDLE, LARGE_INTEGER,
LPSYSTEM_INFO, BOOLEAN,
HANDLE, LPHANDLE, LARGE_INTEGER,
PLARGE_INTEGER, LPFILETIME};

extern "system" {
Expand Down Expand Up @@ -4105,7 +4107,7 @@ pub mod funcs {
dwFlags: DWORD) -> BOOL;
pub fn CreateSymbolicLinkW(lpSymlinkFileName: LPCWSTR,
lpTargetFileName: LPCWSTR,
dwFlags: DWORD) -> BOOL;
dwFlags: DWORD) -> BOOLEAN;
pub fn CreateHardLinkW(lpSymlinkFileName: LPCWSTR,
lpTargetFileName: LPCWSTR,
lpSecurityAttributes: LPSECURITY_ATTRIBUTES)
Expand Down

0 comments on commit 5bad63c

Please sign in to comment.