diff -ur build-tree-apache.orig/apache_1.3.34/src/helpers/fmn.sh build-tree-apache/apache_1.3.34/src/helpers/fmn.sh
--- build-tree-apache.orig/apache_1.3.34/src/helpers/fmn.sh	2004-02-16 22:23:09.000000000 +0000
+++ build-tree-apache/apache_1.3.34/src/helpers/fmn.sh	2005-01-18 13:22:08.505238696 +0000
@@ -24,8 +24,8 @@
 modfile=$1
 
 #   the part from the Configure script
-tmpfile=${TMPDIR-/tmp}/fmn.tmp.$$
-rm -f $tmpfile
+tmpfile=`mktemp -t fmn.XXXXXX || tempfile --prefix=fmn` || {echo "$0: Cannot create temporary file" >&2; exit 1; }
+trap "rm -f -- \"$tmpfile\";" 0 1 2 3 13 15
 modname=''
 ext=`echo $modfile | sed 's/^.*\.//'`
 modbase=`echo $modfile | sed 's/\.[^.]*$//'`
@@ -52,8 +52,8 @@
     modname=`echo $modbase | sed 's/^.*\///' | \
         sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
 fi
-rm -f $tmpfile
 
 #   output: the name of the module structure symbol
 echo "$modname"
 
+exit 0
diff -ur build-tree-apache.orig/apache_1.3.34/src/support/check_forensic build-tree-apache/apache_1.3.34/src/support/check_forensic
--- build-tree-apache.orig/apache_1.3.34/src/support/check_forensic	2005-01-18 13:19:22.532470000 +0000
+++ build-tree-apache/apache_1.3.34/src/support/check_forensic	2005-01-18 13:27:58.132087336 +0000
@@ -7,9 +7,14 @@
 
 F=$1
 
-cut -f 1 -d '|' $F  > /tmp/fc-all.$$
-grep + < /tmp/fc-all.$$ | cut -c2- | sort > /tmp/fc-in.$$
-grep -- - < /tmp/fc-all.$$ | cut -c2- | sort > /tmp/fc-out.$$
+all=`mktemp -t fcall.XXXXXX || tempfile --prefix=fcall` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+in=`mktemp -t fcin.XXXXXX || tempfile --prefix=fcin` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+out=`mktemp -t fcout.XXXXXX || tempfile --prefix=fcout` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+trap "rm -f -- \"$all\" \"$in\" \"$out\";" 0 1 2 3 13 15
+
+cut -f 1 -d '|' $F >$all
+grep + < $all|cut -c2- | sort >$in
+grep -- - < $all cut -c2- | sort >$out
 # use -i instead of -I for GNU xargs
-join -v 1 /tmp/fc-in.$$ /tmp/fc-out.$$ | xargs -ixx egrep "^\\+xx" $F
-rm /tmp/fc-all.$$ /tmp/fc-in.$$ /tmp/fc-out.$$
+join -v 1 $in $out |xargs -ixx egrep "^\\+xx" $F
+exit 0
