diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-10-13 04:06:02 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-10-13 04:06:02 +0000 |
commit | e43b3a4a0ce4bc5002169edc19e1ff8e7c73c39a (patch) | |
tree | 016d99a5354f49dda402614f781cf22bce9b87ad /ace/Mem_Map.cpp | |
parent | 92b559bc40e068857f6d1eeeac55735f3005a45b (diff) | |
download | ATCD-e43b3a4a0ce4bc5002169edc19e1ff8e7c73c39a.tar.gz |
.
Diffstat (limited to 'ace/Mem_Map.cpp')
-rw-r--r-- | ace/Mem_Map.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp index 2f15e3ec365..ca56554ab6d 100644 --- a/ace/Mem_Map.cpp +++ b/ace/Mem_Map.cpp @@ -61,12 +61,18 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle, this->base_addr_ = addr; this->handle_ = handle; - // @@ Alberto, can you please check this method? It's changed a lot - // since your patches and I'm not sure if it runs on Chorus now. - long result = ACE_OS::filesize (this->handle_); +#if defined (CHORUS) + // Chorus does not support filesize on a shared memory handle. We + // assume that <length_> = 0 when <ACE_Mem_Map> is initially + // constructed (i.e., before <map_it> is called with a valid + // <len_request>). + long result = this->length_; if (result == -1) return -1; +#else + long result = ACE_OS::filesize (this->handle_); +#endif /* CHORUS */ // At this point we know <result> is not negative... size_t current_file_length = ACE_static_cast (size_t, result); |