Mercurial > hg > xemacs-beta
changeset 1466:88a2f43560bf
[xemacs-hg @ 2003-05-09 01:41:56 by youngs]
2003-05-09 Martin Buchholz <martin@xemacs.org>
* dumper.c (pdump_load): Pdump'ed XEmacs can't find its .dmp file.
Scenario: Prepend ~/bin to PATH; then `mkdir ~/bin/xemacs'
Result: "temacs can only be run in -batch mode."
Fix: Check xemacs executable candidate for directory-ness.
author | youngs |
---|---|
date | Fri, 09 May 2003 01:41:56 +0000 |
parents | 1adfc587e790 |
children | e5da225ea2ca |
files | src/ChangeLog src/dumper.c |
diffstat | 2 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu May 08 21:52:32 2003 +0000 +++ b/src/ChangeLog Fri May 09 01:41:56 2003 +0000 @@ -1,3 +1,10 @@ +2003-05-09 Martin Buchholz <martin@xemacs.org> + + * dumper.c (pdump_load): Pdump'ed XEmacs can't find its .dmp file. + Scenario: Prepend ~/bin to PATH; then `mkdir ~/bin/xemacs' + Result: "temacs can only be run in -batch mode." + Fix: Check xemacs executable candidate for directory-ness. + 2003-05-06 Martin Buchholz <martin@xemacs.org> * database.c: Berkeley DB wants __STDC__ to be defined.
--- a/src/dumper.c Thu May 08 21:52:32 2003 +0000 +++ b/src/dumper.c Fri May 09 01:41:56 2003 +0000 @@ -1595,8 +1595,17 @@ } strcpy (w, name); - if (!access (exe_path, X_OK)) - break; +#undef access /* avoid !@#$%^& encapsulated access */ +#undef stat /* avoid !@#$%^& encapsulated stat */ + + { + struct stat statbuf; + if (access (exe_path, X_OK) == 0 + && stat (exe_path, &statbuf) == 0 + && ! S_ISDIR (statbuf.st_mode)) + break; + } + if (!*p) { /* Oh well, let's have some kind of default */