mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 23:49:44 +02:00
* fixed path appending for lib
This commit is contained in:
parent
5012dd876e
commit
2e96721c20
@ -149,17 +149,23 @@ end;
|
|||||||
function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : string) : boolean;
|
function FindLibraryFile(s:string;const prefix,ext:string;var foundfile : string) : boolean;
|
||||||
var
|
var
|
||||||
found : boolean;
|
found : boolean;
|
||||||
|
paths : string;
|
||||||
begin
|
begin
|
||||||
findlibraryfile:=false;
|
findlibraryfile:=false;
|
||||||
foundfile:=s;
|
foundfile:=s;
|
||||||
if s='' then
|
if s='' then
|
||||||
exit;
|
exit;
|
||||||
|
{ split path from filename }
|
||||||
|
paths:=SplitPath(s);
|
||||||
|
s:=SplitFileName(s);
|
||||||
{ add prefix 'lib' }
|
{ add prefix 'lib' }
|
||||||
if (prefix<>'') and (Copy(s,1,length(prefix))<>prefix) then
|
if (prefix<>'') and (Copy(s,1,length(prefix))<>prefix) then
|
||||||
s:=prefix+s;
|
s:=prefix+s;
|
||||||
{ add extension }
|
{ add extension }
|
||||||
if (ext<>'') and (Copy(s,length(s)-length(ext)+1,length(ext))<>ext) then
|
if (ext<>'') and (Copy(s,length(s)-length(ext)+1,length(ext))<>ext) then
|
||||||
s:=s+ext;
|
s:=s+ext;
|
||||||
|
{ readd the split path }
|
||||||
|
s:=paths+s;
|
||||||
if FileExists(s) then
|
if FileExists(s) then
|
||||||
begin
|
begin
|
||||||
foundfile:=ScriptFixFileName(s);
|
foundfile:=ScriptFixFileName(s);
|
||||||
@ -533,7 +539,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.24 2001-09-18 11:30:48 michael
|
Revision 1.25 2002-01-19 11:57:05 peter
|
||||||
|
* fixed path appending for lib
|
||||||
|
|
||||||
|
Revision 1.24 2001/09/18 11:30:48 michael
|
||||||
* Fixes win32 linking problems with import libraries
|
* Fixes win32 linking problems with import libraries
|
||||||
* LINKLIB Libraries are now looked for using C file extensions
|
* LINKLIB Libraries are now looked for using C file extensions
|
||||||
* get_exepath fix
|
* get_exepath fix
|
||||||
|
@ -852,14 +852,12 @@ implementation
|
|||||||
if not(assigned(procdefinition)) then
|
if not(assigned(procdefinition)) then
|
||||||
begin
|
begin
|
||||||
{ when the definition has overload directive set, we search for
|
{ when the definition has overload directive set, we search for
|
||||||
overloaded definitions }
|
overloaded definitions in the class, this only needs to be done once
|
||||||
|
for class entries as the tree keeps always the same }
|
||||||
if (not symtableprocentry.overloadchecked) and
|
if (not symtableprocentry.overloadchecked) and
|
||||||
(po_overload in symtableprocentry.defs^.def.procoptions) then
|
(po_overload in symtableprocentry.defs^.def.procoptions) and
|
||||||
begin
|
(symtableprocentry.owner.symtabletype=objectsymtable) then
|
||||||
{ for methods search in the class tree }
|
search_class_overloads(symtableprocentry);
|
||||||
if (symtableprocentry.owner.symtabletype=objectsymtable) then
|
|
||||||
search_class_overloads(symtableprocentry);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ link all procedures which have the same # of parameters }
|
{ link all procedures which have the same # of parameters }
|
||||||
pd:=symtableprocentry.defs;
|
pd:=symtableprocentry.defs;
|
||||||
@ -888,6 +886,37 @@ implementation
|
|||||||
pd:=pd^.next;
|
pd:=pd^.next;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef CROSSUNIT}
|
||||||
|
{ when the definition has overload directive set, we search for
|
||||||
|
overloaded definitions in the other used units unitsymtable. The found
|
||||||
|
entries are only added to the procs list and not the procsym }
|
||||||
|
if (po_overload in symtableprocentry.defs^.def.procoptions) and
|
||||||
|
(symtableprocentry.owner.symtabletype<>objectsymtable) then
|
||||||
|
begin
|
||||||
|
|
||||||
|
|
||||||
|
srpdl:=srsym.defs;
|
||||||
|
while assigned(srpdl) do
|
||||||
|
begin
|
||||||
|
found:=false;
|
||||||
|
pdl:=aprocsym.defs;
|
||||||
|
while assigned(pdl) do
|
||||||
|
begin
|
||||||
|
if equal_paras(pdl^.def.para,srpdl^.def.para,cp_value_equal_const) then
|
||||||
|
begin
|
||||||
|
found:=true;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
pdl:=pdl^.next;
|
||||||
|
end;
|
||||||
|
if not found then
|
||||||
|
aprocsym.addprocdef(srpdl^.def);
|
||||||
|
srpdl:=srpdl^.next;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
{$endif CROSSUNIT}
|
||||||
|
|
||||||
{ no procedures found? then there is something wrong
|
{ no procedures found? then there is something wrong
|
||||||
with the parameter size }
|
with the parameter size }
|
||||||
if not assigned(procs) then
|
if not assigned(procs) then
|
||||||
@ -1753,7 +1782,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.61 2001-12-31 16:59:41 peter
|
Revision 1.62 2002-01-19 11:57:05 peter
|
||||||
|
* fixed path appending for lib
|
||||||
|
|
||||||
|
Revision 1.61 2001/12/31 16:59:41 peter
|
||||||
* protected/private symbols parsing fixed
|
* protected/private symbols parsing fixed
|
||||||
|
|
||||||
Revision 1.60 2001/12/11 13:21:36 jonas
|
Revision 1.60 2001/12/11 13:21:36 jonas
|
||||||
|
Loading…
Reference in New Issue
Block a user