summaryrefslogtreecommitdiffstats
path: root/omni
diff options
context:
space:
mode:
Diffstat (limited to 'omni')
-rw-r--r--omni/BUILD.bazel2
-rw-r--r--omni/stdint.h (renamed from omni/int.h)6
2 files changed, 5 insertions, 3 deletions
diff --git a/omni/BUILD.bazel b/omni/BUILD.bazel
index 8e29939..ca62d73 100644
--- a/omni/BUILD.bazel
+++ b/omni/BUILD.bazel
@@ -3,7 +3,7 @@ load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "omni_impl",
hdrs = [
- ":int.h",
+ ":stdint.h",
":platform.h"
],
visibility = ["//visibility:public"]
diff --git a/omni/int.h b/omni/stdint.h
index ce27730..088b584 100644
--- a/omni/int.h
+++ b/omni/stdint.h
@@ -3,6 +3,8 @@
#include <stdint.h>
+#include "omni/platform.h"
+
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
@@ -31,7 +33,7 @@ typedef double f64;
#define I32_MAX INT32_MAX
#define I64_MAX INT64_MAX
-#if UINTPTR_MAX == UINT64_MAX
+#if OMNI_ARCH_64BIT
typedef u64 usize;
typedef i64 isize;
@@ -40,7 +42,7 @@ typedef i64 isize;
#define ISIZE_MIN INT64_MIN
#define ISIZE_MAX INT64_MAX
-#elif UINTPTR_MAX == UINT32_MAX
+#elif OMNI_ARCH_32BIT
typedef u32 usize;
typedef i32 isize;