summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_NS_sys_mman.inl
diff options
context:
space:
mode:
authorolli <olli@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-23 13:38:35 +0000
committerolli <olli@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-10-23 13:38:35 +0000
commitdd23e165fd1c3af85a11048fed3089cf97ef53b1 (patch)
tree026baa1eb2bb969904ca3decc594953a38de1439 /ACE/ace/OS_NS_sys_mman.inl
parentf6ae1ee9931be966a6fa86941d4382e7ef6e0e29 (diff)
downloadATCD-dd23e165fd1c3af85a11048fed3089cf97ef53b1.tar.gz
ChangeLogTag: Mon Oct 23 13:29:15 UTC 2006 Olli Savia <ops@iki.fi>
Diffstat (limited to 'ACE/ace/OS_NS_sys_mman.inl')
-rw-r--r--ACE/ace/OS_NS_sys_mman.inl49
1 files changed, 0 insertions, 49 deletions
diff --git a/ACE/ace/OS_NS_sys_mman.inl b/ACE/ace/OS_NS_sys_mman.inl
index eb7449779fb..3f1a69de2bb 100644
--- a/ACE/ace/OS_NS_sys_mman.inl
+++ b/ACE/ace/OS_NS_sys_mman.inl
@@ -8,10 +8,6 @@
#include "ace/OS_NS_macros.h"
#include "ace/OS_NS_errno.h"
-#if defined (__Lynx__)
-# include "ace/OS_NS_sys_stat.h"
-#endif /* __Lynx__ */
-
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined (ACE_HAS_VOIDPTR_MMAP)
@@ -162,51 +158,6 @@ ACE_OS::mmap (void *addr,
ACE_FAIL_RETURN (MAP_FAILED);
else
return addr_mapping;
-#elif defined (ACE_HAS_LYNXOS_BROKEN_MMAP)
- // The LynxOS mmap doesn't allow operations on plain
- // file descriptors. So, create a shm object and use that.
- ACE_UNUSED_ARG (sa);
-
- char name [128];
- sprintf (name, "%d", file_handle);
-
- // Assumes that this was called by ACE_Mem_Map, so &file_mapping !=
- // 0. Otherwise, we don't support the incomplete LynxOS mmap
- // implementation. We do support it by creating a hidden shared
- // memory object, and using that for the mapping.
- int shm_handle;
- if (! file_mapping)
- file_mapping = &shm_handle;
- if ((*file_mapping = ::shm_open (name,
- O_RDWR | O_CREAT | O_TRUNC,
- ACE_DEFAULT_FILE_PERMS)) == -1)
- return MAP_FAILED;
- else
- {
- // The size of the shared memory object must be explicitly set on LynxOS.
- const off_t filesize = ACE_OS::filesize (file_handle);
- if (::ftruncate (*file_mapping, filesize) == -1)
- return MAP_FAILED;
- else
- {
-# if defined (ACE_OS_EXTRA_MMAP_FLAGS)
- flags |= ACE_OS_EXTRA_MMAP_FLAGS;
-# endif /* ACE_OS_EXTRA_MMAP_FLAGS */
- char *map = (char *) ::mmap ((ACE_MMAP_TYPE) addr,
- len,
- prot,
- flags,
- *file_mapping,
- off);
- if (map == MAP_FAILED)
- return MAP_FAILED;
- else
- // Finally, copy the file contents to the shared memory object.
- return ::read (file_handle, map, (int) filesize) == filesize
- ? map
- : MAP_FAILED;
- }
- }
#elif !defined (ACE_LACKS_MMAP)
ACE_UNUSED_ARG (sa);