From: Guido Serassio Date: Thu, 1 May 2008 16:05:05 +0000 (+0200) Subject: Windows port: Return the effective system pagesize in getpagesize() X-Git-Tag: SQUID_3_1_0_1~49^2~265 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=97fee6b16118fab6988fd539cd3df01d716df609;p=thirdparty%2Fsquid.git Windows port: Return the effective system pagesize in getpagesize() --- diff --git a/lib/win32lib.c b/lib/win32lib.c old mode 100644 new mode 100755 index 34df1334e6..58b130dc94 --- a/lib/win32lib.c +++ b/lib/win32lib.c @@ -63,7 +63,13 @@ void GetProcessName(pid_t, char *); size_t getpagesize() { - return 4096; + static DWORD system_pagesize = 0; + if (!system_pagesize) { + SYSTEM_INFO system_info; + GetSystemInfo(&system_info); + system_pagesize = system_info.dwPageSize; + } + return system_pagesize; } #endif