浏览代码

Merged revisions 10836 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r10836 | yury | 2008-04-28 23:08:19 +0300 (Пн, 28 апр 2008) | 1 line

* DLL export names are not mangled on Windows (bug #11228).
........

git-svn-id: branches/fixes_2_2@10837 -

yury 17 年之前
父节点
当前提交
1333a37ee2
共有 1 个文件被更改,包括 11 次插入7 次删除
  1. 11 7
      compiler/pexports.pas

+ 11 - 7
compiler/pexports.pas

@@ -182,14 +182,18 @@ implementation
                         { if a name is specified? (JM)                         }
                         { if a name is specified? (JM)                         }
 
 
                         if ((options and eo_name)=0) then
                         if ((options and eo_name)=0) then
-                          { Use set mangled name in case of cdecl/cppdecl/mwpascal }
-                          { if no name specified                                   }
-                          if (tprocdef(tprocsym(srsym).procdeflist[0]).proccalloption in [pocall_cdecl,pocall_mwpascal]) then
-                            hpname:=target_info.cprefix+tprocsym(srsym).realname
-                          else if (tprocdef(tprocsym(srsym).procdeflist[0]).proccalloption in [pocall_cppdecl]) then
-                            hpname:=target_info.cprefix+tprocdef(tprocsym(srsym).procdeflist[0]).cplusplusmangledname
+                          if target_info.system in system_all_windows then
+                            { Export names are not mangled on Windows }
+                            hpname:=orgs
                           else
                           else
-                            hpname:=orgs;
+                            { Use set mangled name in case of cdecl/cppdecl/mwpascal }
+                            { if no name specified                                   }
+                            if (tprocdef(tprocsym(srsym).procdeflist[0]).proccalloption in [pocall_cdecl,pocall_mwpascal]) then
+                              hpname:=target_info.cprefix+tprocsym(srsym).realname
+                            else if (tprocdef(tprocsym(srsym).procdeflist[0]).proccalloption in [pocall_cppdecl]) then
+                              hpname:=target_info.cprefix+tprocdef(tprocsym(srsym).procdeflist[0]).cplusplusmangledname
+                            else
+                              hpname:=orgs;
 
 
                         exportprocsym(srsym,hpname,index,options);
                         exportprocsym(srsym,hpname,index,options);
                       end
                       end