diff options
Diffstat (limited to 'srfi/srfi-14.h')
-rw-r--r-- | srfi/srfi-14.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/srfi/srfi-14.h b/srfi/srfi-14.h index 40b355236..2621ba22f 100644 --- a/srfi/srfi-14.h +++ b/srfi/srfi-14.h @@ -48,8 +48,15 @@ #define SCM_CHARSET_SIZE 256 +/* We expect 8-bit bytes here. Shoule be no problem in the year + 2001. */ +#ifndef SCM_BITS_PER_LONG +# define SCM_BITS_PER_LONG (sizeof (long) * 8) +#endif + #define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\ - [(idx) / sizeof (long)] & (1 << ((idx) % sizeof (long)))) + [(idx) / SCM_BITS_PER_LONG] &\ + (1 << ((idx) % SCM_BITS_PER_LONG))) #define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset)) |