From 420285a3c03a2109bb019c5876337adc793ea8a2 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 29 Jun 2014 11:32:49 +0000 Subject: [PATCH] [SPEC2DEF] - Do not include an export's ordinal in the .def file for the import lib unless import by ordinal is intended (via -noname or -ordinal). MSVC will always import by ordinal if it finds one in the def file, which would break apps on different versions of Windows if applied to the wrong functions. svn path=/trunk/; revision=63664 --- reactos/tools/spec2def/spec2def.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/tools/spec2def/spec2def.c b/reactos/tools/spec2def/spec2def.c index 1d11a97df41..2b796937a57 100644 --- a/reactos/tools/spec2def/spec2def.c +++ b/reactos/tools/spec2def/spec2def.c @@ -569,7 +569,9 @@ ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine) else { exp.nOrdinal = atol(pc); - exp.uFlags |= FL_ORDINAL; + /* The import lib should contain the ordinal only if -ordinal was specified */ + if (!gbImportLib) + exp.uFlags |= FL_ORDINAL; } /* Go to next token (type) */