summaryrefslogtreecommitdiff
path: root/ace
diff options
context:
space:
mode:
authorOlli Savia <ops@iki.fi>2004-12-16 14:18:51 +0000
committerOlli Savia <ops@iki.fi>2004-12-16 14:18:51 +0000
commit83878a70d986fdcc05c58c796ea1bd7c94b45ef5 (patch)
tree773b585203cd589c536e36adbd8365cc16e13d86 /ace
parentf468f9f19940622dbae838e40281ea683fee8c6b (diff)
downloadATCD-83878a70d986fdcc05c58c796ea1bd7c94b45ef5.tar.gz
ChangeLogTag: Thu Dec 16 16:12:07 2004 Olli Savia <ops@iki.fi>
Diffstat (limited to 'ace')
-rw-r--r--ace/Mem_Map.cpp4
-rw-r--r--ace/Mem_Map.h4
-rw-r--r--ace/Mem_Map.inl20
-rw-r--r--ace/OS_NS_sys_mman.inl2
4 files changed, 15 insertions, 15 deletions
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp
index 493244d2977..9ebf7294917 100644
--- a/ace/Mem_Map.cpp
+++ b/ace/Mem_Map.cpp
@@ -196,10 +196,10 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
#endif /* !CHORUS */
}
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
// Set flag that indicates whether PROT_WRITE has been enabled.
write_enabled_ = ACE_BIT_ENABLED (prot, PROT_WRITE);
-#endif /* __Lynx__ */
+#endif /* ACE_HAS_LYNX_BROKEN_MMAP */
#if defined (ACE_USE_MAPPING_NAME)
if (ACE_BIT_ENABLED (share, MAP_SHARED))
diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h
index 17e02461878..6782b8f66aa 100644
--- a/ace/Mem_Map.h
+++ b/ace/Mem_Map.h
@@ -188,10 +188,10 @@ private:
/// HANDLE for the open mapping.
ACE_HANDLE file_mapping_;
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
/// Flag to indicate that PROT_WRITE has been enabled.
int write_enabled_;
-#endif /* __Lynx__ */
+#endif /* ACE_HAS_LYNX_BROKEN_MMAP */
/// Keeps track of whether we need to close the handle. This is set
/// if we opened the file.
diff --git a/ace/Mem_Map.inl b/ace/Mem_Map.inl
index d499a7807d9..62963fe2ae0 100644
--- a/ace/Mem_Map.inl
+++ b/ace/Mem_Map.inl
@@ -117,7 +117,7 @@ ACE_Mem_Map::unmap (int len)
this->close_filemapping_handle ();
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
int writeback_result = 0;
if (write_enabled_)
{
@@ -130,7 +130,7 @@ ACE_Mem_Map::unmap (int len)
base_addr_,
(int) filesize) == filesize ? 0 : -1;
}
-#endif /* __Lynx__ */
+#endif /* ACE_HAS_LYNX_BROKEN_MMAP */
if (this->base_addr_ != MAP_FAILED)
{
int result = ACE_OS::munmap (this->base_addr_,
@@ -139,11 +139,11 @@ ACE_Mem_Map::unmap (int len)
return result;
}
else
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
return writeback_result;
-#else /* ! __Lynx__ */
+#else /* ! ACE_HAS_LYNX_BROKEN_MMAP */
return 0;
-#endif /* ! __Lynx__ */
+#endif /* ! ACE_HAS_LYNX_BROKEN_MMAP */
}
// Unmap the region starting at <addr_>.
@@ -155,7 +155,7 @@ ACE_Mem_Map::unmap (void *addr, int len)
this->close_filemapping_handle ();
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
int writeback_result = 0;
if (write_enabled_)
{
@@ -167,16 +167,16 @@ ACE_Mem_Map::unmap (void *addr, int len)
base_addr_,
(int) filesize) == filesize ? 0 : -1;
}
-#endif /* __Lynx__ */
+#endif /* ACE_HAS_LYNX_BROKEN_MMAP */
-#if defined (__Lynx__)
+#if defined (ACE_HAS_LYNX_BROKEN_MMAP)
return ACE_OS::munmap (addr,
len < 0 ? this->length_ : len)
| writeback_result;;
-#else /* ! __Lynx__ */
+#else /* ! ACE_HAS_LYNX_BROKEN_MMAP */
return ACE_OS::munmap (addr,
len < 0 ? this->length_ : len);
-#endif /* ! __Lynx__ */
+#endif /* ! ACE_HAS_LYNX_BROKEN_MMAP */
}
// Sync <len> bytes of the memory region to the backing store starting
diff --git a/ace/OS_NS_sys_mman.inl b/ace/OS_NS_sys_mman.inl
index 9592d4c4dfa..c4ece9aac2c 100644
--- a/ace/OS_NS_sys_mman.inl
+++ b/ace/OS_NS_sys_mman.inl
@@ -159,7 +159,7 @@ ACE_OS::mmap (void *addr,
ACE_FAIL_RETURN (MAP_FAILED);
else
return addr_mapping;
-#elif defined (__Lynx__)
+#elif defined (ACE_HAS_LYNX_BROKEN_MMAP)
// The LynxOS 2.5.0 mmap doesn't allow operations on plain
// file descriptors. So, create a shm object and use that.
ACE_UNUSED_ARG (sa);