Add COPYING file
[ps3tools.git] / mingw_mmap.h
blob54ee9c954fef73ceb9f2d44dd2fc1d6de1aa649d
1 /** This code is adapted from:
2 * https://kerneltrap.org/mailarchive/git/2008/11/21/4186494
3 * Original code by Vasyl Vavrychuk.
5 * This file is part of Rockstars.
6 * Coded in Hungarian Notation so it looks stupid. :D
8 * If you read nothing from this file, know NOT to call the function names
9 * below but the original mmap() and munmap() functions.
12 #ifndef _MINGW_MMAP_H
13 #define _MINGW_MMAP_H
15 #include <io.h>
16 #include <windows.h>
18 #define PROT_READ 1
19 #define PROT_WRITE 2
20 #define MAP_SHARED 2
21 #define MAP_PRIVATE 3
23 void *mingw_mmap(void *pStart, size_t sLength, int nProt, int nFlags, int nFd, off_t oOffset);
24 #define mmap mingw_mmap
26 int mingw_munmap(void *pStart, size_t sLength);
27 #define munmap mingw_munmap
29 #endif /* _MINGW_MMAP_H */