[m-rev.] diff: fix some problems with --restricted-command-line

Julien Fischer jfischer at opturion.com
Mon May 23 13:04:12 AEST 2016


Fix some problems with --restricted-command-line.

configure.ac:
     The MinGW64 implementation of mkstemp is apparently broken, so
     avoid using it for now.

compiler/compile_target_code.m:
     Don't include an extra "." between the filename and the extension.

Julien.

diff --git a/compiler/compile_target_code.m b/compiler/compile_target_code.m
index fd8770a..a91be6b 100644
--- a/compiler/compile_target_code.m
+++ b/compiler/compile_target_code.m
@@ -1980,8 +1980,7 @@ link_exe_or_shared_lib(Globals, ErrorStream, LinkTargetType, ModuleName,
              RestrictedCommandLine = yes,
              globals.lookup_string_option(Globals, library_extension, LibExt),
              io.get_temp_directory(TempDir, !IO),
-            io.make_temp_file(TempDir, "", "." ++ LibExt, TmpArchiveResult,
-                !IO),
+            io.make_temp_file(TempDir, "", LibExt, TmpArchiveResult, !IO),
              (
                  TmpArchiveResult = ok(TmpArchive),
                  % Only include actual object files in the temporary archive,
diff --git a/configure.ac b/configure.ac
index 3a2258b..6617520 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1300,9 +1300,13 @@ esac
  # Do not try to use sleep() on MinGW or MinGW64 as it isn't available
  # *despite* what the standard autoconf tests report.
  #
+# The MinGW64 implementation of mkstemp is broken; it isn't supported on
+# MinGW32.
+#
  case "$host" in
      *mingw*)
          ac_cv_func_sleep=no
+        ac_cv_func_mkstemp=no
          ;;
  esac



More information about the reviews mailing list