wok-6.x view ffmpeg-svn/stuff/ffmpeg-svn-23117-mktemp.patch @ rev 6828

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