emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 9f464cc: Stop using calc for ntlm time computation


From: Thomas Fitzsimmons
Subject: Re: master 9f464cc: Stop using calc for ntlm time computation
Date: Mon, 26 Oct 2020 17:19:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi Mattias,

Mattias Engdegård <mattiase@savannah.gnu.org> writes:

> branch: master
> commit 9f464ccaf9acc36b22bc292c6c572048e147d281
> Author: Mattias Engdegård <mattiase@acm.org>
> Commit: Mattias Engdegård <mattiase@acm.org>
>
>     Stop using calc for ntlm time computation
>     
>     * lisp/net/ntlm.el: Don't require calc.
>     (ntlm-compute-timestamp): Use plain arithmetic instead of calc.
>     (ntlm--time-to-timestamp): New helper function.

[...]

> -  ;; FIXME: This can likely be significantly simplified using the new
> -  ;; bignums support!

Thanks for fixing this item.

ntlm.el goes into GNU ELPA so I'd like to keep it working on older
versions of Emacs.  I usually try to keep it working at least back to
Emacs 24.1, the first version to support packages via package.el.

The new code definitely makes sense for Emacs versions that have bignum
support.  However I'd like to know before I bump the ntlm.el version
(and thus make these updates available to GNU ELPA users), are there
configurations anyone knows of where the new code will fail, but the
"calc" version would work?

I seem to remember I wrote the strange calc version to avoid integer
overflow, but I don't remember the characteristics of the system on
which I developed it; maybe it had a 32-bit word size.  Admittedly
though, I recently tried the new calculation code on Emacs 24.1, running
on an x86-64 system, and it works.

Still, if these types of calculations are known to overflow on 32-bit
Emacs builds then my inclination would be to conditionalize them.

Thanks,
Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]