diff options
| author | Stefan Kangas | 2022-06-21 06:30:25 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-06-21 06:30:25 +0200 |
| commit | c175984e2c909979da915ac46b0c92de67f4b249 (patch) | |
| tree | da1edbf9fa41a6ccd2a54e9fe1cfffd6ddf3c211 /src | |
| parent | 1d681a57005c837a58c9b3a365bc59f7293c4df5 (diff) | |
| parent | 2eb738f2b8a3948b590ac7a6640f317a5cb12918 (diff) | |
| download | emacs-c175984e2c909979da915ac46b0c92de67f4b249.tar.gz emacs-c175984e2c909979da915ac46b0c92de67f4b249.zip | |
Merge from origin/emacs-28
2eb738f2b8 Support builds configured with a separate --bindir
cf4c204df8 * doc/misc/eww.texi (Overview, Basics): Fix typos.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/emacs.c b/src/emacs.c index 236add1157d..5098acd7225 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -975,20 +975,24 @@ load_pdump (int argc, char **argv) | |||
| 975 | sprintf (dump_file, "%s%c%s-%s%s", | 975 | sprintf (dump_file, "%s%c%s-%s%s", |
| 976 | path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix); | 976 | path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix); |
| 977 | #if !defined (NS_SELF_CONTAINED) | 977 | #if !defined (NS_SELF_CONTAINED) |
| 978 | /* Assume the Emacs binary lives in a sibling directory as set up by | 978 | if (!(emacs_executable && *emacs_executable)) |
| 979 | the default installation configuration. */ | 979 | { |
| 980 | const char *go_up = "../../../../bin/"; | 980 | /* If we didn't find the Emacs binary, assume that it lives in a |
| 981 | needed += (strip_suffix ? strlen (strip_suffix) : 0) | 981 | sibling directory as set up by the default installation |
| 982 | - strlen (suffix) + strlen (go_up); | 982 | configuration. */ |
| 983 | if (exec_bufsize < needed) | 983 | const char *go_up = "../../../../bin/"; |
| 984 | { | 984 | needed += (strip_suffix ? strlen (strip_suffix) : 0) |
| 985 | xfree (emacs_executable); | 985 | - strlen (suffix) + strlen (go_up); |
| 986 | emacs_executable = xpalloc (NULL, &exec_bufsize, needed - exec_bufsize, | 986 | if (exec_bufsize < needed) |
| 987 | -1, 1); | 987 | { |
| 988 | } | 988 | xfree (emacs_executable); |
| 989 | sprintf (emacs_executable, "%s%c%s%s%s", | 989 | emacs_executable = xpalloc (NULL, &exec_bufsize, |
| 990 | path_exec, DIRECTORY_SEP, go_up, argv0_base, | 990 | needed - exec_bufsize, -1, 1); |
| 991 | strip_suffix ? strip_suffix : ""); | 991 | } |
| 992 | sprintf (emacs_executable, "%s%c%s%s%s", | ||
| 993 | path_exec, DIRECTORY_SEP, go_up, argv0_base, | ||
| 994 | strip_suffix ? strip_suffix : ""); | ||
| 995 | } | ||
| 992 | #endif | 996 | #endif |
| 993 | result = pdumper_load (dump_file, emacs_executable); | 997 | result = pdumper_load (dump_file, emacs_executable); |
| 994 | 998 | ||