forked from pool/emacs
42 lines
999 B
Diff
42 lines
999 B
Diff
From 54823555425ffabe31b42672b1894d0e3ff1b018 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= <bjorn.bidar@thaodan.de>
|
|
Date: Fri, 10 Feb 2023 23:31:35 +0200
|
|
Subject: [PATCH] Allow to override pdmp base
|
|
|
|
---
|
|
src/emacs.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/src/emacs.c b/src/emacs.c
|
|
index 687b8c7f81f0..2d6bfe07d813 100644
|
|
--- src/emacs.c
|
|
+++ src/emacs.c
|
|
@@ -920,11 +920,15 @@ load_pdump (int argc, char **argv, char *dump_file)
|
|
NULL
|
|
#endif
|
|
;
|
|
+#ifdef PDMP_BASE
|
|
+ const char *argv0_base = PDMP_BASE
|
|
+#else
|
|
const char *argv0_base =
|
|
#ifdef NS_SELF_CONTAINED
|
|
"Emacs"
|
|
#else
|
|
"emacs"
|
|
+#endif
|
|
#endif
|
|
;
|
|
|
|
@@ -1065,7 +1069,11 @@ load_pdump (int argc, char **argv, char *dump_file)
|
|
if (IS_DIRECTORY_SEP (*p))
|
|
last_sep = p;
|
|
}
|
|
+#ifdef PDMP_BASE
|
|
+ argv0_base = PDMP_BASE;
|
|
+#else
|
|
argv0_base = last_sep ? last_sep + 1 : argv[0];
|
|
+#endif
|
|
ptrdiff_t needed = (strlen (path_exec)
|
|
+ 1
|
|
+ strlen (argv0_base)
|