mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:29:42 +02:00
* Patch to change numeric constant to symbolic constant for file mode (bug ID 37889)
git-svn-id: trunk@47064 -
This commit is contained in:
parent
e4f53a7e41
commit
48747bd161
@ -248,10 +248,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
|
const
|
||||||
|
{ read/write permission for everyone }
|
||||||
|
MODE_FPOPEN = S_IWUSR OR S_IRUSR OR
|
||||||
|
S_IWGRP OR S_IRGRP OR
|
||||||
|
S_IWOTH OR S_IROTH;
|
||||||
|
|
||||||
Function FpOpen (path : pChar; flags : cInt):cInt; {$ifdef VER2_0}inline;{$endif}
|
Function FpOpen (path : pChar; flags : cInt):cInt; {$ifdef VER2_0}inline;{$endif}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
FpOpen:=FpOpen(path,flags,438);
|
FpOpen:=FpOpen(path,flags,MODE_FPOPEN);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function FpOpen (const path : RawByteString; flags : cInt):cInt; {$ifdef VER2_0}inline;{$endif}
|
Function FpOpen (const path : RawByteString; flags : cInt):cInt; {$ifdef VER2_0}inline;{$endif}
|
||||||
@ -259,14 +265,14 @@ var
|
|||||||
SystemPath: RawByteString;
|
SystemPath: RawByteString;
|
||||||
Begin
|
Begin
|
||||||
SystemPath:=ToSingleByteFileSystemEncodedFileName(path);
|
SystemPath:=ToSingleByteFileSystemEncodedFileName(path);
|
||||||
FpOpen:=FpOpen(pchar(SystemPath),flags,438);
|
FpOpen:=FpOpen(pchar(SystemPath),flags,MODE_FPOPEN);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function FpOpen (path : String; flags : cInt):cInt;
|
Function FpOpen (path : String; flags : cInt):cInt;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
path:=path+#0;
|
path:=path+#0;
|
||||||
FpOpen:=FpOpen(@path[1],flags,438);
|
FpOpen:=FpOpen(@path[1],flags,MODE_FPOPEN);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function FpOpen (path : String; flags : cInt; Mode: TMode):cInt;
|
Function FpOpen (path : String; flags : cInt; Mode: TMode):cInt;
|
||||||
|
Loading…
Reference in New Issue
Block a user