mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 07:46:00 +02:00
parent
bb31bc6ca4
commit
b6824290fc
@ -557,3 +557,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifndef SYSUTILS_HAS_FILEFLUSH_IMPL}
|
||||||
|
function FileFlush(Handle: THandle): Boolean;
|
||||||
|
begin
|
||||||
|
Result:= False;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
@ -176,6 +176,7 @@ Function FileRead (Handle : THandle; out Buffer; Count : longint) : Longint;
|
|||||||
Function FileWrite (Handle : THandle; const Buffer; Count : Longint) : Longint;
|
Function FileWrite (Handle : THandle; const Buffer; Count : Longint) : Longint;
|
||||||
Function FileSeek (Handle : THandle; FOffset, Origin: Longint) : Longint;
|
Function FileSeek (Handle : THandle; FOffset, Origin: Longint) : Longint;
|
||||||
Function FileSeek (Handle : THandle; FOffset: Int64; Origin: Longint) : Int64;
|
Function FileSeek (Handle : THandle; FOffset: Int64; Origin: Longint) : Int64;
|
||||||
|
function FileFlush(Handle: THandle): Boolean;
|
||||||
Procedure FileClose (Handle : THandle);
|
Procedure FileClose (Handle : THandle);
|
||||||
Function FileTruncate (Handle : THandle;Size: Int64) : boolean;
|
Function FileTruncate (Handle : THandle;Size: Int64) : boolean;
|
||||||
Function FindNext (Var Rslt : TRawByteSearchRec) : Longint;
|
Function FindNext (Var Rslt : TRawByteSearchRec) : Longint;
|
||||||
|
@ -38,6 +38,9 @@ interface
|
|||||||
{$DEFINE HAS_LOCALTIMEZONEOFFSET}
|
{$DEFINE HAS_LOCALTIMEZONEOFFSET}
|
||||||
{$DEFINE HAS_GETTICKCOUNT64}
|
{$DEFINE HAS_GETTICKCOUNT64}
|
||||||
|
|
||||||
|
// this target has an fileflush implementation, don't include dummy
|
||||||
|
{$DEFINE SYSUTILS_HAS_FILEFLUSH_IMPL}
|
||||||
|
|
||||||
{ used OS file system APIs use ansistring }
|
{ used OS file system APIs use ansistring }
|
||||||
{$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
|
{$define SYSUTILS_HAS_ANSISTR_FILEUTIL_IMPL}
|
||||||
{ OS has an ansistring/single byte environment variable API }
|
{ OS has an ansistring/single byte environment variable API }
|
||||||
@ -484,6 +487,10 @@ begin
|
|||||||
FileOpen:=DoFileLocking(FileOpen, Mode);
|
FileOpen:=DoFileLocking(FileOpen, Mode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function FileFlush(Handle: THandle): Boolean;
|
||||||
|
begin
|
||||||
|
Result:= fpfsync(handle)=0;
|
||||||
|
end;
|
||||||
|
|
||||||
Function FileCreate (Const FileName : RawByteString) : Longint;
|
Function FileCreate (Const FileName : RawByteString) : Longint;
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ uses
|
|||||||
{$DEFINE HAS_GETTICKCOUNT64}
|
{$DEFINE HAS_GETTICKCOUNT64}
|
||||||
{$DEFINE OS_FILESETDATEBYNAME}
|
{$DEFINE OS_FILESETDATEBYNAME}
|
||||||
|
|
||||||
|
// this target has an fileflush implementation, don't include dummy
|
||||||
|
{$DEFINE SYSUTILS_HAS_FILEFLUSH_IMPL}
|
||||||
|
|
||||||
{ used OS file system APIs use unicodestring }
|
{ used OS file system APIs use unicodestring }
|
||||||
{$define SYSUTILS_HAS_UNICODESTR_FILEUTIL_IMPL}
|
{$define SYSUTILS_HAS_UNICODESTR_FILEUTIL_IMPL}
|
||||||
{ OS has an ansistring/single byte environment variable API }
|
{ OS has an ansistring/single byte environment variable API }
|
||||||
@ -283,6 +286,11 @@ const
|
|||||||
FILE_SHARE_READ or FILE_SHARE_WRITE);
|
FILE_SHARE_READ or FILE_SHARE_WRITE);
|
||||||
|
|
||||||
|
|
||||||
|
function FileFlush(Handle: THandle): Boolean;
|
||||||
|
begin
|
||||||
|
Result:= FlushFileBuffers(Handle);
|
||||||
|
end;
|
||||||
|
|
||||||
Function FileOpen (Const FileName : unicodestring; Mode : Integer) : THandle;
|
Function FileOpen (Const FileName : unicodestring; Mode : Integer) : THandle;
|
||||||
begin
|
begin
|
||||||
result := CreateFileW(PWideChar(FileName), dword(AccessMode[Mode and 3]),
|
result := CreateFileW(PWideChar(FileName), dword(AccessMode[Mode and 3]),
|
||||||
|
@ -1 +1 @@
|
|||||||
'2017-08-12 rev 36877'
|
'2017-08-22 rev 37024'
|
||||||
|
Loading…
Reference in New Issue
Block a user