comparison src/sysdep.c @ 2039:fd0cbe945410

[xemacs-hg @ 2004-04-22 03:24:00 by james] Change VALBITS to INT_VALBITS in a number of places.
author james
date Thu, 22 Apr 2004 03:24:02 +0000
parents 9c872f33ecbe
children 04bc9d2f42c7
comparison
equal deleted inserted replaced
2038:c6190a5b1ece 2039:fd0cbe945410
3646 */ 3646 */
3647 long 3647 long
3648 get_random (void) 3648 get_random (void)
3649 { 3649 {
3650 long val = random (); 3650 long val = random ();
3651 #if VALBITS > RAND_BITS 3651 #if INT_VALBITS > RAND_BITS
3652 val = (val << RAND_BITS) ^ random (); 3652 val = (val << RAND_BITS) ^ random ();
3653 #if VALBITS > 2*RAND_BITS 3653 #if INT_VALBITS > 2*RAND_BITS
3654 val = (val << RAND_BITS) ^ random (); 3654 val = (val << RAND_BITS) ^ random ();
3655 #if VALBITS > 3*RAND_BITS 3655 #if INT_VALBITS > 3*RAND_BITS
3656 val = (val << RAND_BITS) ^ random (); 3656 val = (val << RAND_BITS) ^ random ();
3657 #if VALBITS > 4*RAND_BITS 3657 #if INT_VALBITS > 4*RAND_BITS
3658 val = (val << RAND_BITS) ^ random (); 3658 val = (val << RAND_BITS) ^ random ();
3659 #endif /* need at least 5 */ 3659 #endif /* need at least 5 */
3660 #endif /* need at least 4 */ 3660 #endif /* need at least 4 */
3661 #endif /* need at least 3 */ 3661 #endif /* need at least 3 */
3662 #endif /* need at least 2 */ 3662 #endif /* need at least 2 */
3663 return val & ((1L << VALBITS) - 1); 3663 return val & (EMACS_INT) ((1UL << INT_VALBITS) - 1);
3664 } 3664 }
3665 3665
3666 3666
3667 /************************************************************************/ 3667 /************************************************************************/
3668 /* Strings corresponding to defined signals */ 3668 /* Strings corresponding to defined signals */