mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 15:39:29 +02:00
* fixed adding of .dll extension
git-svn-id: trunk@5243 -
This commit is contained in:
parent
99f1c86413
commit
35c21515a9
@ -1509,7 +1509,9 @@ begin
|
||||
if not(token=_SEMICOLON) and not(idtoken=_NAME) then
|
||||
begin
|
||||
{ Always add library prefix and suffix to create an uniform name }
|
||||
hs:=ChangeFileExt(get_stringconst,target_info.sharedlibext);
|
||||
hs:=get_stringconst;
|
||||
if ExtractFileExt(hs)='' then
|
||||
hs:=ChangeFileExt(hs,target_info.sharedlibext);
|
||||
if Copy(hs,1,length(target_info.sharedlibprefix))<>target_info.sharedlibprefix then
|
||||
hs:=target_info.sharedlibprefix+hs;
|
||||
import_dll:=stringdup(hs);
|
||||
|
@ -1012,7 +1012,9 @@ implementation
|
||||
if (extern_var) and (idtoken<>_NAME) then
|
||||
begin
|
||||
is_dll:=true;
|
||||
dll_name:=ChangeFileExt(get_stringconst,target_info.sharedlibext);
|
||||
dll_name:=get_stringconst;
|
||||
if ExtractFileExt(dll_name)='' then
|
||||
dll_name:=ChangeFileExt(dll_name,target_info.sharedlibext);
|
||||
end;
|
||||
if try_to_consume(_NAME) then
|
||||
C_name:=get_stringconst
|
||||
|
@ -1683,7 +1683,9 @@ implementation
|
||||
if FindLibraryFile(binname,target_info.staticClibprefix,target_info.staticClibext,hs) then
|
||||
exit;
|
||||
{ check if we can find the dll }
|
||||
hs:=ChangeFileExt(binname,target_info.sharedlibext);
|
||||
hs:=binname;
|
||||
if ExtractFileExt(hs)='' then
|
||||
hs:=ChangeFileExt(hs,target_info.sharedlibext);
|
||||
if not FindDll(hs,dllname) then
|
||||
exit;
|
||||
importfound:=false;
|
||||
|
Loading…
Reference in New Issue
Block a user