From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OyoeM-0001tK-Oh for mharc-grub-devel@gnu.org; Thu, 23 Sep 2010 12:27:58 -0400 Received: from [140.186.70.92] (port=42455 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OyoeI-0001oj-Vv for grub-devel@gnu.org; Thu, 23 Sep 2010 12:27:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OyoeG-0003aj-U0 for grub-devel@gnu.org; Thu, 23 Sep 2010 12:27:54 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:50552) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyoeG-0003aJ-Ns for grub-devel@gnu.org; Thu, 23 Sep 2010 12:27:52 -0400 Received: by wwb24 with SMTP id 24so1972105wwb.30 for ; Thu, 23 Sep 2010 09:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=JgW+wPhYlMI7S5csIv4KXvsDKQGOkgA3Ap65LjV3mw4=; b=V3g9mBz1uvrq80vZ87Oa2FB8vELLOLGK3BMYRTENGwJH3LLSgpufgQLGaUBcOleQ3t mJWNJN1rkL/yjljpK7KYtq2KfrevhfqRo5wGdbDrR6K7CwVjW/DFEHZWQy2ygmZq5eOO 95BwitfN2LyxOF6z5cMQLmam+f9xSMDJg6P/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=AIE4cIvAM8OZM8YjIcu7lmRED/PJWpyYDH7nSqIvBBiv516+i7Y3yqf/wVMVPcfNqx 4i6KZl3yZzRKOTZCY4eDo2zwbYj+s5x60s85v6KLpM5D7rCgOvqsHxG8Ty/6r/6B//8s /1awbsNcV3Sy+pWzqedq6cOagpDeIoUr7jnTc= Received: by 10.216.53.74 with SMTP id f52mr1667132wec.112.1285259271283; Thu, 23 Sep 2010 09:27:51 -0700 (PDT) Received: from [147.210.129.4] (laptop-147-210-129-4.labri.fr [147.210.129.4]) by mx.google.com with ESMTPS id n17sm629953weq.6.2010.09.23.09.27.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Sep 2010 09:27:50 -0700 (PDT) Message-ID: <4C9B8003.4090003@gmail.com> Date: Thu, 23 Sep 2010 18:27:47 +0200 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.9.1.11) Gecko/20100723 Lightning/1.0b2pre Shredder/3.0.6 MIME-Version: 1.0 To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Portable mktemp invocation? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2010 16:27:56 -0000 Hi, We use `mktemp' or `mktemp -d' (with no argument) in the shell scripts: - grub-core/genmod.sh.in - tests/util/grub-shell.in - tests/util/grub-shell-tester.in - tests/grub_script_blockarg.in - tests/partmap_test.in - util/powerpc/ieee1275/grub-mkrescue.in But such invocations of mktemp fail on some systems (NetBSD, and, according to their man pages, FreeBSD and MacOS X). A simple solution would be to replace those invocations with: mktemp [-d] ${TMPDIR:-/tmp}/tmp.XXXXXXXXXX What do you think? Is there a better alternative? Grégoire