mirror of
https://github.com/oatpp/oatpp.git
synced 2024-11-27 08:30:07 +08:00
Fix a 64bit function that was also being called when the environment is 32btis.
The function _localtime64 was being called inside a ifdef WIN32 which makes it try to compile even when it's in a 32bti environment. Now if it calls _localtime32 in that case. Tested on Windows using Msys+mingw 32bit shell. Signed-off-by: Samega 7Cattac <7Cattac@gmail.com>
This commit is contained in:
parent
50748b4011
commit
e43af7c06e
@ -33,12 +33,19 @@
|
||||
#include <cstdarg>
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32)
|
||||
#include <WinSock2.h>
|
||||
#include <WinSock2.h>
|
||||
#endif
|
||||
|
||||
#if (defined(WIN32) || defined(_WIN32)) && defined(_WIN64)
|
||||
struct tm* localtime_r(time_t *_clock, struct tm *_result) {
|
||||
_localtime64_s(_result, _clock);
|
||||
return _result;
|
||||
}
|
||||
#elif (defined(WIN32) || defined(_WIN32)) && not defined(_WIN64)
|
||||
struct tm* localtime_r(time_t *_clock, struct tm *_result) {
|
||||
_localtime32_s(_result, _clock);
|
||||
return _result;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace oatpp { namespace base {
|
||||
|
Loading…
Reference in New Issue
Block a user