[PATCH] Fix a bug with XEmacs and bignum support.
reinersteib+gmane at imap.cc
Sun Jan 11 12:16:07 EST 2009
On Sun, Jan 11 2009, Aidan Kehoe wrote:
> Ar an t-aonú lá déag de mí Eanair, scríobh Reiner Steib:
> > most-positive-fixnum is only available in Emacs 21 when requiring CL.
> Oops, you’re right, it was included it in C just after the release. Thanks
> for checking.
> > But as CL is required (for ignore-errors), I think this change is
> > fine, so I have installed it.
> It’s not, though, it needs to be something like the following in that case,
> since CL is available at compile time and not necessarily at runtime:
> --- /tmp/aidan/nnfolder.el.orig 2009-01-11 15:50:39.000000000 +0000
> +++ /tmp/aidan/nnfolder.el 2009-01-11 15:50:16.000000000 +0000
> @@ -899,7 +899,9 @@
> (active (or (cadr (assoc group nnfolder-group-alist))
> (cons 1 0)))
> (scantime (assoc group nnfolder-scantime-alist))
> - (minid (lsh -1 -1))
> + (minid (or (and (boundp 'most-positive-fixnum)
> + most-positive-fixnum)
> + 134217727))
> An (eval-when-compile most-positive-fixnum) isn’t appropriate, because the
> compile-time constant could be from a 64-bit machine, which would silently
> overflow in the Lisp reader under GNU
s/GNU/Emacs/, please. :-)
> on a 32-bit machine, and break the algorithm.
If you need to make sure that the correct runtime value is used, I
don't understand why you hard-code 134217727? I would have
(minid (or (and (boundp 'most-positive-fixnum)
(lsh -1 -1)))
What am I missing?
On a 64-bit machine, I get:
,----[ M-x ielm RET ]
| ELISP> (lsh -1 -1)
| ELISP> (emacs-version)
| "GNU Emacs 21.3.1 (x86_64-suse-linux, X toolkit, Xaw3d scroll bars)\n of 2004-1\
| 0-05 on prokofjieff"
| ELISP> (when (require 'cl) most-positive-fixnum)
When I used this machine(s) some years ago, I always compiled Gnus,
AUCTeX, BBDB, emacs-w3m, etc on a 64-bit machine and ran the compiled
Lisp code on both, 64-bit and 32-bit machines
(/usr/local/share/emacs/site-lisp shared via NFS).
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
More information about the XEmacs-Patches