Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
337 B

16 years ago
#include <sys/types.h>
#ifdef _WIN32
16 years ago
#include <windows.h>
#else
#include <unistd.h>
16 years ago
#include <sys/mman.h>
#include "open.h"
#endif
16 years ago
#include "mmap.h"
int mmap_unmap(const char* mapped,size_t maplen) {
#ifdef _WIN32
16 years ago
(void)maplen;
return UnmapViewOfFile(mapped)?0:-1;
#else
return maplen ? munmap((char*)mapped,maplen) : 0;
16 years ago
#endif
}