-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time_t is on windows 64-bit #490
base: master
Are you sure you want to change the base?
Conversation
I'm hesitant to approve this change. There are some places in Indy that don't use Also, in C++Builder's |
Perhaps these Delphi declarations initially didn't follow the Microsoft convention, or weren't updated correctly when the 64 bit era took off? |
In fact: a coworker of me found this issue while he was trying to use the OpenSSL method Another hint is the RTL function And more interesting: MSDN says about
But if I try to use the API on my own, you are right, And as MSDN always says about But not every C Programm is the WinAPI. |
While working on the new OpenSSL 3 IO Handler I already used my own type definition (mostly alias for the existing C Types like |
Funny, they require those fields to be bit-dependant, so instead of just fixing the struct (ie, by using |
Windows
time_t
differs from Unixtime_t
: the Windows version is not bit depending and always 64.In C and only on 32 bit you can use a macro to switch to 32-bit
time_t
, but that is not the default and not recommended.Windows source: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64
But on Unix and Linux systems
time_t
is bit depended.Unix Source: https://www.ibm.com/docs/en/ibm-mq/9.1?topic=platforms-standard-data-types-unix-linux-windows
I hope
{$IFDEF WINDOWS}
is the correct compiler directive for Indy.