|
CX Framework
Cross-platform C utility framework
|
Modules | |
| CX Platform Macros | |
Core platform and compiler detection macros used throughout the CX framework. This header defines:
_COMPILER_MSVC, _COMPILER_CLANG, _COMPILER_GCC)_PLATFORM_WIN, _PLATFORM_UNIX, _PLATFORM_LINUX, _PLATFORM_FBSD, _PLATFORM_WASM)_ARCH_X86, _ARCH_X64, _ARCH_ARM64, _ARCH_WASM)_32BIT, _64BIT)Compiler Detection:
_COMPILER_MSVC - Microsoft Visual C++_COMPILER_CLANG - Clang/LLVM_COMPILER_GCC - GNU GCCPlatform Detection:
_PLATFORM_WIN - Windows_PLATFORM_UNIX - Unix-like systems (Linux, FreeBSD)_PLATFORM_LINUX - Linux specifically_PLATFORM_FBSD - FreeBSD specifically_PLATFORM_WASM - WebAssembly (Emscripten)Architecture Detection:
_ARCH_X86 - 32-bit x86_ARCH_X64 - 64-bit x86-64_ARCH_ARM64 - 64-bit ARM_ARCH_WASM - WebAssemblyPortability Macros:
_meta_inline - Force inline for metaprogramming functions_no_inline - Prevent function inlining_no_return - Function never returnsalignMem(bytes) - Align variable/struct to byte boundarystackAlloc(sz) - Allocate on stack (alloca wrapper)_Thread_local - Thread-local storage (C11 compatibility)_Pure - Function has no side effects_Analysis_noreturn - Static analysis hint for noreturnString Constants:
_PLATFORM_STR - Platform name string ("win", "linux", "fbsd", "wasm")_ARCH_STR - Architecture string ("x86", "x64", "arm64", "wasm32")_PLATFORM_ARCH_STR - Combined platform-architecture (e.g., "win-x64")