[SPEC2DEF]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 29 Jun 2014 11:32:49 +0000 (11:32 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 29 Jun 2014 11:32:49 +0000 (11:32 +0000)
- 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

index 1d11a97..2b79693 100644 (file)
@@ -569,7 +569,9 @@ ParseFile(char* pcStart, FILE *fileDest, PFNOUTLINE OutputLine)
         else
         {
             exp.nOrdinal = atol(pc);
         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) */
         }
 
         /* Go to next token (type) */