You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wow, serious mess here. While we're checking for the availability of gettimeofday() during configuration, setting HAVE_GETTIMEOFDAY if so, in a couple of places we just call the function even though it might not be available. Sometimes we check whether the gettimeofday() call failed, and sometimes we just assume it cannot fail. As fallback we're using time(), but still prefer gettimeofday() even when we don't use the microseconds.
Description
I travelled 15 years into the future, and run the following code:
Resulted in this output:
But I expected this output instead:
The problem is
php-src/win32/time.c
Line 46 in 3d9a0a0
Casting to
long
is appropriate since the declaration ofstruct timeval
in WinSock2.h is:However,
long
is a 32bit value on LLP64 architectures.One may argue that time travel is not supportable, but maybe we should heed the POSIX 7 advise:
gettimeofday()
has been removed from POSIX 8 altogether.PHP Version
any
Operating System
Windows
The text was updated successfully, but these errors were encountered: