]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Guido Serassio <serassio@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 May 2008 11:03:31 +0000 (23:03 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 4 May 2008 11:03:31 +0000 (23:03 +1200)
Windows port: Return the effective system pagesize in getpagesize()

lib/win32lib.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 34df133..58b130d
@@ -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