emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp f89e70a: Fix encoding of file names in comp.c


From: Eli Zaretskii
Subject: feature/native-comp f89e70a: Fix encoding of file names in comp.c
Date: Sun, 7 Mar 2021 08:53:22 -0500 (EST)

branch: feature/native-comp
commit f89e70a7041b061eb40f2b5e0c58a28bfb84920f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix encoding of file names in comp.c
    
    * src/comp.c (Fcomp__compile_ctxt_to_file) [WINDOWSNT]: Fix
    encoding of file names passed to libgccjit.
---
 src/comp.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/comp.c b/src/comp.c
index 7927448..2322ce0 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4371,6 +4371,7 @@ DEFUN ("comp--compile-ctxt-to-file", 
Fcomp__compile_ctxt_to_file,
   comp.func_relocs_local = NULL;
 
 #ifdef WINDOWSNT
+  ebase_name = ansi_encode_filename (ebase_name);
   /* Tell libgccjit the actual file name of the loaded DLL, otherwise
      it will use 'libgccjit.so', which is not useful.  */
   Lisp_Object libgccjit_loaded_from = Fget (Qgccjit, QCloaded_from);
@@ -4476,9 +4477,13 @@ DEFUN ("comp--compile-ctxt-to-file", 
Fcomp__compile_ctxt_to_file,
 
   Lisp_Object tmp_file =
     Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), 
Qnil);
+  Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file);
+#ifdef WINDOWSNT
+  encoded_tmp_file = ansi_encode_filename (encoded_tmp_file);
+#endif
   gcc_jit_context_compile_to_file (comp.ctxt,
                                   GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY,
-                                  SSDATA (ENCODE_FILE (tmp_file)));
+                                  SSDATA (encoded_tmp_file));
 
   const char *err =  gcc_jit_context_get_first_error (comp.ctxt);
   if (err)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]