From 10b48028690d37ca505ed6e1c653325f752ab1f1 Mon Sep 17 00:00:00 2001 From: grischka Date: Tue, 15 Jun 2010 17:02:35 +0200 Subject: [PATCH] Fix "Fix bashims in configure ..." for MSYS Fixes commit dc265feb63c70a1a76fb566a6c05fe62246b65a0 --- configure | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/configure b/configure index b3de471..b981785 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #!/bin/sh # # tcc configure script (c) 2003 Fabrice Bellard -# + # set temporary file name if test ! -z "$TMPDIR" ; then TMPDIR1="${TMPDIR}" @@ -11,21 +11,13 @@ else TMPDIR1="/tmp" fi -RDM1="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -RDM2="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -TMPC="${TMPDIR1}/tcc-conf-${RDM1}-$$-${RDM2}.c" -RDM1="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -RDM2="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -TMPO="${TMPDIR1}/tcc-conf-${RDM1}-$$-${RDM2}.o" -RDM1="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -RDM2="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -TMPE="${TMPDIR1}/tcc-conf-${RDM1}-$$-${RDM2}" -RDM1="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -RDM2="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -TMPS="${TMPDIR1}/tcc-conf-${RDM1}-$$-${RDM2}.S" -RDM1="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -RDM2="$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )" -TMPH="${TMPDIR1}/tcc-conf-${RDM1}-$$-${RDM2}.h" +# bashism: TMPN="${TMPDIR1}/tcc-conf-${RANDOM}-$$-${RANDOM}.c" +TMPN="./conftest-$$" + +TMPC=$TMPN.c +TMPH=$TMPN.h +TMPO=$TMPN.o +TMPE=$TMPN # default parameters build_cross="no" @@ -407,4 +399,4 @@ else echo "config.h is unchanged" fi -rm -f $TMPO $TMPC $TMPE $TMPS $TMPH +rm -f $TMPN*