On Wed, May 25, 2011 at 04:03:17PM +0200, Vincent van Ravesteijn wrote:
> 
> > I could have used "return (unsigned int)-1;" which automatically gets
> > converted to either 0xFFFFFFFF or 0xFFFFFFFFFFFFFFFF according to the
> > size of an int, but I thought that not everybody would have understood
> > it, and so preferred to the long way with a warning (which next time
> > I should maybe write in capitals, so that it does not go unnoticed).
> > 
> 
> The problem is that a 32 bits unsigned int (0xFFFFFFFF) can be happily
> casted into a 64-bits time_t and the result will be >0.
> 
> time_t is defined as 'long long'.

So, let me recap. With MSVC an int is 32 bit but time_t is 'long long'.
Qt returns -1 casted to 'unsigned int', but, as time_t is 64 bit, even
if signed, it turns out that the result is still a positive number.
I would say that this is a typical MS nonsense causing a lot of troubles
and incompatibilities. Anyway, the dvi forward search problem should be
solved now (please confirm).

-- 
Enrico

Reply via email to