2017-03-15 13:02:22 +01:00
|
|
|
/* $OpenBSD$ */
|
|
|
|
|
|
|
|
#include <unistd.h>
|
2017-06-11 18:21:34 +02:00
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
2017-03-15 13:02:22 +01:00
|
|
|
#include <windows.h>
|
2017-06-11 18:21:34 +02:00
|
|
|
#endif
|
2017-03-15 13:02:22 +01:00
|
|
|
|
|
|
|
int
|
2017-06-11 18:21:34 +02:00
|
|
|
getpagesize(void) {
|
|
|
|
#ifdef _MSC_VER
|
2017-03-15 13:02:22 +01:00
|
|
|
SYSTEM_INFO system_info;
|
|
|
|
GetSystemInfo(&system_info);
|
|
|
|
return system_info.dwPageSize;
|
2017-06-11 18:21:34 +02:00
|
|
|
#else
|
|
|
|
return sysconf(_SC_PAGESIZE);
|
|
|
|
#endif
|
2017-03-15 13:02:22 +01:00
|
|
|
}
|