about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-05-06 22:14:43 +0000
committerbors <bors@rust-lang.org>2017-05-06 22:14:43 +0000
commit2527f41baf2e487da68134d019cb5608ec93cbf2 (patch)
tree98aad1b02f6b16e43ab89e5ba3877bb17951cf91 /src/librustc_data_structures
parentc1a960a03108a0f71ec6c4d9e7291722eba5abbc (diff)
parentdb8be04e49f32d36270e87b71b74c4b71764647e (diff)
downloadrust-2527f41baf2e487da68134d019cb5608ec93cbf2.tar.gz
rust-2527f41baf2e487da68134d019cb5608ec93cbf2.zip
Auto merge of #41787 - jsheard:ulongptr, r=alexcrichton
Fix definitions of ULONG_PTR

The Windows type `ULONG_PTR` is supposed to be equivalent to `usize`, but several parts of the codebase currently define it as `u64`. Evidently this hasn't broken anything yet but it might cause annoying 32-bit-specific breakage in future.

See https://msdn.microsoft.com/en-gb/library/windows/desktop/aa383751(v=vs.85).aspx

r? @alexcrichton
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/flock.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index 32f0fd41997..ff1ebb11b72 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -247,11 +247,11 @@ mod imp {
     use std::os::windows::raw::HANDLE;
     use std::path::Path;
     use std::fs::{File, OpenOptions};
-    use std::os::raw::{c_ulong, c_ulonglong, c_int};
+    use std::os::raw::{c_ulong, c_int};
 
     type DWORD = c_ulong;
     type BOOL = c_int;
-    type ULONG_PTR = c_ulonglong;
+    type ULONG_PTR = usize;
 
     type LPOVERLAPPED = *mut OVERLAPPED;
     const LOCKFILE_EXCLUSIVE_LOCK: DWORD = 0x00000002;