From 3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 2 Nov 2015 16:23:22 -0800 Subject: std: Migrate to the new libc * Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c --- src/liballoc_system/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/liballoc_system') diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index c447dfbec44..93b64c9caeb 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -14,6 +14,7 @@ #![staged_api] #![no_std] #![cfg_attr(not(stage0), allocator)] +#![cfg_attr(stage0, allow(improper_ctypes))] #![unstable(feature = "alloc_system", reason = "this library is unlikely to be stabilized in its current \ form or name", @@ -141,10 +142,16 @@ mod imp { } #[cfg(windows)] +#[allow(bad_style)] mod imp { - use libc::{BOOL, DWORD, HANDLE, LPVOID, SIZE_T}; use MIN_ALIGN; + type LPVOID = *mut u8; + type HANDLE = LPVOID; + type SIZE_T = usize; + type DWORD = u32; + type BOOL = i32; + extern "system" { fn GetProcessHeap() -> HANDLE; fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID; -- cgit 1.4.1-3-g733a5