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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user