aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-04-19 07:44:34 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-04-19 07:44:34 +0000
commitb78d6f6e7b8e38f4f3be6f9ff8e88ce535765256 (patch)
tree84106b406bd1cd8a6b03432095b89234dcbf07a4
parenta9467b6835190d3ffd9ac47689be2cdf83c181d5 (diff)
downloadnewlib-b78d6f6e7b8e38f4f3be6f9ff8e88ce535765256.zip
newlib-b78d6f6e7b8e38f4f3be6f9ff8e88ce535765256.tar.gz
newlib-b78d6f6e7b8e38f4f3be6f9ff8e88ce535765256.tar.bz2
* mmap.cc (mmap): Drop usage of the same memory area if the same
region of the same file is mapped twice.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mmap.cc6
2 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 97366b0..c8789b7 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 19 9:40:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * mmap.cc (mmap): Drop usage of the same memory area if the same
+ region of the same file is mapped twice.
+
Wed Apr 18 16:53:54 2001 Christopher Faylor <cgf@cygnus.com>
Throughout, change fdtab references to cygheap->fdtab.
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 97ee24c..78765a1 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -499,9 +499,9 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off)
list *l = mmapped_areas->get_list_by_fd (fd);
/* First check if this mapping matches into the chunk of another
- already performed mapping. Only valid for MAP_SHARED and for
- MAP_ANON in a special case of MAP_PRIVATE. */
- if (l && ((flags & MAP_SHARED) || (fd == -1 && off == 0)))
+ already performed mapping. Only valid for MAP_ANON in a special
+ case of MAP_PRIVATE. */
+ if (l && fd == -1 && off == 0)
{
mmap_record *rec;
if ((rec = l->match (off, len)) != NULL)