unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Make temp file in coding.test work on MS-Windows
@ 2014-08-09 14:16 Eli Zaretskii
  2014-08-12 20:14 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2014-08-09 14:16 UTC (permalink / raw)
  To: guile-devel

I've built Guile 2.0.11 on another system, and found a problem in
coding.test: it assumes that /tmp exists, and creates the temporary
files there.  Here's the patch to make that more portable:

--- test-suite/tests/coding.test~0	2014-01-21 23:45:02.000000000 +0200
+++ test-suite/tests/coding.test	2014-08-09 13:16:46.416750000 +0300
@@ -20,7 +20,10 @@
   #:use-module (test-suite lib))
 
 (define (with-temp-file proc)
-  (let* ((name (string-copy "/tmp/coding-test.XXXXXX"))
+  (let* ((tmpdir (or (getenv "TMPDIR")
+		     (getenv "TEMP")
+		     "/tmp"))
+	 (name (string-concatenate (list tmpdir "/coding-test.XXXXXX")))
          (port (mkstemp! name)))
     (let ((res (with-throw-handler
                 #t





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-08-13 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-09 14:16 Make temp file in coding.test work on MS-Windows Eli Zaretskii
2014-08-12 20:14 ` Ludovic Courtès
2014-08-12 21:35   ` Mark H Weaver
2014-08-13  1:30     ` Nala Ginrut
2014-08-13  3:02       ` Mark H Weaver
2014-08-13 15:43     ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).