diff -r 439407fc29e1 -r ca20f9ffcb62 src/cx/common.h --- a/src/cx/common.h Wed Dec 18 15:36:45 2024 +0100 +++ b/src/cx/common.h Wed Dec 18 15:40:13 2024 +0100 @@ -99,6 +99,18 @@ #include // --------------------------------------------------------------------------- +// Architecture Detection +// --------------------------------------------------------------------------- + +#if INTPTR_MAX == INT64_MAX +#define CX_WORDSIZE 64 +#elif INTPTR_MAX == INT32_MAX +#define CX_WORDSIZE 32 +#else +#error Unknown pointer size or missing size macros! +#endif + +// --------------------------------------------------------------------------- // Attribute definitions // ---------------------------------------------------------------------------