guile-devel
[Top][All Lists]
Advanced

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

Re: Make temp file in coding.test work on MS-Windows


From: Nala Ginrut
Subject: Re: Make temp file in coding.test work on MS-Windows
Date: Wed, 13 Aug 2014 09:30:03 +0800


2014年8月13日 上午5:36于 "Mark H Weaver" <address@hidden>写道:
>
> address@hidden (Ludovic Courtès) writes:
>
> > Eli Zaretskii <address@hidden> skribis:
> >
> >> 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
> >
> > OK to commit, thanks.
>
> Please untabify the lines you changed, and use 'string-append' instead
> of 'string-concatenate'.
>

Out of topic, IIRC string-concatenate is faster than string-append. Maybe it's unnecessary here?

>       Thanks!
>         Mark
>


reply via email to

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