This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Size of time_t changed to 64 bits in MSVC++ 2005 CRT
Type: Stage:
Components: Windows Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: loewis, terry.reedy, varmaa
Priority: normal Keywords: patch

Created on 2006-02-23 23:18 by varmaa, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pyconfig_h_size_t_patch.diff varmaa, 2006-02-23 23:18 Fix for correct definition of SIZEOF_TIME_T under MSVC++ 2005 CRT
Messages (3)
msg49592 - (view) Author: Atul Varma (varmaa) Date: 2006-02-23 23:18
As of Visual C++ 2005, the size of the time_t data type
was changed from 32 bits to 64 bits.  Among other
things, this breaks the C API test in the Python "test"
package, because Python thinks that time_t should be 32
bits large.  Altering PC/pyconfig.h by conditionally
defining SIZEOF_TIME_T depending on whether at least
MSVC++ 2005 is being used for compilation fixes this.

Attached is a very simple unified diff patch for
PC/pyconfig.h, taken from revision 42382 (the most
recent revision at the time of this submission).

More information about this and other recent changes to
the MS CRT for Visual C++ 2005 can be found here:

http://msdn2.microsoft.com/en-us/library/ms235429.aspx
msg49593 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2006-03-06 01:10
Logged In: YES 
user_id=593130

The page specifically says "The default size for time_t is 
now 64 bits..."
The page on breaking changes
http://msdn2.microsoft.com/en-us/library/ms235497.aspx
says "time_t is now a 64-bit value (unless 
_USE_32BIT_TIME_T is defined)." so it would appear that 
there is a possible alternative fix.

My understanding of recent discussions is that the 
developers are not planning to upgrade their VC version at 
this time.

Unless this is the only change needed, I would not be 
surprised if a more complete patch would be wanted at one 
time.  Maybe someone else will say more.
msg49594 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-03-06 16:35
Logged In: YES 
user_id=21627

Thanks for the patch. Committed in revision 42870. Looking
at the "breaking changes" list, I see nothing else that
would need attention.
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42943
2006-02-23 23:18:49varmaacreate