Mail Archives: djgpp/1995/05/17/07:30:34
> I bet this port would have the same problems, since the 'first'
> cluster of stdin or stdout may or may not be available to stat(). In
> particular, in the case above since the temp file has been truncated,
> it would not. That would mean that the file and text utilities would
> not necesarily solve many makefile porting problems :-(.
The first cluster of the redirected standard stream _is_ available,
_unless_ the file is empty or networked. Redirected stdin is
usually non-empty, but stdout might be. Empty files get inode of 0
(usually, I didn't check in this particular port), so you will only
see problems like you saw back in the past when _both_ files are
empty or on a remote drive. I guess the previous port which triggered
your memory traumatized by that experience _always_ got 0 inode, which
would indeed cause extreme grief to whoever tries to use FSF Makefiles
with little or no conversion to brave old DOS world.
Btw, f?stat() functions in the v2.0 library deal with that problem
more correctly, including the cases of empty and remote files. I just
about finished porting Fileutils 3.12 to v2.0 alpha and can proudly say
that not even a single comparison of files' inode numbers had to be
#ifdef'ed out.
- Raw text -