codetools: implemented if declared(unicodestring)

git-svn-id: trunk@17622 -
This commit is contained in:
mattias 2008-11-28 08:43:22 +00:00
parent a0a54b0d4a
commit f2f66fafb1
2 changed files with 10 additions and 7 deletions

View File

@ -6,7 +6,6 @@
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="finddeclaration"/>
</General>
@ -35,13 +34,10 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<Version Value="8"/>
<SearchPaths>
<OtherUnitFiles Value="scanexamples/"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>

View File

@ -344,8 +344,15 @@ begin
ErrorPos:=CurPos;
exit;
end;
Result:='0';// this can only be answered by a real compiler
if (not ReadNextAtom) then begin
if CompAtom('UNICODESTRING') then begin
if IsDefined('FPC_HAS_UNICODESTRING') then
Result:='1'
else
Result:='0';
end else begin
Result:='0';// this can only be answered by a real compiler
end;
if (not ReadNextAtom) or (not CompAtom(')')) then begin
ErrorPos:=CurPos;
exit;
end;