[CLAM] bug fix in srcdeps

Maarten de Boer mdeboer at iua.upf.es
Fri Oct 10 01:55:27 PDT 2003

> Well, I forgot to mention the origin of the bug: it was not caused by 
> srcdeps itsef but by a bad-behaviour in MSVisualC stdio library (fseek 
> was erratic)... So we just walked around this in srcdeps.

I would like to explain this in more detail. We found that their is a
bug in the stdio implementation of visual C. If you use ftell to obtain
the current file position in a file that has unix-style end-of-lines,
"\n", instead of dos-style "\r\n", the returned value is wrong. To be
precise: it is the file position minus the amount of end-of-lines, as if
the function that calculates the file position counts the none-existing
"\r". Our work-around is to open all files as binary files.


More information about the clam-users mailing list