From: Eli Zaretskii Date: Sat, 17 Apr 2021 14:29:17 +0000 (+0300) Subject: * emacs.c (load_pdump): Fix compilation on picky-complier platforms. X-Git-Tag: emacs-28.0.90~2727^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb4c41f0621887172f4ababbbe65ceadb01581ec;p=emacs.git * emacs.c (load_pdump): Fix compilation on picky-complier platforms. --- diff --git a/src/emacs.c b/src/emacs.c index d27b1c1351d..2fc93631c9e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -820,6 +820,7 @@ load_pdump (int argc, char **argv) NULL #endif ; + const char *argv0_base = "emacs"; /* TODO: maybe more thoroughly scrub process environment in order to make this use case (loading a dump file in an unexeced emacs) @@ -891,6 +892,7 @@ load_pdump (int argc, char **argv) dump_file, dump_error_to_string (result)); hardcoded: + #ifdef WINDOWSNT /* On MS-Windows, PATH_EXEC normally starts with a literal "%emacs_dir%", so it will never work without some tweaking. */ @@ -900,7 +902,6 @@ load_pdump (int argc, char **argv) /* Look for "emacs.pdmp" in PATH_EXEC. We hardcode "emacs" in "emacs.pdmp" so that the Emacs binary still works if the user copies and renames it. */ - const char *argv0_base = "emacs"; needed = (strlen (path_exec) + 1 + strlen (argv0_base)