From 27988c5e6648810db2074a2e80edaf74678e9977 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Tue, 22 Jun 2010 18:40:35 +0200 Subject: [PATCH] Use mktemp to generate temp files. Fix the $RANDOM bashism properly by using mktemp. mktemp is part of MSYS so this should work on UNIXes and Windows --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index b981785..82ce6e1 100755 --- a/configure +++ b/configure @@ -11,8 +11,7 @@ else TMPDIR1="/tmp" fi -# bashism: TMPN="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.c" -TMPN="./conftest-$$" +TMPN="$(mktemp --tmpdir=${TMPDIR1} tcc-conf-XXXXXXXXXX-$$-XXXXXXXXXX)" TMPC=$TMPN.c TMPH=$TMPN.h