summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-10-15 08:13:42 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-10-15 08:13:42 +0000
commit45ec2b422e3262ec65481c629ad2933038741f6d (patch)
treed35e920543105a2ce36fae82c86d14bbbcce585b /winsup
parenta4ec505383ff0c08c61a425df8e2c5e364068519 (diff)
downloadcygnal-45ec2b422e3262ec65481c629ad2933038741f6d.tar.gz
cygnal-45ec2b422e3262ec65481c629ad2933038741f6d.tar.bz2
cygnal-45ec2b422e3262ec65481c629ad2933038741f6d.zip
* mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid
a rounding error for allocations beyond 4 Gigs.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mmap.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 1b337ce89..7f1fefaa4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * mmap.cc (mmap64): Convert pagesize from DWORD to size_t to avoid
+ a rounding error for allocations beyond 4 Gigs.
+
2013-10-05 Christopher Faylor <me.cygwin2013@cgf.cx>
* ntdll.h: Guard against new header files.
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index c68d4195e..8175d6ea3 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -901,7 +901,7 @@ mmap64 (void *addr, size_t len, int prot, int flags, int fd, off_t off)
caddr_t base = NULL;
struct stat st;
- DWORD pagesize = wincap.allocation_granularity ();
+ size_t pagesize = wincap.allocation_granularity ();
fh_anonymous.set_io_handle (INVALID_HANDLE_VALUE);
fh_anonymous.set_access (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE);