summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmir Taaki <genjix@riseup.net>2014-03-30 16:35:13 (GMT)
committer Amir Taaki <genjix@riseup.net>2014-03-30 16:40:05 (GMT)
commitf79f77a64b651dfd8258572c400666511ab4bd15 (patch)
tree35bf8ff4d687d427dab01bcd243d9454c4452747
parent4a843ce9219cee73caf5ab0e548fbf84b2f43a2c (diff)
add assert to check whether system is 64bit.
-rw-r--r--src/utility/mmfile.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utility/mmfile.cpp b/src/utility/mmfile.cpp
index 1821609..267a473 100644
--- a/src/utility/mmfile.cpp
+++ b/src/utility/mmfile.cpp
@@ -28,6 +28,7 @@
#endif
#include <sys/types.h>
#include <sys/stat.h>
+#include <bitcoin/utility/assert.hpp>
namespace libbitcoin {
@@ -35,6 +36,7 @@ mmfile::mmfile(const std::string& filename)
{
#ifndef _MSC_VER
// Not yet MSVC portable (maybe windows).
+ BITCOIN_ASSERT_MSG(sizeof (void*) == 8, "Not a 64bit system!");
file_handle_ = open(filename.c_str(),
O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if (file_handle_ == -1)
@@ -69,4 +71,4 @@ size_t mmfile::size() const
return size_;
}
-} // namespace libbitcoin \ No newline at end of file
+} // namespace libbitcoin