Mail Archives: djgpp-workers/1999/01/12/12:06:31
The patch below solves a problem that occurs when autoheader is
used under Windows in this segment of code:
if test $# -eq 0; then
if test $status -eq 0; then
if test -f ${config_h_in} && cmp -s $tmpout
${config_h_in}; then
rm -f $tmpout # File didn't change, so
don't update its mod time.
else
mv -f $tmpout ${config_h_in}
fi
else
rm -f $tmpout
fi
fi
In this segment, autoheader is calling another
program to modify $tmpout while $tmpout is
still open for writing. This results in a
access/sharing violation when executed in
Windows. The patch below forces $tmpout to
close before it's mod time is changed. If at
all possible, please accept the patch.
Thanks to Andris Pavenis for diagnosing the
problem and finding a workaround.
*** autoheader.sh.bak Tue Jan 5 08:28:38 1999
--- autoheader.sh Tue Jan 12 09:39:22 1999
***************
*** 265,270 ****
--- 265,272 ----
fi
if test $# -eq 0; then
+ # Force $tmpout to close to avoid file sharing problems under
Windows
+ exec > con
if test $status -eq 0; then
if test -f ${config_h_in} && cmp -s $tmpout ${config_h_in}; then
rm -f $tmpout # File didn't change, so don't update its mod time.
---
Mark Elbrecht snowball3 AT usa DOT net
http://members.xoom.com/snowball3/
- Raw text -