mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
chore: fix architectures and endianness check (#37)
This commit is contained in:
@@ -8,8 +8,15 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
|
#include "folly/Portability.h"
|
||||||
|
|
||||||
namespace hf3fs {
|
namespace hf3fs {
|
||||||
|
|
||||||
|
#if !FOLLY_X64 && !FOLLY_AARCH64
|
||||||
|
#error "The platform must be 64bit!"
|
||||||
|
#endif
|
||||||
|
static_assert(std::endian::native == std::endian::little);
|
||||||
|
|
||||||
// `Status` imitates `abseil::Status` which contains:
|
// `Status` imitates `abseil::Status` which contains:
|
||||||
// - code
|
// - code
|
||||||
// - (optional) message
|
// - (optional) message
|
||||||
@@ -101,7 +108,6 @@ class [[nodiscard]] Status {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static_assert(StatusCode::kOK == 0, "StatusCode::kOK must be 0!");
|
static_assert(StatusCode::kOK == 0, "StatusCode::kOK must be 0!");
|
||||||
static_assert(__x86_64__, "The platform must be 64bit!");
|
|
||||||
static_assert(sizeof(status_code_t) == 2, "The width of status_code_t must be 16b");
|
static_assert(sizeof(status_code_t) == 2, "The width of status_code_t must be 16b");
|
||||||
|
|
||||||
static constexpr auto kPtrBits = 48u;
|
static constexpr auto kPtrBits = 48u;
|
||||||
|
|||||||
Reference in New Issue
Block a user