diff --git a/fcl/inc/classesh.inc b/fcl/inc/classesh.inc index 4a81ee78df..bc3f9dc49e 100644 --- a/fcl/inc/classesh.inc +++ b/fcl/inc/classesh.inc @@ -17,12 +17,14 @@ type { extra types to compile with FPC } - - TRTLCriticalSection = class(TObject); HRSRC = longint; THANDLE = longint; TComponentName = string; {$ifdef ver1_0} + // 1.0 doesn't have thread + TRTLCriticalSection = record + locked : longint; + end; // 1.1 and above has interfaces IUnknown = class(TObject); TGUID = longint; @@ -57,13 +59,16 @@ const scNone = 0; { TStream seek origins } - +const soFromBeginning = 0; soFromCurrent = 1; soFromEnd = 2; -{ TFileStream create mode } +type + TSeekOrigin = (soBeginning, soCurrent, soEnd); +{ TFileStream create mode } +const fmCreate = $FFFF; fmOpenRead = 0; fmOpenWrite = 1; @@ -1284,7 +1289,10 @@ function LineStart(Buffer, BufPos: PChar): PChar; { $Log$ - Revision 1.11 2001-08-12 22:10:36 peter + Revision 1.12 2001-10-23 21:51:02 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.11 2001/08/12 22:10:36 peter * some interface updates for 1.1 Revision 1.10 2001/05/14 21:17:24 florian diff --git a/rtl/inc/heap.inc b/rtl/inc/heap.inc index 3b762bae4a..32acab8b1f 100644 --- a/rtl/inc/heap.inc +++ b/rtl/inc/heap.inc @@ -39,7 +39,7 @@ {$ifdef MT} var - cs_systemheap : TCriticalSection; + cs_systemheap : TRTLCriticalSection; {$endif MT} const @@ -1125,7 +1125,10 @@ end; { $Log$ - Revision 1.6 2001-06-06 17:20:22 jonas + Revision 1.7 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.6 2001/06/06 17:20:22 jonas * fixed wrong typed constant procvars in preparation of my fix which will disallow them in FPC mode (plus some other unmerged changes since LAST_MERGE) diff --git a/rtl/inc/threadh.inc b/rtl/inc/threadh.inc index 401fede419..5fed92f79b 100644 --- a/rtl/inc/threadh.inc +++ b/rtl/inc/threadh.inc @@ -38,16 +38,19 @@ procedure EndThread; { this allows to do a lot of things in MT safe way } { it is also used to make the heap management } { thread safe } -procedure InitCriticalsection(var cs : tcriticalsection); -procedure DoneCriticalsection(var cs : tcriticalsection); -procedure EnterCriticalsection(var cs : tcriticalsection); -procedure LeaveCriticalsection(var cs : tcriticalsection); +procedure InitCriticalSection(var cs : TRTLCriticalSection); +procedure DoneCriticalsection(var cs : TRTLCriticalSection); +procedure EnterCriticalsection(var cs : TRTLCriticalSection); +procedure LeaveCriticalsection(var cs : TRTLCriticalSection); {$endif MT} { $Log$ - Revision 1.4 2001-01-26 16:37:54 florian + Revision 1.5 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.4 2001/01/26 16:37:54 florian *** empty log message *** Revision 1.3 2001/01/24 21:47:18 florian diff --git a/rtl/objpas/sysutilh.inc b/rtl/objpas/sysutilh.inc index f246ee32ab..76caec1353 100644 --- a/rtl/objpas/sysutilh.inc +++ b/rtl/objpas/sysutilh.inc @@ -35,13 +35,28 @@ type tintegerset = set of 0..sizeof(integer)*8-1; longrec = packed record - lo,hi : word; + case integer of + 0 : (lo,hi : word); + 1 : (bytes : array[0..3] of byte); end; wordrec = packed record lo,hi : byte; end; + int64rec = packed record + case integer of + 0 : (lo,hi : cardinal); + 1 : (words : array[0..3] of word); + 2 : (bytes : array[0..7] of byte); + end; + + pbytearray = ^tbytearray; + tbytearray = array[0..32767] of byte; + + pwordarray = ^twordarray; + twordarray = array[0..16383] of word; + TMethod = packed record Code, Data: Pointer; end; @@ -156,7 +171,10 @@ Type { $Log$ - Revision 1.13 2001-08-22 21:19:16 florian + Revision 1.14 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.13 2001/08/22 21:19:16 florian + some new stuff of D6/Kylix added Revision 1.12 2001/08/22 14:11:28 florian diff --git a/rtl/os2/system.pas b/rtl/os2/system.pas index b7068dc3aa..44550f098c 100644 --- a/rtl/os2/system.pas +++ b/rtl/os2/system.pas @@ -61,7 +61,7 @@ type (* TH: To make things easier, I copied the record definition *) (* from the Win32 version and just added longint variants, *) (* because it seemed well suited for OS/2 too. *) - TCriticalSection = packed record + TRTLCriticalSection = packed record DebugInfo: pointer; LockCount: longint; RecursionCount: longint; @@ -1066,7 +1066,10 @@ begin end. { $Log$ - Revision 1.15 2001-06-19 20:46:07 hajny + Revision 1.16 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.15 2001/06/19 20:46:07 hajny * platform specific constants moved after systemh.inc, BeOS omission corrected Revision 1.14 2001/06/13 22:21:53 hajny diff --git a/rtl/os2/thread.inc b/rtl/os2/thread.inc index b36b02f9c1..b41b4fe824 100644 --- a/rtl/os2/thread.inc +++ b/rtl/os2/thread.inc @@ -50,7 +50,7 @@ function DosFreeThreadLocalMemory (P: pointer): longint; cdecl; external 'DOSCALLS' index 455; function DosCreateThread (var TID: longint; Address: pointer; -(* TThreadFunc *) +(* TThreadFunc *) aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl; external 'DOSCALLS' index 311; @@ -240,7 +240,7 @@ begin EndThread (0); end; -procedure InitCriticalSection (var CS: TCriticalSection); +procedure InitCriticalSection (var CS: TRTLCriticalSection); begin if os_mode = osOS2 then begin @@ -254,12 +254,12 @@ begin end; end; -procedure DoneCriticalSection (var CS: TCriticalSection); +procedure DoneCriticalSection (var CS: TRTLCriticalSection); begin if os_mode = osOS2 then DosCloseMutExSem (CS.LockSemaphore2); end; -procedure EnterCriticalSection (var CS: TCriticalSection); +procedure EnterCriticalSection (var CS: TRTLCriticalSection); var P, T, Cnt: longint; PTIB: PThreadInfoBlock; @@ -293,7 +293,7 @@ begin end; end; -procedure LeaveCriticalSection (var CS: TCriticalSection); +procedure LeaveCriticalSection (var CS: TRTLCriticalSection); var PTIB: PThreadInfoBlock; Err: boolean; @@ -325,7 +325,10 @@ end; { $Log$ - Revision 1.5 2001-10-09 02:42:05 carl + Revision 1.6 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.5 2001/10/09 02:42:05 carl * bugfix #1639 (IsMultiThread varialbe setting) Revision 1.4 2001/02/04 01:53:58 hajny diff --git a/rtl/unix/sysunixh.inc b/rtl/unix/sysunixh.inc index 1f371d17fa..df3468675c 100644 --- a/rtl/unix/sysunixh.inc +++ b/rtl/unix/sysunixh.inc @@ -24,7 +24,7 @@ type { the fields of this record are os dependent } { and they shouldn't be used in a program } { only the type TCriticalSection is important } - TCriticalSection = packed record + TRTLCriticalSection = packed record DebugInfo : pointer; LockCount : longint; RecursionCount : longint; @@ -73,7 +73,10 @@ var { $Log$ - Revision 1.11 2001-10-14 13:33:21 peter + Revision 1.12 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.11 2001/10/14 13:33:21 peter * start of thread support for linux Revision 1.10 2001/06/27 21:37:39 peter diff --git a/rtl/unix/thread.inc b/rtl/unix/thread.inc index af68e81679..eb314ab463 100644 --- a/rtl/unix/thread.inc +++ b/rtl/unix/thread.inc @@ -162,20 +162,20 @@ EndThread(0); end; - procedure InitCriticalSection(var cs : tcriticalsection); + procedure InitCriticalSection(var cs : TRTLCriticalSection); begin end; - procedure DoneCriticalSection(var cs : tcriticalsection); + procedure DoneCriticalSection(var cs : TRTLCriticalSection); begin end; - procedure EnterCriticalSection(var cs : tcriticalsection); + procedure EnterCriticalSection(var cs : TRTLCriticalSection); begin end; - procedure LeaveCriticalSection(var cs : tcriticalsection); + procedure LeaveCriticalSection(var cs : TRTLCriticalSection); begin end; @@ -183,7 +183,10 @@ { $Log$ - Revision 1.1 2001-10-17 10:27:47 marco + Revision 1.2 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.1 2001/10/17 10:27:47 marco * Moved to unix/ since there is nothing linux specific about it. Revision 1.1 2001/10/14 13:33:20 peter diff --git a/rtl/win32/system.pp b/rtl/win32/system.pp index 1a1b078438..9902375583 100644 --- a/rtl/win32/system.pp +++ b/rtl/win32/system.pp @@ -41,7 +41,7 @@ type { the fields of this record are os dependent } { and they shouldn't be used in a program } { only the type TCriticalSection is important } - TCriticalSection = packed record + TRTLCriticalSection = packed record DebugInfo : pointer; LockCount : longint; RecursionCount : longint; @@ -1567,7 +1567,10 @@ end. { $Log$ - Revision 1.18 2001-10-09 02:37:29 carl + Revision 1.19 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.18 2001/10/09 02:37:29 carl * bugfix #1639 (IsMultiThread varialbe setting) Revision 1.17 2001/08/19 21:02:02 florian diff --git a/rtl/win32/thread.inc b/rtl/win32/thread.inc index cd0f13179e..3a904add4c 100644 --- a/rtl/win32/thread.inc +++ b/rtl/win32/thread.inc @@ -197,23 +197,26 @@ procedure EndThread; { we implement these procedures for win32 by importing them } { directly from windows } -procedure InitCriticalSection(var cs : tcriticalsection); +procedure InitCriticalSection(var cs : TRTLCriticalSection); external 'kernel32' name 'InitializeCriticalSection'; -procedure DoneCriticalSection(var cs : tcriticalsection); +procedure DoneCriticalSection(var cs : TRTLCriticalSection); external 'kernel32' name 'DeleteCriticalSection'; -procedure EnterCriticalSection(var cs : tcriticalsection); +procedure EnterCriticalSection(var cs : TRTLCriticalSection); external 'kernel32' name 'EnterCriticalSection'; -procedure LeaveCriticalSection(var cs : tcriticalsection); +procedure LeaveCriticalSection(var cs : TRTLCriticalSection); external 'kernel32' name 'LeaveCriticalSection'; {$endif MT} { $Log$ - Revision 1.5 2001-10-09 02:38:39 carl + Revision 1.6 2001-10-23 21:51:03 peter + * criticalsection renamed to rtlcriticalsection for kylix compatibility + + Revision 1.5 2001/10/09 02:38:39 carl * bugfix #1639 (IsMultiThread varialbe setting) Revision 1.4 2001/01/26 21:02:21 florian