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
I don't remember exactly, but there was a bug in the implementation that was discovered during comparing our wheel with vanilla gmtime_r on the entire int32 range.
I started porting blackhole to Windows respectively Visual Studio 2017 and came also across the gmtime_r and localtime_r functions spread across the source code.
My best guess is that gmtime_r and localtime_r were used, because they are thread-safe respectively reentrant (_r) and gmtime is not.
It looks like that Visual Studio 2017 does not support the gmtime_r and the localtime_r functions, or at least I was not able to find them. Instead I found the C11 functions gmtime_s and localtime_s. Except for the order the arguments, they are compatible to the _r functions.
But since :gmtime_s is C11, I'd like to solely use that.
Furthermore, blackhole/src/util/time.hpp seems to provide a project specific implementations for gmtime and localtime. Why aren't they used? That would be another options. Changing all calls to gmtime_r and localtime_r to use the blackhole functions.
Update: Altough C11 defines the _s time functions, they are not defined on my Linux box (Ubuntu). So only using them, is not going to work.
see blackhole/src/util/time.hpp:87, please.
I think that, there blackhole::gmtime , also.
The text was updated successfully, but these errors were encountered: