Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-07-19 12:58:09 +0400
committerCorinna Vinschen <corinna@vinschen.de>2006-07-19 12:58:09 +0400
commitadd2f65f37a78e25aa141d8f74c728731fe65a19 (patch)
tree3c8a36dae431ea85fdec2bb8eb066cbdc56dde6f /winsup
parentef4954b62d5297362d99c433076ed719fc9355bb (diff)
* mmap.cc (msync): Disable rounding up len. Fix bug in access check
loop.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mmap.cc4
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 777e1af99..765e5d23e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2006-07-19 Corinna Vinschen <corinna@vinschen.de>
+ * mmap.cc (msync): Disable rounding up len. Fix bug in access check
+ loop.
+
+2006-07-19 Corinna Vinschen <corinna@vinschen.de>
+
* path.cc (symlink_worker): Return EEXIST if newpath exists.
2006-07-18 Christopher Faylor <cgf@timesys.com>
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 5ace55c0a..97966515e 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -1352,7 +1352,9 @@ msync (void *addr, size_t len, int flags)
set_errno (EINVAL);
goto out;
}
+#if 0 /* If I only knew why I did that... */
len = roundup2 (len, pagesize);
+#endif
/* Iterate through the map, looking for the mmapped area.
Error if not found. */
@@ -1368,7 +1370,7 @@ msync (void *addr, size_t len, int flags)
if (rec->access ((caddr_t)addr))
{
/* Check whole area given by len. */
- for (DWORD i = getpagesize (); i < len; ++i)
+ for (DWORD i = getpagesize (); i < len; i += getpagesize ())
if (!rec->access ((caddr_t)addr + i))
{
set_errno (ENOMEM);