Skip to content

Fix definitions of ULONG_PTR #41787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libpanic_unwind/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#![allow(dead_code)]
#![cfg(windows)]

use libc::{c_long, c_ulong, c_ulonglong, c_void};
use libc::{c_long, c_ulong, c_void};

pub type DWORD = c_ulong;
pub type LONG = c_long;
pub type ULONG_PTR = c_ulonglong;
pub type ULONG_PTR = usize;
pub type LPVOID = *mut c_void;

pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_data_structures/flock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions src/libstd/sys/windows/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#![cfg_attr(test, allow(dead_code))]
#![unstable(issue = "0", feature = "windows_c")]

use os::raw::{c_int, c_uint, c_ulong, c_long, c_longlong, c_ushort,};
use os::raw::{c_char, c_ulonglong};
use os::raw::{c_int, c_uint, c_ulong, c_long, c_longlong, c_ushort, c_char};
#[cfg(target_arch = "x86_64")]
use os::raw::c_ulonglong;
use libc::{wchar_t, size_t, c_void};
use ptr;

Expand Down Expand Up @@ -45,7 +46,7 @@ pub type SIZE_T = usize;
pub type WORD = u16;
pub type CHAR = c_char;
pub type HCRYPTPROV = LONG_PTR;
pub type ULONG_PTR = c_ulonglong;
pub type ULONG_PTR = usize;
pub type ULONG = c_ulong;
#[cfg(target_arch = "x86_64")]
pub type ULONGLONG = u64;
Expand Down