Author: tkreuzer
Date: Tue Jan 25 16:28:54 2011
New Revision: 50487
URL:
http://svn.reactos.org/svn/reactos?rev=50487&view=rev
Log:
[CMAKE]
Fix spec2def on MSVC builds (added --ms flag)
Modified:
branches/cmake-bringup/tools/spec2def/spec2def.c
Modified: branches/cmake-bringup/tools/spec2def/spec2def.c
URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/spec2def/sp…
==============================================================================
--- branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] (original)
+++ branches/cmake-bringup/tools/spec2def/spec2def.c [iso-8859-1] Tue Jan 25 16:28:54
2011
@@ -24,6 +24,7 @@
typedef int (*PFNOUTLINE)(FILE *, EXPORT *);
int gbKillAt = 0;
int gbUseDeco = 0;
+int gbMSComp = 0;
int no_redirections = 0;
char *pszArchString = "i386";
char *pszArchString2;
@@ -305,9 +306,9 @@
int fDeco = (gbUseDeco && !ScanToken(pexp->pcRedirection,
'.'));
fprintf(fileDest, "=");
- PrintName(fileDest, pexp, 1, fDeco);
- }
- else if (gbUseDeco && gbKillAt &&
+ PrintName(fileDest, pexp, 1, fDeco && !gbMSComp);
+ }
+ else if (gbUseDeco && gbKillAt && !gbMSComp &&
(pexp->nCallingConvention == CC_STDCALL ||
pexp->nCallingConvention == CC_FASTCALL))
{
@@ -624,6 +625,7 @@
" -l=<file> generates an asm lib stub\n"
" -d=<file> generates a def file\n"
" -s=<file> generates a stub file\n"
+ " --ms msvc compatibility\n"
" -n=<name> name of the dll\n"
" --kill-at removes @xx decorations from exports\n"
" -r removes redirections from def file\n"
@@ -673,6 +675,10 @@
{
gbKillAt = 1;
}
+ else if ((strcasecmp(argv[i], "--ms") == 0))
+ {
+ gbMSComp = 1;
+ }
else if ((strcasecmp(argv[i], "-r") == 0))
{
no_redirections = 1;