--- 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 <sys/types.h> // --------------------------------------------------------------------------- +// 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 // ---------------------------------------------------------------------------