浏览代码

Make SysUtils' TSystemTime declaration on non-Windows platforms compatible with the Win32 and Delphi declarations

Zoë Peterson 8 月之前
父节点
当前提交
208806f27f
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      rtl/objpas/sysutils/datih.inc

+ 7 - 3
rtl/objpas/sysutils/datih.inc

@@ -100,9 +100,13 @@ type
 
 
 {$IFNDEF HAS_SYSTEMTIME}
 {$IFNDEF HAS_SYSTEMTIME}
    TSystemTime = record
    TSystemTime = record
-      Year, Month, Day, DayOfWeek: word;
-      Hour, Minute, Second, MilliSecond: word;
-   end ;
+     case integer of
+       0: (Year, Month, Day, DayOfWeek: word;
+           Hour, Minute, Second, MilliSecond: word);
+       // Win32 compatibility
+       1: (wYear, wMonth, wDay, wDayOfWeek: word;
+           wHour, wMinute, wSecond, wMilliseconds: word);
+   end;
 {$ENDIF}
 {$ENDIF}
 
 
    TTimeStamp = record
    TTimeStamp = record