diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-28 06:33:54 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-28 06:33:54 -0700 |
commit | e435700d50234e9cc1121858b194462110db9dba (patch) | |
tree | 027698c71f11eed38dd55ed94a6c11492ed45666 | |
parent | d0c176d3cc719d136cd3c19eb1d057193300b407 (diff) | |
download | txr-e435700d50234e9cc1121858b194462110db9dba.tar.gz txr-e435700d50234e9cc1121858b194462110db9dba.tar.bz2 txr-e435700d50234e9cc1121858b194462110db9dba.zip |
Remove bogus code for 128 bit platform.
* rand.c (make_random_state): Issue #error if SIZEOF_PTR
exceeds 8, rather than including bogus code that
neglects to use the remaining upper 32 bits.
-rw-r--r-- | rand.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -129,15 +129,12 @@ val make_random_state(val seed) memset(r->state, 0xAA, sizeof r->state); r->state[0] = s & 0xFFFFFFFFul; -#if SIZEOF_PTR >= 8 +#if SIZEOF_PTR == 8 s >>= 32; if (s) r->state[1] = s & 0xFFFFFFFFul; -#endif -#if SIZEOF_PTR >= 16 - s >>= 32; - if (s) - r->state[2] = s & 0xFFFFFFFFul; +#elif SIZEOF_PTR > 8 +#error port me! #endif } else if (nilp(seed)) { val time = time_sec_usec(); |