Date: Sun, 19 Nov 2000 04:18:33 -0800 From: Kris Kennaway <kennaway@citusc.usc.edu> To: audit@freebsd.org, cracauer@freebsd.org Subject: sh compilation tempfile fixes Message-ID: <20001119041833.A93062@citusc17.usc.edu>
next in thread | raw e-mail | index | archive | help
--BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Please review.. Kris Index: mkbuiltins =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/bin/sh/mkbuiltins,v retrieving revision 1.8 diff -u -r1.8 mkbuiltins --- mkbuiltins 1999/08/27 23:15:18 1.8 +++ mkbuiltins 2000/11/19 12:06:59 @@ -37,7 +37,7 @@ # @(#)mkbuiltins 8.2 (Berkeley) 5/4/95 # $FreeBSD: src/bin/sh/mkbuiltins,v 1.8 1999/08/27 23:15:18 peter Exp $ =20 -temp=3D/tmp/ka$$ +temp=3D`mktemp /tmp/kaXXXXXX` havejobs=3D0 if grep '^#define JOBS[ ]*1' shell.h > /dev/null then havejobs=3D1 Index: mktokens =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/bin/sh/mktokens,v retrieving revision 1.6 diff -u -r1.6 mktokens --- mktokens 1999/08/27 23:15:19 1.6 +++ mktokens 2000/11/19 12:13:03 @@ -41,7 +41,8 @@ # token marks the end of a list. The third column is the name to print in # error messages. =20 -cat > /tmp/ka$$ <<\! +temp=3D`mktemp /tmp/kaXXXXXX` +cat > $temp <<\! TEOF 1 end of file TNL 0 newline TSEMI 0 ";" @@ -71,25 +72,25 @@ TESAC 1 "esac" TNOT 0 "!" ! -nl=3D`wc -l /tmp/ka$$` +nl=3D`wc -l $temp` exec > token.h -awk '{print "#define " $1 " " NR-1}' /tmp/ka$$ +awk '{print "#define " $1 " " NR-1}' $temp echo ' /* Array indicating which tokens mark the end of a list */ const char tokendlist[] =3D {' -awk '{print "\t" $2 ","}' /tmp/ka$$ +awk '{print "\t" $2 ","}' $temp echo '}; =20 char *const tokname[] =3D {' sed -e 's/"/\\"/g' \ -e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \ - /tmp/ka$$ + $temp echo '}; ' -sed 's/"//g' /tmp/ka$$ | awk ' +sed 's/"//g' $temp | awk ' /TIF/{print "#define KWDOFFSET " NR-1; print ""; print "char *const parsek= wd[] =3D {"} /TIF/,/neverfound/{print " \"" $3 "\","}' echo ' 0 };' =20 -rm /tmp/ka$$ +rm $temp --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjoXxRkACgkQWry0BWjoQKWr1gCbBgr4mqBUtkGpGSEcKiYpgdDp IIgAnApJZsVKZkFEBcDzHq1C9YvZYFPy =i8eO -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001119041833.A93062>