aboutsummaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-11-20 23:48:11 -0800
committerJunio C Hamano <gitster@pobox.com>2009-11-20 23:48:11 -0800
commit7a4383cf13819cd2ef00f0d60318aad3f1813117 (patch)
tree7909507115206e773783940871aeb380df778d07 /compat/mingw.c
parent8102453318caf731ec0fdfa8d9f744a0ac9a44ef (diff)
parentb1b952043f8f909649fdf053c371109c84f9cf56 (diff)
downloadgit-7a4383cf13819cd2ef00f0d60318aad3f1813117.tar.gz
git-7a4383cf13819cd2ef00f0d60318aad3f1813117.tar.xz
Merge branch 'rj/cygwin-msvc'
* rj/cygwin-msvc: MSVC: Add support for building with NO_MMAP Makefile: keep MSVC and Cygwin configuration separate
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 6b5b5b2c7..15fe33eaa 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -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];