Files
archived-ballistic/include/bal_platform.h
Ronald Caesar ad0f881e1b engine: udpate clang-format rules
Makes Ballistic more inlime with BARR-C's style guide.

Signed-off-by: Ronald Caesar <github43132@proton.me>
2026-01-24 20:48:49 -04:00

53 lines
831 B
C

#ifndef BALLISTIC_PLATFORM_H
#define BALLISTIC_PLATFORM_H
#if defined(_WIN32) || defined(_WIN64)
#define BAL_PLATFORM_WINDOWS 1
#define BAL_PLATFORM_POSIX 0
#elif defined(__linux__) || defined(__APPLE__)
#define BAL_PLATFORM_WINDOWS 0
#define BAL_PLATFORM_POSIX 1
#else
#error "Unknown Platform"
#endif
#if defined(__aarch64__)
#define BAL_ARCHITECTURE_ARM 1
#define BAL_ARCHITECTURE_X86 0
#elif defined(__x86_64__)
#define BAL_ARCHITECTURE_ARM 0
#define BAL_ARCHITECTURE_X86 1
#else
#error "Ballistic requires a 64-bit ARM or x86 environment."
#endif
#if defined(_MSC_VER)
#define BAL_COMPILER_MSVC 1
#define BAL_COMPILER_GCC 0
#elif defined(__GNUC__) || defined(__clang__)
#define BAL_COMPILER_MSVC 0
#define BAL_COMPILER_GCC 1
#else
#error "Unknown Compiler"
#endif
#endif /* BALLISTIC_PLATFORM_H */