]> git.eshelyaron.com Git - emacs.git/commit
Don't rely on bignums in ntlm.el
authorMattias Engdegård <mattiase@acm.org>
Tue, 27 Oct 2020 10:52:38 +0000 (11:52 +0100)
committerMattias Engdegård <mattiase@acm.org>
Tue, 27 Oct 2020 11:25:57 +0000 (12:25 +0100)
commitf971a612a92eea4c8aab6b002d7998bb0b6f5ca1
tree0c75fdf49e5073e9f5c6c51fcd0beb562afce854
parent990c0620cb9fee3f4779468662d8447c2b301156
Don't rely on bignums in ntlm.el

Since ntlm.el is distributed as a separate package in GNU ELPA and
should be able to run on older Emacs versions without bignums,
we cannot make use of them here.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2020-10/msg01665.html.
Instead, we add a small poor man's bignum implementation.

* lisp/net/ntlm.el (ntlm--bignat-of-int, ntlm--bignat-add)
(ntlm--bignat-shift-left, ntlm--bignat-mul-byte, ntlm--bignat-mul)
(ntlm--bignat-of-string, ntlm--bignat-of-digits)
(ntlm--bignat-to-int64): New.
(ntlm--time-to-timestamp): Use the ntlm--bignat- functions instead
of Lisp integers.
* test/lisp/net/ntlm-tests.el: New file.
lisp/net/ntlm.el
test/lisp/net/ntlm-tests.el [new file with mode: 0644]