Mercurial > hg > xemacs-beta
diff src/number.h @ 3391:639cdee384e4
[xemacs-hg @ 2006-05-10 15:03:35 by james]
Fix bignum arithmetic on 64-bit platforms. See xemacs-patches message with ID
<m364kg9nnq.fsf@jerrypc.cs.usu.edu>.
author | james |
---|---|
date | Wed, 10 May 2006 15:03:35 +0000 |
parents | f557693c61de |
children | b5e1d4f6b66f |
line wrap: on
line diff
--- a/src/number.h Tue May 09 21:51:20 2006 +0000 +++ b/src/number.h Wed May 10 15:03:35 2006 +0000 @@ -100,6 +100,16 @@ return Fcanonicalize_number (retval); \ } while (0) +#if SIZEOF_EMACS_INT == SIZEOF_LONG +# define bignum_fits_emacs_int_p(b) bignum_fits_long_p(b) +# define bignum_to_emacs_int(b) bignum_to_long(b) +#elif SIZEOF_EMACS_INT == SIZEOF_INT +# define bignum_fits_emacs_int_p(b) bignum_fits_int_p(b) +# define bignum_to_emacs_int(b) bignum_to_int(b) +#else +# error Bignums currently do not work with long long Emacs integers. +#endif + extern Lisp_Object make_bignum (long); extern Lisp_Object make_bignum_bg (bignum); extern bignum scratch_bignum, scratch_bignum2;