[PATCH] winebuild: Don't output private entries when generating a .def file.

Dmitry Timoshkov dmitry at baikal.ru
Tue Apr 9 23:16:32 CDT 2019


This patch in particular fixes 32-bit build where a slightly old ming32-dlltool
chokes on krn386.exe16.ApiName entries. These are marked as PRIVATE anyway, so
they won't appear in the generated import library.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 tools/winebuild/spec32.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 04af2918c9..47be8af303 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -961,13 +961,15 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
     for (i = total = 0; i < spec->nb_entry_points; i++)
     {
         const ORDDEF *odp = &spec->entry_points[i];
-        int is_data = 0, is_private = odp->flags & FLAG_PRIVATE;
+        int is_data = 0, is_stub = 0;
+
+        if (odp->flags & FLAG_PRIVATE) continue;
 
         if (odp->name) name = odp->name;
         else if (odp->export_name) name = odp->export_name;
         else continue;
 
-        if (!is_private) total++;
+        total++;
         if (!include_stubs && odp->type == TYPE_STUB) continue;
 
         output( "  %s", name );
@@ -995,7 +997,7 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
         }
         case TYPE_STUB:
             if (!kill_at && target_cpu == CPU_x86) output( "@%d", get_args_size( odp ));
-            is_private = 1;
+            is_stub = 1;
             break;
         default:
             assert(0);
@@ -1003,7 +1005,7 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
         output( " @%d", odp->ordinal );
         if (!odp->name || (odp->flags & FLAG_ORDINAL)) output( " NONAME" );
         if (is_data) output( " DATA" );
-        if (is_private) output( " PRIVATE" );
+        if (is_stub) output( " PRIVATE" );
         output( "\n" );
     }
     if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name );
-- 
2.20.1




More information about the wine-devel mailing list