From 7bf34513767bfd63a19fd7c420e8d825e50bf232 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 9 Nov 2024 22:18:20 +0100 Subject: Fix ssize_t data type size --- UEngines.pas | 3 ++- ULibc.pas | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/UEngines.pas b/UEngines.pas index 8649a05..7a0ccad 100644 --- a/UEngines.pas +++ b/UEngines.pas @@ -556,7 +556,8 @@ end; function TLocalTreeEngine.CopyFileOut(const SourceFile, DestFile: string; Append: boolean; ProgressFunc: TEngineProgressFunc; Sender: Pointer; Error: PPGError): boolean; var fsrc, fdest: Longint; Buffer: Pointer; - BytesDone, BytesRead, BytesWritten, BytesRemaining: ssize_t; + BytesDone: Int64; + BytesRead, BytesWritten, BytesRemaining: ssize_t; begin Result := False; BytesDone := 0; diff --git a/ULibc.pas b/ULibc.pas index 3b187be..3c2a615 100644 --- a/ULibc.pas +++ b/ULibc.pas @@ -51,9 +51,17 @@ type {$ENDIF} +{$IFDEF CPU64} + size_t = QWORD; + ssize_t = Int64; + clock_t = QWORD; +{$ELSE} + size_t = Cardinal; + ssize_t = LongInt; + clock_t = Cardinal; +{$ENDIF} + sig_atomic_t = Longint; - size_t = Cardinal; - ssize_t = Longint; error_t = Integer; __mode_t = DWORD; __dev_t = QWORD; -- cgit v1.2.3