about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-11-02 16:23:22 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-11-09 22:55:50 -0800
commit3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11 (patch)
tree343087c9e62da65e2780db851682280697064c5b /src/liballoc_system
parentc8a29c2092cec369a751051a2bfed093522ff6e8 (diff)
downloadrust-3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11.tar.gz
rust-3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11.zip
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
Diffstat (limited to 'src/liballoc_system')
-rw-r--r--src/liballoc_system/lib.rs9
1 files changed, 8 insertions, 1 deletions
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;