mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 18:58:21 +00:00
(memmap.c) Some Win32 build fixes
This commit is contained in:
parent
298b29e615
commit
68fa0bcbe7
@ -20,21 +20,35 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <memmap.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define MAP_SHARED 0x01
|
||||
|
||||
#ifndef MAP_PRIVATE
|
||||
#define MAP_PRIVATE 0x02
|
||||
#endif
|
||||
|
||||
#ifndef MAP_ANONYMOUS
|
||||
#define MAP_ANONYMOUS 0x20
|
||||
#endif
|
||||
|
||||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#define MAP_FAILED ((void *) -1)
|
||||
#define PROT_READ 0x1
|
||||
#define PROT_WRITE 0x2
|
||||
|
||||
/* This flag is only available in WinXP+ */
|
||||
#ifdef FILE_MAP_EXECUTE
|
||||
#ifndef PROT_EXEC
|
||||
#define PROT_EXEC 0x4
|
||||
#endif
|
||||
#else
|
||||
#ifndef PROT_EXEC
|
||||
#define PROT_EXEC 0x0
|
||||
#endif
|
||||
|
||||
#define FILE_MAP_EXECUTE 0
|
||||
#endif
|
||||
|
||||
@ -46,7 +60,7 @@
|
||||
# define DWORD_LO(x) (x)
|
||||
#endif
|
||||
|
||||
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, size_t offset)
|
||||
{
|
||||
uint32_t flProtect, dwDesiredAccess;
|
||||
off_t end;
|
||||
|
Loading…
Reference in New Issue
Block a user