X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fmemmap.h;h=d16dea0b98babb57b5c055e18a3e0f5d22e5d78e;hb=2fb8465594a7ffb7ccbac39fdedf7c70085d7f63;hp=e80d720d24665abc0603b3f6a4998329d0f9bf5f;hpb=3a92bf0b7a2d929f53ae69cf761721c136f9036d;p=pcsx_rearmed.git diff --git a/libpcsxcore/memmap.h b/libpcsxcore/memmap.h index e80d720d..d16dea0b 100644 --- a/libpcsxcore/memmap.h +++ b/libpcsxcore/memmap.h @@ -1,12 +1,32 @@ +/* Copyright (C) 2010-2020 The RetroArch team + * + * --------------------------------------------------------------------------------------- + * The following license statement only applies to this file (memmap.h). + * --------------------------------------------------------------------------------------- + * + * Permission is hereby granted, free of charge, + * to any person obtaining a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + #ifndef _MEMMAP_H #define _MEMMAP_H -#ifdef HAVE_MMAP - #ifdef _WIN32 -#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. -#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. +#ifndef _WIN32_WINNT /* Allow use of features specific to Windows XP or later. */ +#define _WIN32_WINNT 0x0501 /* Change this to the appropriate value to target other versions of Windows. */ #endif /* All the headers include this file. */ @@ -14,6 +34,9 @@ #include <_mingw.h> #endif +#endif //_WIN32 + +#if defined(_WIN32) || !P_HAVE_MMAP #include #ifdef __cplusplus @@ -40,12 +63,14 @@ extern "C" { #define MS_SYNC 2 #define MS_INVALIDATE 4 +#ifdef _WIN32 void* mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off); int munmap(void *addr, size_t len); int mprotect(void *addr, size_t len, int prot); int msync(void *addr, size_t len, int flags); int mlock(const void *addr, size_t len); int munlock(const void *addr, size_t len); +#endif #ifdef __cplusplus }; @@ -56,5 +81,3 @@ int munlock(const void *addr, size_t len); #endif #endif - -#endif