diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-18 15:56:38 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-12-18 15:56:38 +0000 |
commit | 3488908cd3e0feb0ef028b6315c9655576df3450 (patch) | |
tree | 7c19293dc41df50889744e85e6d943522e678763 | |
parent | 96863909e40493b99ee7b8aaa1eb9d0183be3130 (diff) | |
download | ATCD-3488908cd3e0feb0ef028b6315c9655576df3450.tar.gz |
ChangeLogTag:Mon Dec 16 16:34:23 2002 Nanbor Wang <nanbor@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 29 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 29 | ||||
-rw-r--r-- | ace/OS.i | 31 |
3 files changed, 68 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog index bd11f440b93..3c77f8db8a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +Mon Dec 16 16:34:23 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.i: Applied the following patch from Eugene Alterman + <EugeneA@bremer-inc.com>. + + It appears that Win32 mmap() emulation implements MAP_FIXED + semantic under the wrong assumption about MapViewOfFileEx() + behavior. In fact if a non-null base address is supplied to + MapViewOfFileEx() it behaves like mmap() with MAP_FIXED set - it + maps at that address or fails if it unable to do it. If a null + base address is supplied it behaves like mmap() with MAP_FIXED + not set. + + This means that if MAP_FIXED is not set the emulation should set + the base address argument to 0, and it should fail if MAP_FIXED + is set and <addr> is 0. + + Besides, it makes sense for WinCE emulation to fail whenever + MAP_FIXED is set since WinCE does not support MAP_FIXED + semantic. + Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com> * ace/Timer_Wheel_T.cpp: @@ -7,9 +28,9 @@ Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com> Wed Dec 18 05:42:52 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> - * ace/High_Res_Timer.cpp (global_scale_factor): The INTEL compiler - can also set the global scale factor. Thanks to Chris Kohlhoff - for reporting this. + * ace/High_Res_Timer.cpp (global_scale_factor): The INTEL compiler + can also set the global scale factor. Thanks to Chris Kohlhoff + for reporting this. Tue Dec 17 11:22:31 2002 Phil Mesnier <mesnier_p@ociweb.com> @@ -24,7 +45,7 @@ Tue Dec 17 11:22:31 2002 Phil Mesnier <mesnier_p@ociweb.com> * ace/CDR_Stream.i: Stripped out the reference counting on translator objects to avoid - build problems. + build problems. Tue Dec 17 11:30:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index bd11f440b93..3c77f8db8a5 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,24 @@ +Mon Dec 16 16:34:23 2002 Nanbor Wang <nanbor@cs.wustl.edu> + + * ace/OS.i: Applied the following patch from Eugene Alterman + <EugeneA@bremer-inc.com>. + + It appears that Win32 mmap() emulation implements MAP_FIXED + semantic under the wrong assumption about MapViewOfFileEx() + behavior. In fact if a non-null base address is supplied to + MapViewOfFileEx() it behaves like mmap() with MAP_FIXED set - it + maps at that address or fails if it unable to do it. If a null + base address is supplied it behaves like mmap() with MAP_FIXED + not set. + + This means that if MAP_FIXED is not set the emulation should set + the base address argument to 0, and it should fail if MAP_FIXED + is set and <addr> is 0. + + Besides, it makes sense for WinCE emulation to fail whenever + MAP_FIXED is set since WinCE does not support MAP_FIXED + semantic. + Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com> * ace/Timer_Wheel_T.cpp: @@ -7,9 +28,9 @@ Wed Dec 18 08:29:04 2002 Rich Seibel <seibel_r@ociweb.com> Wed Dec 18 05:42:52 2002 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu> - * ace/High_Res_Timer.cpp (global_scale_factor): The INTEL compiler - can also set the global scale factor. Thanks to Chris Kohlhoff - for reporting this. + * ace/High_Res_Timer.cpp (global_scale_factor): The INTEL compiler + can also set the global scale factor. Thanks to Chris Kohlhoff + for reporting this. Tue Dec 17 11:22:31 2002 Phil Mesnier <mesnier_p@ociweb.com> @@ -24,7 +45,7 @@ Tue Dec 17 11:22:31 2002 Phil Mesnier <mesnier_p@ociweb.com> * ace/CDR_Stream.i: Stripped out the reference counting on translator objects to avoid - build problems. + build problems. Tue Dec 17 11:30:31 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu> @@ -2885,6 +2885,24 @@ ACE_OS::mmap (void *addr, #endif /* !defined (ACE_WIN32) || defined (ACE_HAS_PHARLAP) */ #if defined (ACE_WIN32) && !defined (ACE_HAS_PHARLAP) + +# if defined(ACE_HAS_WINCE) + ACE_UNUSED_ARG (addr); + if(ACE_BIT_ENABLED (flags, MAP_FIXED) // not supported + { + errno = EINVAL; + return MAP_FAILED; + } +# else + if (!ACE_BIT_ENABLED (flags, MAP_FIXED)) + addr = 0; + else if (addr == 0) // can not map to address 0 + { + errno = EINVAL; + return MAP_FAILED; + } +# endif + int nt_flags = 0; ACE_HANDLE local_handle = ACE_INVALID_HANDLE; @@ -2958,17 +2976,11 @@ ACE_OS::mmap (void *addr, len, addr); # else - ACE_UNUSED_ARG (addr); // WinCE doesn't allow specifying <addr>. void *addr_mapping = ::MapViewOfFile (*file_mapping, nt_flags, 0, off, len); - - if (addr_mapping != 0) { - addr = addr_mapping; - } - # endif /* ! ACE_HAS_WINCE */ // Only close this down if we used the temporary. @@ -2977,13 +2989,6 @@ ACE_OS::mmap (void *addr, if (addr_mapping == 0) ACE_FAIL_RETURN (MAP_FAILED); - - else if (ACE_BIT_ENABLED (flags, MAP_FIXED) - && addr_mapping != addr) - { - errno = EINVAL; - return MAP_FAILED; - } else return addr_mapping; #elif defined (__Lynx__) |