Ver código fonte

* fix compilation on several OSes after r44010

git-svn-id: trunk@44013 -
(cherry picked from commit 69956cd97a3178add5b81947079f8c13b8755b37)
florian 5 anos atrás
pai
commit
336e72f3c4

+ 1 - 1
rtl/amicommon/sysutils.pp

@@ -182,7 +182,7 @@ begin
 end;
 
 
-function FileGetDate(Handle: THandle) : LongInt;
+function FileGetDate(Handle: THandle) : Int64;
 var
   tmpFIB : PFileInfoBlock;
   tmpDateTime: TDateTime;

+ 1 - 1
rtl/atari/sysutils.pp

@@ -76,7 +76,7 @@ begin
 end;
 
 
-function FileGetDate(Handle: THandle) : LongInt;
+function FileGetDate(Handle: THandle) : Int64;
 var
   td: TDOSTIME;
 begin

+ 1 - 2
rtl/embedded/sysutils.pp

@@ -52,8 +52,7 @@ begin
   result := -1;
 end;
 
-
-function FileGetDate(Handle: LongInt) : LongInt;
+function FileGetDate(Handle: THandle) : Int64;
 begin
   result := -1;
 end;

+ 3 - 2
rtl/emx/sysutils.pp

@@ -838,7 +838,7 @@ begin
 end;
 
 
-function FileGetDate (Handle: longint): longint; assembler;
+function FileGetDate (Handle: longint): Int64; assembler;
 asm
  push ebx
 {$IFDEF REGCALL}
@@ -854,10 +854,11 @@ asm
  shld eax, ecx, 16
 @FGetDateEnd:
  pop ebx
+ xorl edx,edx
 end {['eax', 'ebx', 'ecx', 'edx']};
 
 
-function FileSetDate (Handle, Age: longint): longint;
+function FileSetDate (Handle: longint; Age: Int64): longint;
 var FStat: PFileStatus3;
     RC: cardinal;
 begin

+ 2 - 2
rtl/gba/sysutils.pp

@@ -61,13 +61,13 @@ begin
 end;
 
 
-function FileGetDate(Handle: LongInt) : LongInt;
+function FileGetDate(Handle: LongInt) : Int64;
 begin
   result := -1;
 end;
 
 
-function FileSetDate(Handle, Age: Int64) : LongInt;
+function FileSetDate(Handle: Longint; Age: Int64) : LongInt;
 begin
   result := -1;
 end;

+ 3 - 6
rtl/go32v2/sysutils.pp

@@ -424,7 +424,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : Longint) : Longint;
+Function FileGetDate (Handle : Longint) : Int64;
 var
   Regs: registers;
 begin
@@ -435,14 +435,11 @@ begin
   if Regs.Flags and CarryFlag <> 0 then
    result := -1
   else
-   begin
-     LongRec(result).Lo := Regs.cx;
-     LongRec(result).Hi := Regs.dx;
-   end ;
+   result:=(Regs.dx shl 16) or Regs.cx;
 end;
 
 
-Function FileSetDate (Handle, Age : Int64) : Longint;
+Function FileSetDate (Handle: longint; Age: Int64) : Longint;
 var
   Regs: registers;
 begin

+ 2 - 2
rtl/macos/sysutils.pp

@@ -446,7 +446,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : Longint) : Longint;
+Function FileGetDate (Handle : Longint) : Int64;
 
   (*
 Var Info : Stat;
@@ -462,7 +462,7 @@ begin
 end;
 
 
-Function FileSetDate (Handle,Age : Int64) : Longint;
+Function FileSetDate (Handle: Longint; Age: Int64) : Longint;
 
 begin
   // TODO fix

+ 2 - 5
rtl/msdos/sysutils.pp

@@ -423,7 +423,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 var
   Regs: registers;
 begin
@@ -434,10 +434,7 @@ begin
   if Regs.Flags and fCarry <> 0 then
    result := -1
   else
-   begin
-     LongRec(result).Lo := Regs.cx;
-     LongRec(result).Hi := Regs.dx;
-   end ;
+   result:=(Regs.dx shl 16) or Regs.cx;
 end;
 
 

+ 1 - 1
rtl/nativent/sysutils.pp

@@ -853,7 +853,7 @@ Begin
 end;
 
 
-function FileGetDate(Handle: THandle): Longint;
+function FileGetDate(Handle: THandle): Int64;
 var
   res: NTSTATUS;
   basic: FILE_BASIC_INFORMATION;

+ 2 - 2
rtl/nds/sysutils.pp

@@ -70,13 +70,13 @@ begin
 end;
 
 
-function FileGetDate(Handle: LongInt) : LongInt;
+function FileGetDate(Handle: LongInt) : Int64;
 begin
   result := -1;
 end;
 
 
-function FileSetDate(Handle, Age: Int64) : LongInt;
+function FileSetDate(Handle: LongInt; Age: Int64) : LongInt;
 begin
   result := -1;
 end;

+ 1 - 1
rtl/netware/sysutils.pp

@@ -362,7 +362,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 Var Info : NWStatBufT;
     PTM  : PNWTM;
 begin

+ 1 - 1
rtl/netware/tests/test.pas

@@ -336,7 +336,7 @@ BEGIN
 END;
 
 {
-Function FileSetDate (Handle,Age : Int64) : Longint;
+Function FileSetDate (Handle: longint; Age: Int64) : Longint;
 Function FileSetAttr (Const Filename : String; Attr: longint) : Longint;
 }
 PROCEDURE SysUtilsTest;

+ 1 - 1
rtl/netwlibc/sysutils.pp

@@ -354,7 +354,7 @@ end;
 
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 Var Info : TStat;
     _PTM : PTM;
 begin

+ 1 - 1
rtl/objpas/sysutils/filutil.inc

@@ -537,7 +537,7 @@ end;
 
 type
   TAbstractSearchRec = Record
-    Time : Longint;
+    Time : Int64;
     Size : Int64;
     Attr : Longint;
     { this will be assigned by the generic code; it is actually either a

+ 2 - 2
rtl/os2/sysutils.pp

@@ -356,7 +356,7 @@ begin
 end;
 
 
-function FileGetDate (Handle: THandle): longint;
+function FileGetDate (Handle: THandle): Int64;
 var
   FStat: TFileStatus3;
   Time: Longint;
@@ -376,7 +376,7 @@ begin
   FileGetDate:=Time;
 end;
 
-function FileSetDate (Handle: THandle; Age: longint): longint;
+function FileSetDate (Handle: THandle; Age: Int64): longint;
 var
   FStat: PFileStatus3;
   RC: cardinal;

+ 1 - 1
rtl/symbian/sysutils.pp

@@ -53,7 +53,7 @@ begin
 end;
 
 
-function FileGetDate(Handle: LongInt) : LongInt;
+function FileGetDate(Handle: LongInt) : Int64;
 begin
   result := -1;
 end;

+ 2 - 2
rtl/watcom/sysutils.pp

@@ -406,7 +406,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : Longint) : Longint;
+Function FileGetDate (Handle : Longint) : Int64;
 var
   Regs: registers;
 begin
@@ -424,7 +424,7 @@ begin
 end;
 
 
-Function FileSetDate (Handle, Age : Int64) : Longint;
+Function FileSetDate (Handle: longint; Age: Int64) : Longint;
 var
   Regs: registers;
 begin

+ 2 - 2
rtl/wii/sysutils.pp

@@ -60,13 +60,13 @@ begin
 end;
 
 
-function FileGetDate(Handle: LongInt) : LongInt;
+function FileGetDate(Handle: LongInt) : Int64;
 begin
   result := -1;
 end;
 
 
-function FileSetDate(Handle, Age: Int64) : LongInt;
+function FileSetDate(Handle: Longint; Age: Int64) : LongInt;
 begin
   result := -1;
 end;

+ 1 - 1
rtl/win/sysutils.pp

@@ -650,7 +650,7 @@ end;
 
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 Var
   FT : TFileTime;
   tmpdtime : longint;

+ 2 - 5
rtl/win16/sysutils.pp

@@ -449,7 +449,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 var
   Regs: registers;
 begin
@@ -461,10 +461,7 @@ begin
   if Regs.Flags and fCarry <> 0 then
    result := -1
   else
-   begin
-     LongRec(result).Lo := Regs.cx;
-     LongRec(result).Hi := Regs.dx;
-   end ;
+   Result:=(Regs.dx shl 16) or Regs.cx;
 end;
 
 

+ 1 - 1
rtl/wince/sysutils.pp

@@ -361,7 +361,7 @@ begin
 end;
 
 
-Function FileGetDate (Handle : THandle) : Longint;
+Function FileGetDate (Handle : THandle) : Int64;
 Var
   FT : TFileTime;
   tmpdtime : longint;