APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1560850666 -3600
# Tue Jun 18 10:37:46 2019 +0100
# Node ID 30910ee1cf8ced871fbd83ddd0c7039fb29aa425
# Parent 3db0ed5a2a43c15fb3801b1478b9e3d9bae152b0
Avoid a bootstrapping problem on old-Mule with non-Latin-1 in PATH.
src/ChangeLog addition:
2019-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (main_1):
Avoid a bootstrapping problem on old-Mule if there are any
non-ASCII, non-Latin-1 executable names in PATH.
* lread.c (locate_file_without_hash):
Make this non-static, for the sake of emacs.c.
* lisp.h:
Declare locate_file_without_hash().
diff -r 3db0ed5a2a43 -r 30910ee1cf8c src/ChangeLog
--- a/src/ChangeLog Sun Apr 28 11:21:40 2019 +0100
+++ b/src/ChangeLog Tue Jun 18 10:37:46 2019 +0100
@@ -1,3 +1,13 @@
+2019-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * emacs.c (main_1):
+ Avoid a bootstrapping problem on old-Mule if there are any
+ non-ASCII, non-Latin-1 executable names in PATH.
+ * lread.c (locate_file_without_hash):
+ Make this non-static, for the sake of emacs.c.
+ * lisp.h:
+ Declare locate_file_without_hash().
+
2019-04-23 Aidan Kehoe <kehoea(a)parhasard.net>
* elhash.c (syms_of_elhash):
diff -r 3db0ed5a2a43 -r 30910ee1cf8c src/emacs.c
--- a/src/emacs.c Sun Apr 28 11:21:40 2019 +0100
+++ b/src/emacs.c Tue Jun 18 10:37:46 2019 +0100
@@ -2713,9 +2713,14 @@
else
{
Vinvocation_path = split_env_path ("PATH", NULL);
- locate_file (Vinvocation_path, Vinvocation_name,
- Vlisp_EXEC_SUFFIXES,
- &Vinvocation_directory, X_OK);
+ /* There is a bootstrapping issue on old-Mule if there are any
+ non-ASCII, non-Latin-1 executables in PATH, which issue
+ locate_file_without_hash() works around.
+ Old-Mule is still really shafted if its pathname is non-ASCII
+ non-Latin-1 and argv[0] is a non-absolute path. */
+ locate_file_without_hash (Vinvocation_path, Vinvocation_name,
+ Vlisp_EXEC_SUFFIXES,
+ &Vinvocation_directory, X_OK);
}
if (NILP (Vinvocation_directory))
diff -r 3db0ed5a2a43 -r 30910ee1cf8c src/lisp.h
--- a/src/lisp.h Sun Apr 28 11:21:40 2019 +0100
+++ b/src/lisp.h Tue Jun 18 10:37:46 2019 +0100
@@ -5658,6 +5658,8 @@
void ebolify_bytecode_constants (Lisp_Object);
void close_load_descs (void);
int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int);
+int locate_file_without_hash (Lisp_Object, Lisp_Object, Lisp_Object,
+ Lisp_Object *, int);
EXFUN (Flocate_file_clear_hashing, 1);
int isfloat_string (const char *);
int isratio_string (const char *);
diff -r 3db0ed5a2a43 -r 30910ee1cf8c src/lread.c
--- a/src/lread.c Sun Apr 28 11:21:40 2019 +0100
+++ b/src/lread.c Tue Jun 18 10:37:46 2019 +0100
@@ -1103,9 +1103,10 @@
return closure.fd;
}
-/* do the same as locate_file() but don't use any hash tables. */
-
-static int
+/* Do the same as locate_file() but don't use any hash tables. Non-static only
+ because of a need for it from emacs.c, before Vdata_directory is available
+ for the Unicode mapping tables. */
+int
locate_file_without_hash (Lisp_Object path, Lisp_Object str,
Lisp_Object suffixes, Lisp_Object *storeptr,
int mode)
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)
Show replies by date