Microsoft KB Archive/102215

{|
 * width="100%"|

BUG: TYPES.H time_t Definition Is Incorrect

 * }

Q102215

-

The information in this article applies to:


 * The C Run-Time (CRT), included with:
 * Microsoft Visual C++, versions 1.0, 1.5, 1.51

-

SYMPTOMS
The Microsoft Visual C++ run-time library time functions, such as mktime, use the time_t data type which is defined in TIME.H as a long. However, the SYS\TYPES.H file incorrectly defines the time_t data type as an unsigned long.

RESOLUTION
Perform one of the following two steps to work around this problem:


 * Modify the SYS\TYPES.H file to modify the time_t definition from unsigned long to long
 * Include TIME.H before SYS\TYPES.H to use the correct time_t definition

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION
This information does not apply to Microsoft C/C++ version 7.0 because the TIME.H and SYS\TYPES.H file each define time_t as an unsigned long. Nor does it apply to Microsoft C versions 6.0x or Microsoft Visual C++ 32-bit Edition because the TIME.H and SYS\TYPES.H file each define time_t as a long.

For additional information about the differences between the time_t data type in C versions 6.0x and the time_t data type in C/C++ version 7.0, please query in the Microsoft Knowledge Base on the following words:

time function changes gmt

Additional query words: 6.00 7.00 1.00 1.50

Keywords : kb16bitonly

Issue type : kbbug

Technology : kbVCsearch kbAudDeveloper kbCRT