aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@celest.fr>2010-06-22 18:40:35 +0200
committerThomas Preud'homme <thomas.preudhomme@celest.fr>2010-06-22 18:40:35 +0200
commit27988c5e6648810db2074a2e80edaf74678e9977 (patch)
treed10eb37359586deb0e4f74fe1d1cd4bac6942ffd /configure
parent9775aea1ab634a74cd4254df85e93d4cbf098cce (diff)
downloadtinycc-27988c5e6648810db2074a2e80edaf74678e9977.tar.gz
tinycc-27988c5e6648810db2074a2e80edaf74678e9977.tar.bz2
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure3
1 files changed, 1 insertions, 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