Register new snapshots

This commit is contained in:
Alex Crichton 2013-11-10 14:57:53 -08:00
parent b5e602ac56
commit 7407bcc1a2
7 changed files with 24 additions and 195 deletions

View file

@ -14,11 +14,11 @@ pub type SIZE_T = u32;
pub type LPVOID = uint;
pub type BOOL = u8;
#[cfg(target_os = "win32")]
#[cfg(windows)]
mod kernel32 {
use super::{HANDLE, DWORD, SIZE_T, LPVOID, BOOL};
extern "stdcall" {
extern "system" {
pub fn GetProcessHeap() -> HANDLE;
pub fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T)
-> LPVOID;
@ -27,7 +27,7 @@ mod kernel32 {
}
#[cfg(target_os = "win32")]
#[cfg(windows)]
#[fixed_stack_segment]
pub fn main() {
let heap = unsafe { kernel32::GetProcessHeap() };
@ -37,8 +37,5 @@ pub fn main() {
assert!(res != 0u8);
}
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
#[cfg(target_os = "freebsd")]
#[cfg(target_os = "android")]
#[cfg(not(windows))]
pub fn main() { }