summaryrefslogtreecommitdiff
path: root/compat/win32mmap.c
diff options
context:
space:
mode:
authorLibravatar Ramsay Jones <ramsay@ramsay1.demon.co.uk>2009-11-07 20:10:31 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-11-08 17:59:12 -0800
commitb1b952043f8f909649fdf053c371109c84f9cf56 (patch)
tree3d99e5d5efd0ddf760b4ccc646444e95c9093189 /compat/win32mmap.c
parentMakefile: keep MSVC and Cygwin configuration separate (diff)
downloadtgif-b1b952043f8f909649fdf053c371109c84f9cf56.tar.xz
MSVC: Add support for building with NO_MMAP
When the NO_MMAP build variable is set, the msvc linker complains: error LNK2001: unresolved external symbol _getpagesize The msvc libraries do not define the getpagesize() function, so we move the mingw_getpagesize() implementation from the conditionally built win32mmap.c file to mingw.c. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/win32mmap.c')
-rw-r--r--compat/win32mmap.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/compat/win32mmap.c b/compat/win32mmap.c
index 779d796cd5..1c5a14922f 100644
--- a/compat/win32mmap.c
+++ b/compat/win32mmap.c
@@ -1,17 +1,5 @@
#include "../git-compat-util.h"
-/*
- * 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;
-}
-
void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
{
HANDLE hmap;