Fix definitions of ULONG_PTR
This commit is contained in:
parent
8aad3a3524
commit
db8be04e49
3 changed files with 8 additions and 7 deletions
|
@ -12,11 +12,11 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![cfg(windows)]
|
#![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 DWORD = c_ulong;
|
||||||
pub type LONG = c_long;
|
pub type LONG = c_long;
|
||||||
pub type ULONG_PTR = c_ulonglong;
|
pub type ULONG_PTR = usize;
|
||||||
pub type LPVOID = *mut c_void;
|
pub type LPVOID = *mut c_void;
|
||||||
|
|
||||||
pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15;
|
pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15;
|
||||||
|
|
|
@ -247,11 +247,11 @@ mod imp {
|
||||||
use std::os::windows::raw::HANDLE;
|
use std::os::windows::raw::HANDLE;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::fs::{File, OpenOptions};
|
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 DWORD = c_ulong;
|
||||||
type BOOL = c_int;
|
type BOOL = c_int;
|
||||||
type ULONG_PTR = c_ulonglong;
|
type ULONG_PTR = usize;
|
||||||
|
|
||||||
type LPOVERLAPPED = *mut OVERLAPPED;
|
type LPOVERLAPPED = *mut OVERLAPPED;
|
||||||
const LOCKFILE_EXCLUSIVE_LOCK: DWORD = 0x00000002;
|
const LOCKFILE_EXCLUSIVE_LOCK: DWORD = 0x00000002;
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
#![cfg_attr(test, allow(dead_code))]
|
#![cfg_attr(test, allow(dead_code))]
|
||||||
#![unstable(issue = "0", feature = "windows_c")]
|
#![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_int, c_uint, c_ulong, c_long, c_longlong, c_ushort, c_char};
|
||||||
use os::raw::{c_char, c_ulonglong};
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
use os::raw::c_ulonglong;
|
||||||
use libc::{wchar_t, size_t, c_void};
|
use libc::{wchar_t, size_t, c_void};
|
||||||
use ptr;
|
use ptr;
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ pub type SIZE_T = usize;
|
||||||
pub type WORD = u16;
|
pub type WORD = u16;
|
||||||
pub type CHAR = c_char;
|
pub type CHAR = c_char;
|
||||||
pub type HCRYPTPROV = LONG_PTR;
|
pub type HCRYPTPROV = LONG_PTR;
|
||||||
pub type ULONG_PTR = c_ulonglong;
|
pub type ULONG_PTR = usize;
|
||||||
pub type ULONG = c_ulong;
|
pub type ULONG = c_ulong;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
pub type ULONGLONG = u64;
|
pub type ULONGLONG = u64;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue