mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 20:58:18 +00:00
Make mman functions public in memmap.h header for Win32
This commit is contained in:
parent
7f615fc781
commit
d4c0a09a03
@ -38,7 +38,7 @@
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_MMAN)
|
||||
#if !defined(HAVE_MMAN) || defined(_WIN32)
|
||||
void* mmap(void *desired_addr, size_t len, int mmap_prot, int mmap_flags, int fildes, size_t off);
|
||||
|
||||
void munmap(void *base_addr, size_t len);
|
||||
|
@ -46,7 +46,7 @@
|
||||
# define DWORD_LO(x) (x)
|
||||
#endif
|
||||
|
||||
static void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
|
||||
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
|
||||
{
|
||||
uint32_t flProtect, dwDesiredAccess;
|
||||
off_t end;
|
||||
@ -108,13 +108,13 @@ static void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void munmap(void *addr, size_t length)
|
||||
void munmap(void *addr, size_t length)
|
||||
{
|
||||
UnmapViewOfFile(addr);
|
||||
/* ruh-ro, we leaked handle from CreateFileMapping() ... */
|
||||
}
|
||||
|
||||
static int mprotect(void *addr, size_t len, int prot)
|
||||
int mprotect(void *addr, size_t len, int prot)
|
||||
{
|
||||
/* Incomplete, just assumes PAGE_EXECUTE_READWRITE right now
|
||||
* instead of correctly handling prot */
|
||||
|
Loading…
x
Reference in New Issue
Block a user