mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 20:09:46 +01:00
17 lines
296 B
PHP
17 lines
296 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:=strpas(p)
|
|
else
|
|
getenv:='';
|
|
end;
|