-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ralf Wildenhues on 11/6/2008 6:03 AM: >> - ($1) 2>conftest.er1 >> + ($1) 2>conftest.err > > Why not 2>conftest.er1 and ... > >> ac_status=$? >> - grep -v '^ *+' conftest.er1 >conftest.err >> - rm -f conftest.er1 >> - cat conftest.err >&AS_MESSAGE_LOG_FD >> + if test -s conftest.err; then >> + grep -v '^ *+' conftest.err >conftest.er1 >> + cat conftest.er1 >&AS_MESSAGE_LOG_FD > > ... putting an > else > : >conftest.err > > here (and adjusting the rest of the code) and saving an added fork (the > mv) in the nonempty-warning case, at the expense of more file operations > in the empty case.
That adds a fork for rm conftest.er1 in the empty case, which is the more common of the two. The semantics are currently such that only conftest.err exists after the logging, and it is faster to provide the same effects by using mv only in the error case rather than rm everywhere. On the other hand, maybe we could find everywhere that does 'rm conftest.err' and instead make it 'rm conftest.er[1r]'. > Otherwise, ... > >> + mv conftest.er1 conftest.err > > ... this needs to be 'mv -f'. Good point. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkS7m0ACgkQ84KuGfSFAYC4aQCgqEv9vYvnoOacCNe6bdzWbgPo ankAniTrM58ghfkQhtqGsnxhoM8RPUNb =41nZ -----END PGP SIGNATURE-----
