From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: Make temp file in coding.test work on MS-Windows Date: Tue, 12 Aug 2014 22:14:16 +0200 Message-ID: <87tx5hfotj.fsf@gnu.org> References: <83oavtlpe1.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1407874488 13099 80.91.229.3 (12 Aug 2014 20:14:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2014 20:14:48 +0000 (UTC) Cc: guile-devel To: Eli Zaretskii Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Aug 12 22:14:41 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XHISu-0005dM-H7 for guile-devel@m.gmane.org; Tue, 12 Aug 2014 22:14:40 +0200 Original-Received: from localhost ([::1]:43880 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHISt-0000eO-QP for guile-devel@m.gmane.org; Tue, 12 Aug 2014 16:14:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHISj-0000d3-Ew for guile-devel@gnu.org; Tue, 12 Aug 2014 16:14:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHISe-0000Bz-15 for guile-devel@gnu.org; Tue, 12 Aug 2014 16:14:29 -0400 Original-Received: from hera.aquilenet.fr ([2a01:474::1]:60404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHISY-0000AM-1y; Tue, 12 Aug 2014 16:14:18 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7EFD037D1; Tue, 12 Aug 2014 22:14:17 +0200 (CEST) Original-Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c3d1XNX8qdZD; Tue, 12 Aug 2014 22:14:17 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 24C7837C6; Tue, 12 Aug 2014 22:14:17 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Thermidor an 222 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <83oavtlpe1.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Aug 2014 17:16:22 +0300") User-Agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:474::1 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17325 Archived-At: Eli Zaretskii 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)) >=20=20 > (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. Ludo=E2=80=99.