mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
libretro, update libretro-common
This commit is contained in:
parent
8717984c12
commit
b4e7cd1b51
39 changed files with 1767 additions and 738 deletions
|
@ -15,13 +15,11 @@
|
|||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#ifndef _WIN32
|
||||
#ifndef NO_MMAP
|
||||
#ifdef __SWITCH__
|
||||
#include "switch/mman.h"
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
|
@ -340,30 +338,6 @@ static void munmap(void *addr, size_t length)
|
|||
UnmapViewOfFile(addr);
|
||||
/* ruh-ro, we leaked handle from CreateFileMapping() ... */
|
||||
}
|
||||
#elif defined(NO_MMAP)
|
||||
#define PROT_EXEC 0x04
|
||||
#define MAP_FAILED 0
|
||||
#define PROT_READ 0
|
||||
#define PROT_WRITE 0
|
||||
#define MAP_PRIVATE 0
|
||||
#define MAP_ANONYMOUS 0
|
||||
|
||||
void* mmap(void *desired_addr, size_t len, int mmap_prot, int mmap_flags, int fildes, size_t off)
|
||||
{
|
||||
return calloc(1, len);
|
||||
}
|
||||
|
||||
void munmap(void *base_addr, size_t len)
|
||||
{
|
||||
free(base_addr);
|
||||
}
|
||||
|
||||
int mprotect(void *addr, size_t len, int prot)
|
||||
{
|
||||
/* stub - not really needed at this point since this codepath has no dynarecs */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef MAP_ANONYMOUS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue