mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-02 18:20:37 +01:00
17 lines
300 B
PHP
17 lines
300 B
PHP
Uses Linux;
|
|
|
|
{ Declared EXPLICITLY with Ansistring, so NO mistaking is possible }
|
|
|
|
Function Getenv (Var EnvVar : AnsiString): AnsiString;
|
|
|
|
Var P : Pchar;
|
|
|
|
begin
|
|
// Linux version returns pchar.
|
|
p:=linux.getenv(EnvVar);
|
|
if P<>nil then
|
|
getenv:=ansistring(p)
|
|
else
|
|
getenv:='';
|
|
end;
|