rcx

library of miscellaneous bits of C code
git clone git://git.rr3.xyz/rcx
Log | Files | Refs | README | LICENSE

commit 12e5bbb362380c6fed6b4a22dc51fc286313ad13
parent 7657930c27c7c96a5fa55334cfc87eb4404ba57f
Author: Robert Russell <robertrussell.72001@gmail.com>
Date:   Sat,  3 Jun 2023 18:56:55 -0700

Add R_CACHE_LINE_SIZE

Also make it so R_LITTLE_ENDIAN/R_BIG_ENDIAN can be explicitly
set (e.g., in config.mk).

Diffstat:
Minc/def.h | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/inc/def.h b/inc/def.h @@ -65,6 +65,7 @@ #error "Expected CHAR_BIT == 8" #endif +#if !defined(R_LITTLE_ENDIAN) && !defined(R_BIG_ENDIAN) #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define R_LITTLE_ENDIAN 1 #elif defined(__BYTE_ORDER__) && __BYTE_ORDER == __ORDER_BIG_ENDIAN__ @@ -73,6 +74,11 @@ #error "Can not detect endianness" /* If this ever happens, improve the above tests. */ #endif +#endif + +#ifndef R_CACHE_LINE_SIZE +#define R_CACHE_LINE_SIZE 64 +#endif #ifdef __SIZEOF_INT128__ #define R_HAVE_128 1