Code

Merge branch 'jn/faster-completion-startup'
[git.git] / compat / mingw.c
index 6b5b5b2c7011a89c0415ebb89406c4a3ac53e9a9..15fe33eaa0f220e94131006bca89effd14d6d058 100644 (file)
@@ -1000,6 +1000,18 @@ repeat:
        return -1;
 }
 
+/*
+ * Note that this doesn't return the actual pagesize, but
+ * the allocation granularity. If future Windows specific git code
+ * needs the real getpagesize function, we need to find another solution.
+ */
+int mingw_getpagesize(void)
+{
+       SYSTEM_INFO si;
+       GetSystemInfo(&si);
+       return si.dwAllocationGranularity;
+}
+
 struct passwd *getpwuid(int uid)
 {
        static char user_name[100];