]> git.eshelyaron.com Git - emacs.git/commit
Rework eln hash filename strategy
authorAndrea Corallo <akrl@sdf.org>
Sat, 22 Aug 2020 09:11:21 +0000 (11:11 +0200)
committerAndrea Corallo <akrl@sdf.org>
Sun, 23 Aug 2020 10:08:26 +0000 (12:08 +0200)
commit5f5d664c734414597c1c7d9981b1ceb9ff69c5b1
tree9f9d772717772a640af81be00ae48acb5ed4e574
parent9baa0296aaca6ff1b547817a4eba5d8740ae3e5e
Rework eln hash filename strategy

Generate eln filename hashing also the source file content in the form:

/absolute/path/filename.el + content ->
eln-cache/filename-path_hash-content_hash.eln

* src/lread.c (maybe_swap_for_eln): Always call
Fcomp_el_to_eln_filename on an existing source file.

* src/comp.c (md5.h, sysstdio.h, zlib.h): New include.
(comp_hash_string): Use md5 instead of sha512.
(MD5_BLOCKSIZE): New macro.
(accumulate_and_process_md5, final_process_md5, md5_gz_stream)
(comp_hash_source_file): New functions.
(Fcomp_el_to_eln_filename): Rework for hasing using also source
file content.

* src/lread.c (maybe_swap_for_eln): Rename el_name -> src_name as
this can be also a have .el.gz extention.
configure.ac
lib/Makefile.in
src/comp.c
src/lread.c