|
From: | Tim Murphy |
Subject: | Re: GNU make to consider files checksum |
Date: | Sun, 13 Apr 2008 09:35:10 +0100 |
2008/4/12, Eli Zaretskii <address@hidden>:
> Thanks. (I'm not the head maintainer, so please wait for Paul and
> others to respond.)
>
> > +int
> > +compute_checksum(struct file *new)
> > +{
> > + int checksum = 0;
> > + FILE *f;
> > + char buffer [4096];
> > +
> > + f = fopen (new->name, "r");
>
> This needs to use "rb", not "r".
Thank you for the reply, yes it should be "rb".
> Also, what about directories? they cannot be fopen'ed and fread, at
> least not on all supported systems.
IHMO directories should not be considered, while reading the mtime can
be done quickly, considering a checksum for all the files contained in
the directory is very expensive (in my proof-of-concept patch I didn't
put any control code).
Regards,
Giuseppe
_______________________________________________
Bug-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-make
[Prev in Thread] | Current Thread | [Next in Thread] |