wok-next annotate ffmpeg-svn/stuff/ffmpeg-svn-23117-mktemp.patch @ rev 5836
Up: xfconf* (4.6.2)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri Jul 16 08:10:41 2010 +0200 (2010-07-16) |
parents | |
children |
rev | line source |
---|---|
jozee@5569 | 1 --- ffmpeg/configure Mon Apr 19 12:17:54 2010 |
jozee@5569 | 2 +++ ffmpeg/configure Mon Apr 19 12:22:54 2010 |
jozee@5569 | 3 @@ -1666,34 +1666,12 @@ |
jozee@5569 | 4 : ${TMPDIR:=$TMP} |
jozee@5569 | 5 : ${TMPDIR:=/tmp} |
jozee@5569 | 6 |
jozee@5569 | 7 -if ! check_cmd type mktemp; then |
jozee@5569 | 8 - # simple replacement for missing mktemp |
jozee@5569 | 9 - # NOT SAFE FOR GENERAL USE |
jozee@5569 | 10 - mktemp(){ |
jozee@5569 | 11 - echo "${2%XXX*}.${HOSTNAME}.${UID}.$$" |
jozee@5569 | 12 - } |
jozee@5569 | 13 -fi |
jozee@5569 | 14 - |
jozee@5569 | 15 -tmpfile(){ |
jozee@5569 | 16 - tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 && |
jozee@5569 | 17 - (set -C; exec > $tmp) 2>/dev/null || |
jozee@5569 | 18 - die "Unable to create temporary file in $TMPDIR." |
jozee@5569 | 19 - append TMPFILES $tmp |
jozee@5569 | 20 - eval $1=$tmp |
jozee@5569 | 21 -} |
jozee@5569 | 22 - |
jozee@5569 | 23 -trap 'rm -f -- $TMPFILES' EXIT |
jozee@5569 | 24 -trap exit HUP INT TERM |
jozee@5569 | 25 - |
jozee@5569 | 26 -tmpfile TMPC .c |
jozee@5569 | 27 -tmpfile TMPE $EXESUF |
jozee@5569 | 28 -tmpfile TMPH .h |
jozee@5569 | 29 -tmpfile TMPO .o |
jozee@5569 | 30 -tmpfile TMPS .S |
jozee@5569 | 31 -tmpfile TMPV .ver |
jozee@5569 | 32 -tmpfile TMPSH .sh |
jozee@5569 | 33 - |
jozee@5569 | 34 -unset -f mktemp |
jozee@5569 | 35 +TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c" |
jozee@5569 | 36 +TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}" |
jozee@5569 | 37 +TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h" |
jozee@5569 | 38 +TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o" |
jozee@5569 | 39 +TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S" |
jozee@5569 | 40 +TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh" |
jozee@5569 | 41 |
jozee@5569 | 42 # make sure we can execute files in $TMPDIR |
jozee@5569 | 43 cat > $TMPSH 2>> $logfile <<EOF |