Issues using time_t when migrating to VS 2005

I've recently been upgrading some of my projects to VS 2005 and come across the following issue. In prior versions of VS using the time_t type defaults to the 32 bit version or _time32_t but in 2005 now uses the 64 bit type, _time64_t.

Normally this shouldn't be a problem as you can just define _USE_32BIT_TIME_T to specify using 32 bit values where specific types have not been used. However, this reveals a 'typo' in the file time.inl

static __inline time_t __CRTDECL time(time_t * _Time)

{

returntime(_Time);

}

The above will cause an infinite recursion which is probably not desirable.

Should be:

static __inline time_t __CRTDECL time(time_t * _Time)

{

return_time32(_Time);

}

Hope this of help and regards.

[2309 byte] By [MarkArnold] at [2007-12-21]