* disabled the name mangling of external non-cdecl and non-cppdecl procedures

that don't have an import name specified explicitly. The previous behaviour
  wasn't very useful, because it included the current module name in the mangled
  name and that was very unlikely to be the correct name of a routine in a
  different module. The new behaviour is also BP7 and Delphi compatible.

git-svn-id: trunk@32385 -
This commit is contained in:
nickysn 2015-11-20 23:14:53 +00:00
parent ae8316b1b4
commit 4da9296f80
3 changed files with 19 additions and 1 deletions

1
.gitattributes vendored
View File

@ -10810,6 +10810,7 @@ tests/tbs/tb0609.pp svneol=native#text/plain
tests/tbs/tb0610.pp svneol=native#text/pascal
tests/tbs/tb0611.pp svneol=native#text/pascal
tests/tbs/tb0612.pp svneol=native#text/pascal
tests/tbs/tb0613.pp svneol=native#text/pascal
tests/tbs/tb205.pp svneol=native#text/plain
tests/tbs/tb610.pp svneol=native#text/pascal
tests/tbs/tb613.pp svneol=native#text/plain

View File

@ -3004,7 +3004,9 @@ const
{ but according to MacPas mode description
Cprefix should still be used PM }
if (m_mac in current_settings.modeswitches) then
result:=target_info.Cprefix+tprocdef(pd).procsym.realname;
result:=target_info.Cprefix+tprocdef(pd).procsym.realname
else
result:=pd.procsym.realname;
end;
end;
end;

15
tests/tbs/tb0613.pp Normal file
View File

@ -0,0 +1,15 @@
procedure TestProc1; external;
procedure TestProc2; pascal; external;
procedure Ext_TestProc1; public name 'TestProc1';
begin
end;
procedure Ext_TestProc2; pascal; public name 'TestProc2';
begin
end;
begin
TestProc1;
TestProc2;
end.