equal
deleted
inserted
replaced
490 #define _SETHANDLEVal(o, v) (__externalAddressVal(o) = (v)) |
490 #define _SETHANDLEVal(o, v) (__externalAddressVal(o) = (v)) |
491 #ifndef __MINGW__ |
491 #ifndef __MINGW__ |
492 HANDLE _get_osfhandle(int); |
492 HANDLE _get_osfhandle(int); |
493 #endif |
493 #endif |
494 |
494 |
495 #if defined(__BORLANDC__) || defined(__MINGW32__) |
495 /* Warning: a horrible hack here. For whatever reason, when compiled under |
|
496 * MINGW64, both __MINGW64__ and __MINGW32__ seems to be defined. As a quick |
|
497 * and dirty hack, use `(defined(__MINGW32__) && !defined(__MINGW64__))` to |
|
498 * check whether compiling under MINGW32 or MINGW64. |
|
499 * This has to be solved properly later! |
|
500 */ |
|
501 #if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__)) |
496 |
502 |
497 typedef enum _TOKEN_ELEVATION_TYPE { |
503 typedef enum _TOKEN_ELEVATION_TYPE { |
498 TokenElevationTypeDefault = 1, |
504 TokenElevationTypeDefault = 1, |
499 TokenElevationTypeFull, |
505 TokenElevationTypeFull, |
500 TokenElevationTypeLimited, |
506 TokenElevationTypeLimited, |
10590 error = __mkSmallInteger(__WIN32_ERR(GetLastError())); |
10596 error = __mkSmallInteger(__WIN32_ERR(GetLastError())); |
10591 goto out; |
10597 goto out; |
10592 } |
10598 } |
10593 } else if (__isSmallInteger(anIntegerOrNil)) { |
10599 } else if (__isSmallInteger(anIntegerOrNil)) { |
10594 int year = __intVal(anIntegerOrNil); |
10600 int year = __intVal(anIntegerOrNil); |
10595 #if defined(__BORLANDC__) || defined(__MINGW32__) |
10601 #if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__)) |
10596 { |
10602 { |
10597 typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)( |
10603 typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)( |
10598 USHORT, |
10604 USHORT, |
10599 LPTIME_ZONE_INFORMATION, // - should be, but is not defined: PDYNAMIC_TIME_ZONE_INFORMATION, |
10605 LPTIME_ZONE_INFORMATION, // - should be, but is not defined: PDYNAMIC_TIME_ZONE_INFORMATION, |
10600 LPTIME_ZONE_INFORMATION); |
10606 LPTIME_ZONE_INFORMATION); |
10784 |
10790 |
10785 // utcOffset is the difference from UTC to local time including possible DST |
10791 // utcOffset is the difference from UTC to local time including possible DST |
10786 _utcOffset = longTime / 10000000; |
10792 _utcOffset = longTime / 10000000; |
10787 utcOffset = __mkSmallInteger(_utcOffset); |
10793 utcOffset = __mkSmallInteger(_utcOffset); |
10788 |
10794 |
10789 # if defined(__BORLANDC__) || defined(__MINGW32__) |
10795 # if defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__MINGW64__)) |
10790 { |
10796 { |
10791 typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)( |
10797 typedef BOOL (WINAPI *P_GetTimeZoneInformationForYear)( |
10792 USHORT, |
10798 USHORT, |
10793 LPTIME_ZONE_INFORMATION, // - should be, but is not defined: PDYNAMIC_TIME_ZONE_INFORMATION, |
10799 LPTIME_ZONE_INFORMATION, // - should be, but is not defined: PDYNAMIC_TIME_ZONE_INFORMATION, |
10794 LPTIME_ZONE_INFORMATION); |
10800 LPTIME_ZONE_INFORMATION); |