diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index e9ef52bf1e8..49473c7683a 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -308,7 +308,7 @@ extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva ); extern void output_spec32_file( DLLSPEC *spec ); extern void output_pe_module( DLLSPEC *spec ); extern void output_fake_module( DLLSPEC *spec ); -extern void output_def_file( DLLSPEC *spec, int include_private ); +extern void output_def_file( DLLSPEC *spec, int include_stubs ); extern void load_res16_file( const char *name, DLLSPEC *spec ); extern void output_res16_data( DLLSPEC *spec ); extern void output_bin_res16_data( DLLSPEC *spec ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index b4512f6c03f..04af2918c99 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -934,7 +934,7 @@ void output_fake_module( DLLSPEC *spec ) * * Build a Win32 def file from a spec file. */ -void output_def_file( DLLSPEC *spec, int include_private ) +void output_def_file( DLLSPEC *spec, int include_stubs ) { DLLSPEC *spec32 = NULL; const char *name; @@ -961,16 +961,14 @@ void output_def_file( DLLSPEC *spec, int include_private ) for (i = total = 0; i < spec->nb_entry_points; i++) { const ORDDEF *odp = &spec->entry_points[i]; - int is_data = 0; + int is_data = 0, is_private = odp->flags & FLAG_PRIVATE; if (odp->name) name = odp->name; else if (odp->export_name) name = odp->export_name; else continue; - if (!(odp->flags & FLAG_PRIVATE)) total++; - else if (!include_private) continue; - - if (odp->type == TYPE_STUB) continue; + if (!is_private) total++; + if (!include_stubs && odp->type == TYPE_STUB) continue; output( " %s", name ); @@ -995,13 +993,17 @@ void output_def_file( DLLSPEC *spec, int include_private ) output( "=%s", get_link_name( odp )); break; } + case TYPE_STUB: + if (!kill_at && target_cpu == CPU_x86) output( "@%d", get_args_size( odp )); + is_private = 1; + break; default: assert(0); } output( " @%d", odp->ordinal ); if (!odp->name || (odp->flags & FLAG_ORDINAL)) output( " NONAME" ); if (is_data) output( " DATA" ); - if (odp->flags & FLAG_PRIVATE) output( " PRIVATE" ); + if (is_private) output( " PRIVATE" ); output( "\n" ); } if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name );