diff options
| author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-06-26 17:42:11 +0200 |
|---|---|---|
| committer | Fedor Indutny <fedor.indutny@gmail.com> | 2013-07-09 19:20:26 +0400 |
| commit | db24ee9db02acf0912a89626e09801665bbb365a (patch) | |
| tree | d8f0a542f08db501d88ec74fa7da332e81494eeb /src/libstd/libc.rs | |
| parent | 4a868c7c1df6a0e68b03c1710474e83c057d69c0 (diff) | |
os: introduce cross-platform MemoryMap bindings
Basically, one may just do:
MemoryMap::new(16, ~[
MapExecutable,
MapReadable,
MapWritable
])
And executable+readable+writable chunk of at least 16 bytes size will be
allocated and freed with the result of `MemoryMap::new`.
Diffstat (limited to 'src/libstd/libc.rs')
| -rw-r--r-- | src/libstd/libc.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index 9cb81e76663..2518ba1a73d 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -732,8 +732,8 @@ pub mod types { wProcessorArchitecture: 0, wReserved: 0, dwPageSize: 0, - lpMinimumApplicationAddress: ptr::null(), - lpMaximumApplicationAddress: ptr::null(), + lpMinimumApplicationAddress: ptr::mut_null(), + lpMaximumApplicationAddress: ptr::mut_null(), dwActiveProcessorMask: 0, dwNumberOfProcessors: 0, dwProcessorType: 0, @@ -1011,7 +1011,7 @@ pub mod consts { } pub mod extra { use libc::types::os::arch::c95::c_int; - use libc::types::os::arch::extra::{DWORD, BOOL}; + use libc::types::os::arch::extra::{WORD, DWORD, BOOL}; pub static TRUE : BOOL = 1; pub static FALSE : BOOL = 0; @@ -3002,7 +3002,8 @@ pub mod funcs { LPCVOID}; use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES, LPSTARTUPINFO, LPPROCESS_INFORMATION, - LPMEMORY_BASIC_INFORMATION}; + LPMEMORY_BASIC_INFORMATION, + LPSYSTEM_INFO}; use libc::types::os::arch::extra::{HANDLE, LPHANDLE}; #[abi = "stdcall"] |
