aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2026-01-19 12:39:46 -0800
committerPaul Eggert2026-01-19 12:49:16 -0800
commit1ca5eda85e0214bf3a8b8fa0b5da56aa5e9297c5 (patch)
tree6f80cbac4cf5f6b24fda05fa2170ab4fe0d287ef /src
parent4a0919df7f15c4322b983a913a429dc7d52b0bdc (diff)
downloademacs-1ca5eda85e0214bf3a8b8fa0b5da56aa5e9297c5.tar.gz
emacs-1ca5eda85e0214bf3a8b8fa0b5da56aa5e9297c5.zip
Don’t use C basename function
* src/pdumper.c (pdumper_set_emacs_execdir): Don’t use basename; simply use the pointer we already have. If we ever need a basename-like function in the future, we should use Gnulib’s basename-lgpl module, as POSIX basename modifies its argument string and is incompatible with glibc/Android basename; see <https://www.gnu.org/software/gnulib/manual/html_node/basename.html>.
Diffstat (limited to 'src')
-rw-r--r--src/pdumper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index 615c0cf28c9..9b26c80a479 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -5650,7 +5650,7 @@ pdumper_set_emacs_execdir (char *emacs_executable)
5650 eassert (p > emacs_executable); 5650 eassert (p > emacs_executable);
5651 5651
5652#if HAVE_NS && !NS_SELF_CONTAINED 5652#if HAVE_NS && !NS_SELF_CONTAINED
5653 if (strcmp (basename (emacs_executable), "Emacs") == 0) 5653 if (strcmp (p, "Emacs") == 0)
5654 { 5654 {
5655 /* This is the Emacs executable from the non-self-contained app 5655 /* This is the Emacs executable from the non-self-contained app
5656 bundle which can be anywhere on the system. Fortunately, the 5656 bundle which can be anywhere on the system. Fortunately, the