-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[c++] Add check for if PAGE_SIZE is defined. Issue #405.
- Loading branch information
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -174,7 +174,9 @@ size_t MemoryMappedFile::getMemorySize() const | |
return m_memorySize; | ||
} | ||
|
||
#if !defined(PAGE_SIZE) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mjpt777
Author
Contributor
|
||
size_t MemoryMappedFile::PAGE_SIZE = getPageSize(); | ||
#endif | ||
|
||
#ifdef _WIN32 | ||
MemoryMappedFile::MemoryMappedFile(FileHandle fd, size_t offset, size_t length) | ||
|
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.