mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 05:59:27 +02:00
amicommon: instead of a runtime check, check for OS2.0+ features at compile time in DOS
git-svn-id: trunk@44742 -
This commit is contained in:
parent
024ab0a854
commit
db0deab026
@ -1081,11 +1081,10 @@ Var
|
|||||||
Res: Integer;
|
Res: Integer;
|
||||||
begin
|
begin
|
||||||
SetLength(EnvList, 0);
|
SetLength(EnvList, 0);
|
||||||
|
|
||||||
|
{$if not defined(AMIGA_V1_0_ONLY) and not defined(AMIGA_V1_2_ONLY)}
|
||||||
// pr_LocalVars are introduced with OS2.0
|
// pr_LocalVars are introduced with OS2.0
|
||||||
{$ifdef AMIGA68k}
|
|
||||||
if PLibrary(AOS_ExecBase)^.lib_Version >= 36 then
|
|
||||||
{$endif}
|
|
||||||
begin
|
|
||||||
ThisProcess := PProcess(FindTask(nil)); //Get the pointer to our process
|
ThisProcess := PProcess(FindTask(nil)); //Get the pointer to our process
|
||||||
LocalVars_List := @(ThisProcess^.pr_LocalVars); //get the list of pr_LocalVars as pointer
|
LocalVars_List := @(ThisProcess^.pr_LocalVars); //get the list of pr_LocalVars as pointer
|
||||||
LocalVar_Node := pLocalVar(LocalVars_List^.mlh_head); //get the headnode of the LocalVars list
|
LocalVar_Node := pLocalVar(LocalVars_List^.mlh_head); //get the headnode of the LocalVars list
|
||||||
@ -1114,7 +1113,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
LocalVar_Node := pLocalVar(LocalVar_Node^.lv_node.ln_Succ); //we need to get the next node
|
LocalVar_Node := pLocalVar(LocalVar_Node^.lv_node.ln_Succ); //we need to get the next node
|
||||||
end;
|
end;
|
||||||
end;
|
{$endif not defined(AMIGA_V1_0_ONLY) and not defined(AMIGA_V1_2_ONLY)}
|
||||||
|
|
||||||
// search in env for all Variables
|
// search in env for all Variables
|
||||||
FillChar(Anchor,sizeof(TAnchorPath),#0);
|
FillChar(Anchor,sizeof(TAnchorPath),#0);
|
||||||
Res := MatchFirst('ENV:#?', @Anchor);
|
Res := MatchFirst('ENV:#?', @Anchor);
|
||||||
|
Loading…
Reference in New Issue
Block a user