mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 01:19:38 +01:00 
			
		
		
		
	* longint to cardinal corrections
This commit is contained in:
		
							parent
							
								
									430d498e48
								
							
						
					
					
						commit
						53837eb907
					
				@ -150,45 +150,46 @@ procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
 | 
			
		||||
                            external 'DOSCALLS' index 312;
 | 
			
		||||
 | 
			
		||||
function DosLoadModule (ObjName: PChar; ObjLen: cardinal; DLLName: PChar;
 | 
			
		||||
                                         var Handle: cardinal): longint; cdecl;
 | 
			
		||||
                                        var Handle: cardinal): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 318;
 | 
			
		||||
 | 
			
		||||
function DosQueryProcAddr (Handle, Ordinal: cardinal; ProcName: PChar;
 | 
			
		||||
                                         var Address: pointer): longint; cdecl;
 | 
			
		||||
                                        var Address: pointer): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 321;
 | 
			
		||||
 | 
			
		||||
function DosSetRelMaxFH (var ReqCount, CurMaxFH: longint): longint; cdecl;
 | 
			
		||||
function DosSetRelMaxFH (var ReqCount: longint; var CurMaxFH: cardinal):
 | 
			
		||||
                                                               cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 382;
 | 
			
		||||
 | 
			
		||||
function DosSetCurrentDir (Name:PChar): longint; cdecl;
 | 
			
		||||
function DosSetCurrentDir (Name:PChar): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 255;
 | 
			
		||||
 | 
			
		||||
procedure DosQueryCurrentDisk(var DiskNum:longint;var Logical:longint); cdecl;
 | 
			
		||||
procedure DosQueryCurrentDisk(var DiskNum:cardinal;var Logical:cardinal); cdecl;
 | 
			
		||||
external 'DOSCALLS' index 275;
 | 
			
		||||
 | 
			
		||||
function DosSetDefaultDisk (DiskNum:longint): longint; cdecl;
 | 
			
		||||
function DosSetDefaultDisk (DiskNum:cardinal): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 220;
 | 
			
		||||
 | 
			
		||||
{ This is not real prototype, but is close enough }
 | 
			
		||||
{ for us (the 2nd parameter is actually a pointer }
 | 
			
		||||
{ to a structure).                                }
 | 
			
		||||
function DosCreateDir( Name : pchar; p : pointer): longint; cdecl;
 | 
			
		||||
function DosCreateDir (Name: PChar; P: pointer): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 270;
 | 
			
		||||
 | 
			
		||||
function DosDeleteDir( Name : pchar) : longint; cdecl;
 | 
			
		||||
function DosDeleteDir (Name: PChar): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 226;
 | 
			
		||||
 | 
			
		||||
function DosQueryCurrentDir(DiskNum:longint;var Buffer;
 | 
			
		||||
                            var BufLen:longint):longint; cdecl;
 | 
			
		||||
function DosQueryCurrentDir(DiskNum:cardinal;var Buffer;
 | 
			
		||||
                            var BufLen:cardinal): cardinal; cdecl;
 | 
			
		||||
external 'DOSCALLS' index 274;
 | 
			
		||||
 | 
			
		||||
function DosMove(OldFile,NewFile:PChar):longint; cdecl;
 | 
			
		||||
function DosMove(OldFile,NewFile:PChar):cardinal; cdecl;
 | 
			
		||||
    external 'DOSCALLS' index 271;
 | 
			
		||||
 | 
			
		||||
function DosDelete(FileName:PChar):longint; cdecl;
 | 
			
		||||
function DosDelete(FileName:PChar):cardinal; cdecl;
 | 
			
		||||
    external 'DOSCALLS' index 259;
 | 
			
		||||
 | 
			
		||||
procedure DosExit(Action, Result: longint); cdecl;
 | 
			
		||||
procedure DosExit(Action, Result: cardinal); cdecl;
 | 
			
		||||
    external 'DOSCALLS' index 234;
 | 
			
		||||
 | 
			
		||||
{This is the correct way to call external assembler procedures.}
 | 
			
		||||
@ -639,11 +640,12 @@ asm
 | 
			
		||||
end ['eax', 'ebx', 'ecx', 'edx'];
 | 
			
		||||
 | 
			
		||||
const
 | 
			
		||||
    FileHandleCount: longint = 20;
 | 
			
		||||
    FileHandleCount: cardinal = 20;
 | 
			
		||||
 | 
			
		||||
function Increase_File_Handle_Count: boolean;
 | 
			
		||||
var Err: word;
 | 
			
		||||
    L1, L2: longint;
 | 
			
		||||
    L1: longint;
 | 
			
		||||
    L2: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
  L1 := 10;
 | 
			
		||||
  if DosSetRelMaxFH (L1, L2) <> 0 then
 | 
			
		||||
@ -668,7 +670,7 @@ procedure do_open(var f;p:pchar;flags:longint);
 | 
			
		||||
  when (flags and $10000) there is no check for close (needed for textfiles)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var Action: longint;
 | 
			
		||||
var Action: cardinal;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
    allowslash(p);
 | 
			
		||||
@ -854,7 +856,7 @@ end;
 | 
			
		||||
 | 
			
		||||
procedure ChDir (const S: string);[IOCheck];
 | 
			
		||||
 | 
			
		||||
var RC: longint;
 | 
			
		||||
var RC: cardinal;
 | 
			
		||||
    Buffer: array [0..255] of char;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
@ -906,7 +908,8 @@ begin
 | 
			
		||||
    { dir[4]                                           }
 | 
			
		||||
    { Get dir from drivenr : 0=default, 1=A etc... }
 | 
			
		||||
    l:=255-3;
 | 
			
		||||
    InOutRes:=DosQueryCurrentDir(DriveNr, sof^, l);
 | 
			
		||||
    InOutRes:=longint (DosQueryCurrentDir(DriveNr, sof^, l));
 | 
			
		||||
{$WARNING Result code should be translated in some cases!}
 | 
			
		||||
    { Now Dir should be filled with directory in ASCIIZ, }
 | 
			
		||||
    { starting from dir[4]                               }
 | 
			
		||||
    dir[0]:=#3;
 | 
			
		||||
@ -1079,7 +1082,8 @@ end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function GetFileHandleCount: longint;
 | 
			
		||||
var L1, L2: longint;
 | 
			
		||||
var L1: longint;
 | 
			
		||||
    L2: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
    L1 := 0; (* Don't change the amount, just check. *)
 | 
			
		||||
    if DosSetRelMaxFH (L1, L2) <> 0 then GetFileHandleCount := 50
 | 
			
		||||
@ -1158,7 +1162,10 @@ begin
 | 
			
		||||
end.
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.44  2003-10-12 18:07:30  hajny
 | 
			
		||||
  Revision 1.45  2003-10-13 21:17:31  hajny
 | 
			
		||||
    * longint to cardinal corrections
 | 
			
		||||
 | 
			
		||||
  Revision 1.44  2003/10/12 18:07:30  hajny
 | 
			
		||||
    * wrong use of Intel syntax
 | 
			
		||||
 | 
			
		||||
  Revision 1.43  2003/10/12 17:59:40  hajny
 | 
			
		||||
 | 
			
		||||
@ -92,44 +92,44 @@ type
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{ import the necessary stuff from the OS }
 | 
			
		||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): longint;
 | 
			
		||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): cardinal;
 | 
			
		||||
                                          cdecl; external 'DOSCALLS' index 454;
 | 
			
		||||
 | 
			
		||||
function DosFreeThreadLocalMemory (P: pointer): longint; cdecl;
 | 
			
		||||
function DosFreeThreadLocalMemory (P: pointer): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 455;
 | 
			
		||||
 | 
			
		||||
function DosCreateThread (var TID: longint; Address: pointer;
 | 
			
		||||
function DosCreateThread (var TID: cardinal; Address: pointer;
 | 
			
		||||
(* TThreadFunc *)
 | 
			
		||||
        aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
 | 
			
		||||
        aParam: pointer; Flags: cardinal; StackSize: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 311;
 | 
			
		||||
 | 
			
		||||
procedure DosExit (Action, Result: longint); cdecl;
 | 
			
		||||
procedure DosExit (Action, Result: cardinal); cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 234;
 | 
			
		||||
 | 
			
		||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: longint;
 | 
			
		||||
                State: boolean): longint; cdecl; external 'DOSCALLS' index 331;
 | 
			
		||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: cardinal;
 | 
			
		||||
               State: boolean): cardinal; cdecl; external 'DOSCALLS' index 331;
 | 
			
		||||
 | 
			
		||||
function DosCloseMutExSem (Handle: longint): longint; cdecl;
 | 
			
		||||
function DosCloseMutExSem (Handle: longint): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 333;
 | 
			
		||||
 | 
			
		||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: longint):
 | 
			
		||||
                                 longint; cdecl; external 'DOSCALLS' index 336;
 | 
			
		||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: cardinal):
 | 
			
		||||
                                cardinal; cdecl; external 'DOSCALLS' index 336;
 | 
			
		||||
 | 
			
		||||
function DosRequestMutExSem (Handle, Timeout: longint): longint; cdecl;
 | 
			
		||||
function DosRequestMutExSem (Handle:longint; Timeout: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 334;
 | 
			
		||||
 | 
			
		||||
function DosReleaseMutExSem (Handle: longint): longint; cdecl;
 | 
			
		||||
function DosReleaseMutExSem (Handle: longint): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 335;
 | 
			
		||||
 | 
			
		||||
function DosAllocMem (var P: pointer; Size, Flag: longint): longint; cdecl;
 | 
			
		||||
function DosAllocMem (var P: pointer; Size, Flag: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 299;
 | 
			
		||||
 | 
			
		||||
function DosFreeMem (P: pointer): longint; cdecl;
 | 
			
		||||
function DosFreeMem (P: pointer): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 304;
 | 
			
		||||
 | 
			
		||||
function DosEnterCritSec:longint; cdecl; external 'DOSCALLS' index 232;
 | 
			
		||||
function DosEnterCritSec:cardinal; cdecl; external 'DOSCALLS' index 232;
 | 
			
		||||
 | 
			
		||||
function DosExitCritSec:longint; cdecl; external 'DOSCALLS' index 233;
 | 
			
		||||
function DosExitCritSec:cardinal; cdecl; external 'DOSCALLS' index 233;
 | 
			
		||||
 | 
			
		||||
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
 | 
			
		||||
                                    PAPIB: PPProcessInfoBlock); cdecl;
 | 
			
		||||
@ -379,7 +379,10 @@ initialization
 | 
			
		||||
end.
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.1  2002-11-17 22:31:46  hajny
 | 
			
		||||
  Revision 1.2  2003-10-13 21:17:31  hajny
 | 
			
		||||
    * longint to cardinal corrections
 | 
			
		||||
 | 
			
		||||
  Revision 1.1  2002/11/17 22:31:46  hajny
 | 
			
		||||
    + first (incomplete) version of systhrds
 | 
			
		||||
 | 
			
		||||
  Revision 1.1  2002/10/14 19:39:18  peter
 | 
			
		||||
 | 
			
		||||
@ -58,13 +58,13 @@ type
 | 
			
		||||
                 DateLastWrite,       {Date of last modification of file.}
 | 
			
		||||
                 TimeLastWrite: word; {Time of last modification of file.}
 | 
			
		||||
                 FileSize,            {Size of file.}
 | 
			
		||||
                 FileAlloc: longint;  {Amount of space the file really
 | 
			
		||||
                 FileAlloc: cardinal; {Amount of space the file really
 | 
			
		||||
                                       occupies on disk.}
 | 
			
		||||
                end;
 | 
			
		||||
 PFileStatus0 = ^TFileStatus0;
 | 
			
		||||
 | 
			
		||||
 TFileStatus3 = object (TFileStatus)
 | 
			
		||||
                 NextEntryOffset: longint; {Offset of next entry}
 | 
			
		||||
                 NextEntryOffset: cardinal; {Offset of next entry}
 | 
			
		||||
                 DateCreation,             {Date of file creation.}
 | 
			
		||||
                 TimeCreation,             {Time of file creation.}
 | 
			
		||||
                 DateLastAccess,           {Date of last access to file.}
 | 
			
		||||
@ -72,9 +72,9 @@ type
 | 
			
		||||
                 DateLastWrite,            {Date of last modification of file.}
 | 
			
		||||
                 TimeLastWrite: word;      {Time of last modification of file.}
 | 
			
		||||
                 FileSize,                 {Size of file.}
 | 
			
		||||
                 FileAlloc: longint;       {Amount of space the file really
 | 
			
		||||
                 FileAlloc: cardinal;      {Amount of space the file really
 | 
			
		||||
                                            occupies on disk.}
 | 
			
		||||
                 AttrFile: longint;        {Attributes of file.}
 | 
			
		||||
                 AttrFile: cardinal;       {Attributes of file.}
 | 
			
		||||
                end;
 | 
			
		||||
 PFileStatus3 = ^TFileStatus3;
 | 
			
		||||
 | 
			
		||||
@ -91,7 +91,7 @@ type
 | 
			
		||||
              (File_Sys_ID,
 | 
			
		||||
               Sectors_Per_Cluster,
 | 
			
		||||
               Total_Clusters,
 | 
			
		||||
               Free_Clusters: longint;
 | 
			
		||||
               Free_Clusters: cardinal;
 | 
			
		||||
               Bytes_Per_Sector: word);
 | 
			
		||||
             2:                           {For date/time description,
 | 
			
		||||
                                           see file searching realted
 | 
			
		||||
@ -106,18 +106,18 @@ type
 | 
			
		||||
 PFSInfo = ^TFSInfo;
 | 
			
		||||
 | 
			
		||||
 TCountryCode=record
 | 
			
		||||
               Country,           {Country to query info about (0=current).}
 | 
			
		||||
               CodePage: longint; {Code page to query info about (0=current).}
 | 
			
		||||
               Country,            {Country to query info about (0=current).}
 | 
			
		||||
               CodePage: cardinal; {Code page to query info about (0=current).}
 | 
			
		||||
              end;
 | 
			
		||||
 PCountryCode=^TCountryCode;
 | 
			
		||||
 | 
			
		||||
 TTimeFmt = (Clock12, Clock24);
 | 
			
		||||
 | 
			
		||||
 TCountryInfo=record
 | 
			
		||||
               Country, CodePage: longint;  {Country and codepage requested.}
 | 
			
		||||
               Country, CodePage: cardinal;  {Country and codepage requested.}
 | 
			
		||||
               case byte of
 | 
			
		||||
                0:
 | 
			
		||||
                 (DateFormat: longint;      {1=ddmmyy 2=yymmdd 3=mmddyy}
 | 
			
		||||
                 (DateFormat: cardinal;     {1=ddmmyy 2=yymmdd 3=mmddyy}
 | 
			
		||||
                  CurrencyUnit: array [0..4] of char;
 | 
			
		||||
                  ThousandSeparator: char;  {Thousands separator.}
 | 
			
		||||
                  Zero1: byte;              {Always zero.}
 | 
			
		||||
@ -143,7 +143,7 @@ type
 | 
			
		||||
                  Zero5: byte;
 | 
			
		||||
                  Reserve2: array [0..4] of word);
 | 
			
		||||
                1:
 | 
			
		||||
                 (fsDateFmt: longint;       {1=ddmmyy 2=yymmdd 3=mmddyy}
 | 
			
		||||
                 (fsDateFmt: cardinal;      {1=ddmmyy 2=yymmdd 3=mmddyy}
 | 
			
		||||
                  szCurrency: array [0..4] of char;
 | 
			
		||||
                                            {null terminated currency symbol}
 | 
			
		||||
                  szThousandsSeparator: array [0..1] of char;
 | 
			
		||||
@ -181,37 +181,37 @@ const
 | 
			
		||||
{This is the correct way to call external assembler procedures.}
 | 
			
		||||
procedure syscall;external name '___SYSCALL';
 | 
			
		||||
 | 
			
		||||
function DosSetFileInfo (Handle, InfoLevel: longint; AFileStatus: PFileStatus;
 | 
			
		||||
        FileStatusLen: longint): longint; cdecl; external 'DOSCALLS' index 218;
 | 
			
		||||
function DosSetFileInfo (Handle: longint; InfoLevel: cardinal; AFileStatus: PFileStatus;
 | 
			
		||||
        FileStatusLen: cardinal): cardinal; cdecl; external 'DOSCALLS' index 218;
 | 
			
		||||
 | 
			
		||||
function DosQueryFSInfo (DiskNum, InfoLevel: longint; var Buffer: TFSInfo;
 | 
			
		||||
               BufLen: longint): longint; cdecl; external 'DOSCALLS' index 278;
 | 
			
		||||
function DosQueryFSInfo (DiskNum, InfoLevel: cardinal; var Buffer: TFSInfo;
 | 
			
		||||
               BufLen: cardinal): cardinal; cdecl; external 'DOSCALLS' index 278;
 | 
			
		||||
 | 
			
		||||
function DosQueryFileInfo (Handle, InfoLevel: longint;
 | 
			
		||||
           AFileStatus: PFileStatus; FileStatusLen: longint): longint; cdecl;
 | 
			
		||||
function DosQueryFileInfo (Handle: longint; InfoLevel: cardinal;
 | 
			
		||||
           AFileStatus: PFileStatus; FileStatusLen: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 279;
 | 
			
		||||
 | 
			
		||||
function DosScanEnv (Name: PChar; var Value: PChar): longint; cdecl;
 | 
			
		||||
function DosScanEnv (Name: PChar; var Value: PChar): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 227;
 | 
			
		||||
 | 
			
		||||
function DosFindFirst (FileMask: PChar; var Handle: longint; Attrib: longint;
 | 
			
		||||
function DosFindFirst (FileMask: PChar; var Handle: longint; Attrib: cardinal;
 | 
			
		||||
                       AFileStatus: PFileStatus; FileStatusLen: cardinal;
 | 
			
		||||
                    var Count: cardinal; InfoLevel: cardinal): longint; cdecl;
 | 
			
		||||
                    var Count: cardinal; InfoLevel: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 264;
 | 
			
		||||
 | 
			
		||||
function DosFindNext (Handle: longint; AFileStatus: PFileStatus;
 | 
			
		||||
                FileStatusLen: cardinal; var Count: cardinal): longint; cdecl;
 | 
			
		||||
                FileStatusLen: cardinal; var Count: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 265;
 | 
			
		||||
 | 
			
		||||
function DosFindClose (Handle: longint): longint; cdecl;
 | 
			
		||||
function DosFindClose (Handle: longint): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 263;
 | 
			
		||||
 | 
			
		||||
function DosQueryCtryInfo (Size: longint; var Country: TCountryCode;
 | 
			
		||||
           var Res: TCountryInfo; var ActualSize: longint): longint; cdecl;
 | 
			
		||||
function DosQueryCtryInfo (Size: cardinal; var Country: TCountryCode;
 | 
			
		||||
           var Res: TCountryInfo; var ActualSize: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                        external 'NLS' index 5;
 | 
			
		||||
 | 
			
		||||
function DosMapCase (Size: longint; var Country: TCountryCode;
 | 
			
		||||
                       AString: PChar): longint; cdecl; external 'NLS' index 7;
 | 
			
		||||
function DosMapCase (Size: cardinal; var Country: TCountryCode;
 | 
			
		||||
                      AString: PChar): cardinal; cdecl; external 'NLS' index 7;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{****************************************************************************
 | 
			
		||||
@ -430,7 +430,7 @@ function FindFirst (const Path: string; Attr: longint; var Rslt: TSearchRec): lo
 | 
			
		||||
var SR: PSearchRec;
 | 
			
		||||
    FStat: PFileFindBuf3;
 | 
			
		||||
    Count: cardinal;
 | 
			
		||||
    Err: longint;
 | 
			
		||||
    Err: cardinal;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
  New (FStat);
 | 
			
		||||
@ -459,7 +459,7 @@ function FindNext (var Rslt: TSearchRec): longint;
 | 
			
		||||
var SR: PSearchRec;
 | 
			
		||||
    FStat: PFileFindBuf3;
 | 
			
		||||
    Count: cardinal;
 | 
			
		||||
    Err: longint;
 | 
			
		||||
    Err: cardinal;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
            New (FStat);
 | 
			
		||||
@ -506,7 +506,7 @@ end ['eax', 'ebx', 'ecx', 'edx'];
 | 
			
		||||
 | 
			
		||||
function FileSetDate (Handle, Age: longint): longint;
 | 
			
		||||
var FStat: PFileStatus0;
 | 
			
		||||
    RC: longint;
 | 
			
		||||
    RC: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
            New (FStat);
 | 
			
		||||
            RC := DosQueryFileInfo (Handle, ilStandard, FStat,
 | 
			
		||||
@ -663,7 +663,7 @@ end;
 | 
			
		||||
function DiskFree (Drive: byte): int64;
 | 
			
		||||
 | 
			
		||||
var FI: TFSinfo;
 | 
			
		||||
    RC: longint;
 | 
			
		||||
    RC: cardinal;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
        {In OS/2, we use the filesystem information.}
 | 
			
		||||
@ -678,7 +678,7 @@ end;
 | 
			
		||||
function DiskSize (Drive: byte): int64;
 | 
			
		||||
 | 
			
		||||
var FI: TFSinfo;
 | 
			
		||||
    RC: longint;
 | 
			
		||||
    RC: cardinal;
 | 
			
		||||
 | 
			
		||||
begin
 | 
			
		||||
        {In OS/2, we use the filesystem information.}
 | 
			
		||||
@ -822,8 +822,8 @@ end;
 | 
			
		||||
procedure InitInternational;
 | 
			
		||||
var Country: TCountryCode;
 | 
			
		||||
    CtryInfo: TCountryInfo;
 | 
			
		||||
    Size: longint;
 | 
			
		||||
    RC: longint;
 | 
			
		||||
    Size: cardinal;
 | 
			
		||||
    RC: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
    Size := 0;
 | 
			
		||||
    FillChar (Country, SizeOf (Country), 0);
 | 
			
		||||
@ -886,7 +886,10 @@ end.
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.32  2003-10-08 05:22:47  yuri
 | 
			
		||||
  Revision 1.33  2003-10-13 21:17:31  hajny
 | 
			
		||||
    * longint to cardinal corrections
 | 
			
		||||
 | 
			
		||||
  Revision 1.32  2003/10/08 05:22:47  yuri
 | 
			
		||||
  * Some emx code removed
 | 
			
		||||
 | 
			
		||||
  Revision 1.31  2003/10/07 21:26:34  hajny
 | 
			
		||||
 | 
			
		||||
@ -42,44 +42,44 @@ var
 | 
			
		||||
 DataIndex: PPointer;
 | 
			
		||||
 | 
			
		||||
{ import the necessary stuff from the OS }
 | 
			
		||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): longint;
 | 
			
		||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): cardinal;
 | 
			
		||||
                                          cdecl; external 'DOSCALLS' index 454;
 | 
			
		||||
 | 
			
		||||
function DosFreeThreadLocalMemory (P: pointer): longint; cdecl;
 | 
			
		||||
function DosFreeThreadLocalMemory (P: pointer): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 455;
 | 
			
		||||
 | 
			
		||||
function DosCreateThread (var TID: longint; Address: pointer;
 | 
			
		||||
function DosCreateThread (var TID: cardinal; Address: pointer;
 | 
			
		||||
(* TThreadFunc *)
 | 
			
		||||
        aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
 | 
			
		||||
      aParam: pointer; Flags: cardinal; StackSize: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 311;
 | 
			
		||||
 | 
			
		||||
procedure DosExit (Action, Result: longint); cdecl;
 | 
			
		||||
procedure DosExit (Action, Result: cardinal); cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 234;
 | 
			
		||||
 | 
			
		||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: longint;
 | 
			
		||||
                State: boolean): longint; cdecl; external 'DOSCALLS' index 331;
 | 
			
		||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: cardinal;
 | 
			
		||||
               State: boolean): cardinal; cdecl; external 'DOSCALLS' index 331;
 | 
			
		||||
 | 
			
		||||
function DosCloseMutExSem (Handle: longint): longint; cdecl;
 | 
			
		||||
function DosCloseMutExSem (Handle: longint): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 333;
 | 
			
		||||
 | 
			
		||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: longint):
 | 
			
		||||
                                 longint; cdecl; external 'DOSCALLS' index 336;
 | 
			
		||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: cardinal):
 | 
			
		||||
                                cardinal; cdecl; external 'DOSCALLS' index 336;
 | 
			
		||||
 | 
			
		||||
function DosRequestMutExSem (Handle, Timeout: longint): longint; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 334;
 | 
			
		||||
function DosRequestMutExSem (Handle: longint; Timeout: cardinal): cardinal;
 | 
			
		||||
                                          cdecl; external 'DOSCALLS' index 334;
 | 
			
		||||
 | 
			
		||||
function DosReleaseMutExSem (Handle: longint): longint; cdecl;
 | 
			
		||||
function DosReleaseMutExSem (Handle: longint): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 335;
 | 
			
		||||
 | 
			
		||||
function DosAllocMem (var P: pointer; Size, Flag: longint): longint; cdecl;
 | 
			
		||||
function DosAllocMem (var P: pointer; Size, Flag: cardinal): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 299;
 | 
			
		||||
 | 
			
		||||
function DosFreeMem (P: pointer): longint; cdecl;
 | 
			
		||||
function DosFreeMem (P: pointer): cardinal; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 304;
 | 
			
		||||
 | 
			
		||||
function DosEnterCritSec:longint; cdecl; external 'DOSCALLS' index 232;
 | 
			
		||||
function DosEnterCritSec:cardinal; cdecl; external 'DOSCALLS' index 232;
 | 
			
		||||
 | 
			
		||||
function DosExitCritSec:longint; cdecl; external 'DOSCALLS' index 233;
 | 
			
		||||
function DosExitCritSec:cardinal; cdecl; external 'DOSCALLS' index 233;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
procedure Init_ThreadVar (var TVOffset: dword; Size: dword);
 | 
			
		||||
@ -165,7 +165,7 @@ procedure DoneThread;
 | 
			
		||||
var
 | 
			
		||||
 PTIB: PThreadInfoBlock;
 | 
			
		||||
 PPIB: PProcessInfoBlock;
 | 
			
		||||
 ThreadID: longint;
 | 
			
		||||
 ThreadID: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
 ReleaseThreadVars;
 | 
			
		||||
 DosGetInfoBlocks (@PTIB, @PPIB);
 | 
			
		||||
@ -264,7 +264,7 @@ end;
 | 
			
		||||
 | 
			
		||||
procedure EnterCriticalSection (var CS: TRTLCriticalSection);
 | 
			
		||||
var
 | 
			
		||||
 P, T, Cnt: longint;
 | 
			
		||||
 P, T, Cnt: cardinal;
 | 
			
		||||
 PTIB: PThreadInfoBlock;
 | 
			
		||||
 PPIB: PProcessInfoBlock;
 | 
			
		||||
begin
 | 
			
		||||
@ -324,7 +324,10 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.13  2003-10-08 09:21:33  yuri
 | 
			
		||||
  Revision 1.14  2003-10-13 21:17:31  hajny
 | 
			
		||||
    * longint to cardinal corrections
 | 
			
		||||
 | 
			
		||||
  Revision 1.13  2003/10/08 09:21:33  yuri
 | 
			
		||||
  * EMX code removed. Most probably, MT broken. (EMX notification removed)
 | 
			
		||||
 | 
			
		||||
  Revision 1.12  2003/10/08 05:22:47  yuri
 | 
			
		||||
 | 
			
		||||
@ -60,14 +60,14 @@ const
 | 
			
		||||
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
 | 
			
		||||
              PAPIB: PPProcessInfoBlock); cdecl; external 'DOSCALLS' index 312;
 | 
			
		||||
 | 
			
		||||
function DosSetPriority (Scope, TrClass, Delta, PortID: longint): longint;
 | 
			
		||||
                                          cdecl; external 'DOSCALLS' index 236;
 | 
			
		||||
function DosSetPriority (Scope, TrClass: cardinal; Delta: longing;
 | 
			
		||||
              PortID: cardinal): longint; cdecl; external 'DOSCALLS' index 236;
 | 
			
		||||
 | 
			
		||||
procedure DosExit (Action, Result: longint); cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 233;
 | 
			
		||||
 | 
			
		||||
function DosCreateThread (var TID: longint; Address: TThreadEntry;
 | 
			
		||||
         aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
 | 
			
		||||
function DosCreateThread (var TID: cardinal; Address: TThreadEntry;
 | 
			
		||||
       aParam: pointer; Flags: cardinal; StackSize: cardinal): longint; cdecl;
 | 
			
		||||
                                                 external 'DOSCALLS' index 311;
 | 
			
		||||
 | 
			
		||||
function DosKillThread (TID: longint): longint; cdecl;
 | 
			
		||||
@ -181,7 +181,7 @@ end;
 | 
			
		||||
 | 
			
		||||
constructor TThread.Create(CreateSuspended: Boolean);
 | 
			
		||||
var
 | 
			
		||||
  Flags: Integer;
 | 
			
		||||
  Flags: cardinal;
 | 
			
		||||
begin
 | 
			
		||||
  inherited Create;
 | 
			
		||||
  AddThread (Self);
 | 
			
		||||
@ -194,7 +194,7 @@ begin
 | 
			
		||||
   FFinished := true;
 | 
			
		||||
   Destroy;
 | 
			
		||||
  end else FHandle := FThreadID;
 | 
			
		||||
  IsMultiThread := TRUE;
 | 
			
		||||
  IsMultiThread := true;
 | 
			
		||||
  FFatalException := nil;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -240,7 +240,10 @@ end;
 | 
			
		||||
 | 
			
		||||
{
 | 
			
		||||
  $Log$
 | 
			
		||||
  Revision 1.1  2003-10-06 21:01:07  peter
 | 
			
		||||
  Revision 1.2  2003-10-13 21:17:31  hajny
 | 
			
		||||
    * longint to cardinal corrections
 | 
			
		||||
 | 
			
		||||
  Revision 1.1  2003/10/06 21:01:07  peter
 | 
			
		||||
    * moved classes unit to rtl
 | 
			
		||||
 | 
			
		||||
  Revision 1.8  2003/10/06 17:06:55  florian
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user