Skip to content

Commit

Permalink
[c++] Add check for if PAGE_SIZE is defined. Issue #405.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Oct 26, 2017
1 parent 43efcbb commit deed279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aeron-client/src/main/cpp/util/MemoryMappedFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ size_t MemoryMappedFile::getMemorySize() const
return m_memorySize;
}

#if !defined(PAGE_SIZE)

This comment has been minimized.

Copy link
@tmontgomery

tmontgomery Oct 26, 2017

Contributor

instead of this, it would be better to rename PAGE_SIZE to something less likely to collide. This will break in interesting ways when PAGE_SIZE is defined.

This comment has been minimized.

Copy link
@mjpt777

mjpt777 Oct 26, 2017

Author Contributor

I was thinking that but thought this was at least is in keeping with the header.

size_t MemoryMappedFile::PAGE_SIZE = getPageSize();
#endif

#ifdef _WIN32
MemoryMappedFile::MemoryMappedFile(FileHandle fd, size_t offset, size_t length)
Expand Down

0 comments on commit deed279

Please sign in to comment.