diff --git a/mmap/mmap_unmap.c b/mmap/mmap_unmap.c new file mode 100644 index 0000000..cc638ed --- /dev/null +++ b/mmap/mmap_unmap.c @@ -0,0 +1,18 @@ +#include +#include +#ifdef __MINGW32__ +#include +#else +#include +#endif +#include "open.h" +#include "mmap.h" + +int mmap_unmap(char* mapped,unsigned long maplen) { +#ifdef __MINGW32__ + (void)maplen; + return UnmapViewOfFile(mapped)?0:-1; +#else + return munmap(mapped,maplen); +#endif +}