diff options
Diffstat (limited to 'ACE/ace/OS_NS_sys_mman.inl')
-rw-r--r-- | ACE/ace/OS_NS_sys_mman.inl | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl index 03306ad018a..95d1899d055 100644 --- a/ACE/ace/OS_NS_sys_mman.inl +++ b/ACE/ace/OS_NS_sys_mman.inl @@ -75,10 +75,14 @@ ACE_OS::mmap (void *addr, if (ACE_BIT_ENABLED (flags, MAP_PRIVATE)) { -# if !defined(ACE_HAS_WINCE) +# if defined(ACE_HAS_WINCE) + // PAGE_WRITECOPY is not avaible on CE, but this should be the same + // as PAGE_READONLY according to MSDN + nt_flags = FILE_MAP_ALL_ACCESS; +# else prot = PAGE_WRITECOPY; -# endif // ACE_HAS_WINCE nt_flags = FILE_MAP_COPY; +# endif // ACE_HAS_WINCE } else if (ACE_BIT_ENABLED (flags, MAP_SHARED)) { @@ -93,7 +97,7 @@ ACE_OS::mmap (void *addr, { SECURITY_ATTRIBUTES sa_buffer; SECURITY_DESCRIPTOR sd_buffer; - const LPSECURITY_ATTRIBUTES attr = + LPSECURITY_ATTRIBUTES const attr = ACE_OS::default_win32_security_attributes_r (sa, &sa_buffer, &sd_buffer); @@ -116,20 +120,20 @@ ACE_OS::mmap (void *addr, DWORD low_off = ACE_LOW_PART (off); DWORD high_off = ACE_HIGH_PART (off); -# if !defined (ACE_HAS_WINCE) +# if defined (ACE_HAS_WINCE) + void *addr_mapping = ::MapViewOfFile (*file_mapping, + nt_flags, + high_off, + low_off, + len); +# else void *addr_mapping = ::MapViewOfFileEx (*file_mapping, nt_flags, high_off, low_off, len, addr); -# else - void *addr_mapping = ::MapViewOfFile (*file_mapping, - nt_flags, - high_off, - low_off, - len); -# endif /* ! ACE_HAS_WINCE */ +# endif /* ACE_HAS_WINCE */ // Only close this down if we used the temporary. if (file_mapping == &local_handle) @@ -239,7 +243,7 @@ ACE_OS::shm_open (const ACE_TCHAR *filename, ACE_OS_TRACE ("ACE_OS::shm_open"); #if defined (ACE_HAS_SHM_OPEN) ACE_UNUSED_ARG (sa); -#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x650) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) // With VxWorks the file should just start with / and no other // slashes, so replace all other / by _ ACE_TCHAR buf [MAXPATHLEN + 1]; @@ -271,7 +275,7 @@ ACE_OS::shm_unlink (const ACE_TCHAR *path) { ACE_OS_TRACE ("ACE_OS::shm_unlink"); #if defined (ACE_HAS_SHM_OPEN) -#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x650) +#if defined (ACE_VXWORKS) && (ACE_VXWORKS <= 0x670) // With VxWorks the file should just start with / and no other // slashes, so replace all other / by _ ACE_TCHAR buf [MAXPATHLEN + 1]; |