]> git.eshelyaron.com Git - emacs.git/commit
Improve pdump file search and 'pdumper-stats'
authorEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2019 10:08:56 +0000 (12:08 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 26 Jan 2019 10:08:56 +0000 (12:08 +0200)
commita7974933dd818194de3c9387b95dbd122bcf506c
tree313d57e1561420c541114795150193c4c199570b
parentbf4099b23738f0a481fb6020337039d84506fda4
Improve pdump file search and 'pdumper-stats'

* src/pdumper.c (pdumper_record_wd): New function.
(pdumper_load): Use xstrdup instead of strdup, as on
MS-Windows the latter uses the wrong heap.  Don't free a
NULL pointer.
* src/emacs.c (load_pdump): Support the use case where the
Emacs binary was renamed: look in exec-directory for the
pdump file whose base name is derived from the Emacs binary,
in addition to just emacs.pdmp.
(main): Call pdumper_record_wd to prepend CWD to the pdump
file name.
* src/fileio.c (file_name_absolute_p): Now extern.
* src/lisp.h (file_name_absolute_p): Add prototype.
* src/pdumper.h (pdumper_record_wd): Add prototype.

* doc/emacs/cmdargs.texi (Initial Options): Update the
documentation of where Emacs looks for the dump file.
doc/emacs/cmdargs.texi
src/emacs.c
src/fileio.c
src/lisp.h
src/pdumper.c
src/pdumper.h