first steps towards porting to Windows

This commit is contained in:
krangelov
2021-11-09 19:08:49 +01:00
parent 9eb88f9281
commit befb61b0e3
2 changed files with 28 additions and 0 deletions

View File

@@ -1,11 +1,29 @@
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <pthread.h>
#else
#include <io.h>
#include <windows.h>
static
size_t getpagesize()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwPageSize;
}
#define ftruncate _chsize
#endif
#include "data.h"
#include "ipc.h"