diff -r b0098854071f -r c773da859bad src/cx/common.h --- a/src/cx/common.h Sun Dec 15 15:23:29 2024 +0100 +++ b/src/cx/common.h Sun Dec 15 15:41:18 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 // ---------------------------------------------------------------------------