* fixed for non-unix

git-svn-id: trunk@11013 -
This commit is contained in:
florian 2008-05-19 14:38:47 +00:00
parent 4dfd59a6f8
commit b4f82b22c8

View File

@ -5,10 +5,8 @@
{ test lineinfo in libraries, to get always proper results, the optimizer { test lineinfo in libraries, to get always proper results, the optimizer
must be turned off with -O- } must be turned off with -O- }
{$ifdef unix}
uses uses
dl,sysutils; {$ifdef unix}dl,{$endif unix}sysutils;
{$endif unix}
procedure p(var a : pointer);external 'tlib1a' name 'p'; procedure p(var a : pointer);external 'tlib1a' name 'p';
@ -23,7 +21,7 @@ w:
{ library } { library }
p(a); p(a);
GetLineInfo(PtrUInt(a),s1,s2,l); GetLineInfo(PtrUInt(a),s1,s2,l);
s2:=ExtractFilename(s2); s2:=ExtractFilename(s2);
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l); writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
{ GetLineInfo of dwarf doesn't return the function name } { GetLineInfo of dwarf doesn't return the function name }
if { (s1<>'P') or } (s2<>'tlib1a.pp') or (l<>9) then if { (s1<>'P') or } (s2<>'tlib1a.pp') or (l<>9) then
@ -34,8 +32,8 @@ w:
s2:=ExtractFilename(s2); s2:=ExtractFilename(s2);
writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l); writeln({ 'Func: ',s1,'} 'Source: ',s2,' Line: ',l);
{ GetLineInfo of dwarf doesn't return the function name } { GetLineInfo of dwarf doesn't return the function name }
if { (s1<>'P') or } (s2<>'tlib1.pp') or (l<>21) then if { (s1<>'P') or } (s2<>'tlib1.pp') or (l<>19) then
halt(1); halt(1);
writeln('ok'); writeln('ok');
end. end.