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

View File

@ -344,8 +344,15 @@ begin
ErrorPos:=CurPos; ErrorPos:=CurPos;
exit; exit;
end; end;
Result:='0';// this can only be answered by a real compiler if CompAtom('UNICODESTRING') then begin
if (not ReadNextAtom) 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; ErrorPos:=CurPos;
exit; exit;
end; end;