From 5a1b62c0fdaef10c26c6242252d0f15dbe5f92bc Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Thu, 15 Dec 2016 18:47:05 +0900 Subject: [PATCH] Fix Windows --- src/librustc_trans/back/msvc/registry.rs | 4 +--- src/libstd/sys/windows/c.rs | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/librustc_trans/back/msvc/registry.rs b/src/librustc_trans/back/msvc/registry.rs index 44b161a7575..8242f53896a 100644 --- a/src/librustc_trans/back/msvc/registry.rs +++ b/src/librustc_trans/back/msvc/registry.rs @@ -12,7 +12,7 @@ use std::ffi::{OsString, OsStr}; use std::os::windows::prelude::*; use std::ptr; -use libc::{c_void, c_long}; +use libc::c_long; pub type DWORD = u32; type LPCWSTR = *const u16; @@ -38,8 +38,6 @@ pub enum __HKEY__ {} pub type HKEY = *mut __HKEY__; pub type PHKEY = *mut HKEY; pub type REGSAM = DWORD; -pub type LPWSTR = *mut u16; -pub type PFILETIME = *mut c_void; #[link(name = "advapi32")] extern "system" { diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs index 1a563127f7f..5384ef46e9a 100644 --- a/src/libstd/sys/windows/c.rs +++ b/src/libstd/sys/windows/c.rs @@ -47,7 +47,9 @@ pub type HCRYPTPROV = LONG_PTR; pub type ULONG_PTR = c_ulonglong; pub type ULONG = c_ulong; +#[cfg(target_arch = "x86_64")] pub type ULONGLONG = u64; +#[cfg(target_arch = "x86_64")] pub type DWORDLONG = ULONGLONG; pub type LPBOOL = *mut BOOL; @@ -66,7 +68,6 @@ pub type LPWCH = *mut WCHAR; pub type LPWIN32_FIND_DATAW = *mut WIN32_FIND_DATAW; pub type LPWSADATA = *mut WSADATA; -pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN; pub type LPWSAPROTOCOL_INFO = *mut WSAPROTOCOL_INFO; pub type LPWSTR = *mut WCHAR; pub type LPFILETIME = *mut FILETIME; @@ -311,8 +312,6 @@ pub struct WSADATA { pub szSystemStatus: [u8; WSASYS_STATUS_LEN + 1], } -pub type WSAEVENT = HANDLE; - #[repr(C)] pub struct WSAPROTOCOL_INFO { pub dwServiceFlags1: DWORD, -- 2.44.0