diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-02-23 12:49:19 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-02-23 12:49:19 +0300 |
commit | 675412e9d647eaedf65234cc96b63cfc04508e2d (patch) | |
tree | bf6b6b5e7f2b5e3e9cef46fd2fb98c03730f9e9d /winsup | |
parent | 55a96ae8b347343db2fd43518fc2ba918972b0c7 (diff) |
* mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly.
* fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_mem.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/mmap.cc | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2cd504b6c..5c69aeeab 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 23 10:42:00 2001 Corinna Vinschen <corinna@vinschen.de> + + * mmap.cc (fhandler_disk_file::mmap): Use `addr' correctly. + * fhandler_mem.cc (fhandler_dev_mem::mmap): Ditto. + Thu Feb 22 17:09:00 2001 Corinna Vinschen <corinna@vinschen.de> * path.cc (symlink): Keep relative paths relative in the DOS diff --git a/winsup/cygwin/fhandler_mem.cc b/winsup/cygwin/fhandler_mem.cc index 81bfdc66b..2073a6e23 100644 --- a/winsup/cygwin/fhandler_mem.cc +++ b/winsup/cygwin/fhandler_mem.cc @@ -332,7 +332,7 @@ fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access, syscall_printf ("-1 = mmap(): NtMapViewOfSection failed with %E"); return INVALID_HANDLE_VALUE; } - if ((flags & MAP_FIXED) && base != addr) + if ((flags & MAP_FIXED) && base != *addr) { set_errno (EINVAL); syscall_printf ("-1 = mmap(): address shift with MAP_FIXED given"); diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 42a7b6964..4ad970ae8 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -729,9 +729,9 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, } void *base = MapViewOfFileEx (h, access, 0, off, len, - (flags & MAP_FIXED) ? addr : NULL); + (flags & MAP_FIXED) ? *addr : NULL); - if (!base || ((flags & MAP_FIXED) && base != addr)) + if (!base || ((flags & MAP_FIXED) && base != *addr)) { if (!base) { |