mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 21:46:00 +02:00
* fix linux build
git-svn-id: trunk@3626 -
This commit is contained in:
parent
a57708e63d
commit
da85b3db8c
@ -67,7 +67,7 @@ end;
|
|||||||
|
|
||||||
{$IFDEF FPC_FEXPAND_VOLUMES}
|
{$IFDEF FPC_FEXPAND_VOLUMES}
|
||||||
{$IFNDEF FPC_FEXPAND_NO_DEFAULT_PATHS}
|
{$IFNDEF FPC_FEXPAND_NO_DEFAULT_PATHS}
|
||||||
procedure GetDirIO (const VolumeName: OpenString; var Dir: OpenString);
|
procedure GetDirIO (const VolumeName: OpenString; var Dir: PathStr);
|
||||||
|
|
||||||
var
|
var
|
||||||
OldInOutRes: word;
|
OldInOutRes: word;
|
||||||
|
@ -94,10 +94,20 @@ else Result := '';
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$ifndef HasUnix}
|
{$ifdef Unix}
|
||||||
|
Function getenv(name:shortstring):Pchar; external name 'FPC_SYSC_FPGETENV';
|
||||||
|
|
||||||
|
{$DEFINE FPC_FEXPAND_TILDE} { Tilde is expanded to home }
|
||||||
|
{$DEFINE FPC_FEXPAND_GETENVPCHAR} { GetEnv result is a PChar }
|
||||||
|
{$endif}
|
||||||
|
|
||||||
type
|
type
|
||||||
PathStr=string;
|
PathStr=string;
|
||||||
{$i fexpand.inc}
|
{$I fexpand.inc}
|
||||||
|
|
||||||
|
{$ifdef Unix}
|
||||||
|
{$UNDEF FPC_FEXPAND_GETENVPCHAR}
|
||||||
|
{$UNDEF FPC_FEXPAND_TILDE}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
function ExpandFileName (Const FileName : string): String;
|
function ExpandFileName (Const FileName : string): String;
|
||||||
|
@ -86,24 +86,6 @@ procedure UnhookSignal(RtlSigNum: Integer; OnlyIfHooked: Boolean = True);
|
|||||||
|
|
||||||
{$Define OS_FILEISREADONLY} // Specific implementation for Unix.
|
{$Define OS_FILEISREADONLY} // Specific implementation for Unix.
|
||||||
|
|
||||||
Function getenv(name:shortstring):Pchar; external name 'FPC_SYSC_FPGETENV';
|
|
||||||
|
|
||||||
Type
|
|
||||||
ComStr = String[255];
|
|
||||||
PathStr = String[255];
|
|
||||||
DirStr = String[255];
|
|
||||||
NameStr = String[255];
|
|
||||||
ExtStr = String[255];
|
|
||||||
|
|
||||||
|
|
||||||
{$DEFINE FPC_FEXPAND_TILDE} { Tilde is expanded to home }
|
|
||||||
{$DEFINE FPC_FEXPAND_GETENVPCHAR} { GetEnv result is a PChar }
|
|
||||||
|
|
||||||
{$I fexpand.inc}
|
|
||||||
|
|
||||||
{$UNDEF FPC_FEXPAND_GETENVPCHAR}
|
|
||||||
{$UNDEF FPC_FEXPAND_TILDE}
|
|
||||||
|
|
||||||
{ Include platform independent implementation part }
|
{ Include platform independent implementation part }
|
||||||
{$i sysutils.inc}
|
{$i sysutils.inc}
|
||||||
|
|
||||||
@ -341,7 +323,7 @@ Function Dirname(Const path:pathstr):pathstr;
|
|||||||
a slash.
|
a slash.
|
||||||
}
|
}
|
||||||
var
|
var
|
||||||
Dir : PathStr;
|
Dir : DirStr;
|
||||||
Name : NameStr;
|
Name : NameStr;
|
||||||
Ext : ExtStr;
|
Ext : ExtStr;
|
||||||
begin
|
begin
|
||||||
@ -358,7 +340,7 @@ Function Basename(Const path:pathstr;Const suf:pathstr):pathstr;
|
|||||||
supplied, it is cut off the filename.
|
supplied, it is cut off the filename.
|
||||||
}
|
}
|
||||||
var
|
var
|
||||||
Dir : PathStr;
|
Dir : DirStr;
|
||||||
Name : NameStr;
|
Name : NameStr;
|
||||||
Ext : ExtStr;
|
Ext : ExtStr;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user