struct timeval (winsock2.h) - Y2K38

Harald-René Flasch 1 Reputation point
2021-09-08T11:44:04.303+00:00

I wondering that timeval struct still using long (32bit) members causing the Y2K38 issue...

Is there a plan to make that Y2K38 compatible or should I use alternatives to the timeval struct and why is this not marked as deprecated in winsock2.h?

I guess it is not that easy just changing the long to __int64...

Exists there a way to check/verify C/C++ source code if it is Y2K38 compatible or not? Clang does not offer such thing?

Is it just timeval or are there others? E.g. time_t (Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt.h) and tm (Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_wtime.h) already having solutions.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes