Jacek Caban : winebuild: Don't include aliases in importlib .def files.
Alexandre Julliard
julliard at winehq.org
Mon Aug 26 15:47:27 CDT 2019
Module: wine
Branch: master
Commit: dd1a83c20a84f581bc36768669ccb4a7417fb418
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dd1a83c20a84f581bc36768669ccb4a7417fb418
Author: Jacek Caban <jacek at codeweavers.com>
Date: Sun Aug 25 18:49:23 2019 +0200
winebuild: Don't include aliases in importlib .def files.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winebuild/build.h | 2 +-
tools/winebuild/import.c | 2 +-
tools/winebuild/main.c | 2 +-
tools/winebuild/spec32.c | 7 ++++---
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 43a0dd2..bde322c 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -310,7 +310,7 @@ extern void output_resources( DLLSPEC *spec );
extern void output_bin_resources( DLLSPEC *spec, unsigned int start_rva );
extern void output_spec32_file( DLLSPEC *spec );
extern void output_fake_module( DLLSPEC *spec );
-extern void output_def_file( DLLSPEC *spec, int include_stubs );
+extern void output_def_file( DLLSPEC *spec, int import_only );
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/import.c b/tools/winebuild/import.c
index 7d3c725..e2688a0 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1452,7 +1452,7 @@ static void build_windows_import_lib( DLLSPEC *spec )
const char *as_flags, *m_flag;
def_file = open_temp_output_file( ".def" );
- output_def_file( spec, 0 );
+ output_def_file( spec, 1 );
fclose( output_file );
args = find_tool( "dlltool", NULL );
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 0a5becd..7d54395 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -664,7 +664,7 @@ int main(int argc, char **argv)
if (!spec_file_name) fatal_error( "missing .spec file\n" );
if (!parse_input_file( spec )) break;
open_output_file();
- output_def_file( spec, 1 );
+ output_def_file( spec, 0 );
close_output_file();
break;
case MODE_IMPLIB:
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 855e6d8..f2567e8 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -983,7 +983,7 @@ void output_fake_module( DLLSPEC *spec )
*
* Build a Win32 def file from a spec file.
*/
-void output_def_file( DLLSPEC *spec, int include_stubs )
+void output_def_file( DLLSPEC *spec, int import_only )
{
DLLSPEC *spec32 = NULL;
const char *name;
@@ -1017,7 +1017,7 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
else continue;
if (!is_private) total++;
- if (!include_stubs && odp->type == TYPE_STUB) continue;
+ if (import_only && odp->type == TYPE_STUB) continue;
if ((odp->flags & FLAG_FASTCALL) && target_platform == PLATFORM_WINDOWS)
name = strmake( "@%s", name );
@@ -1032,13 +1032,14 @@ void output_def_file( DLLSPEC *spec, int include_stubs )
case TYPE_VARARGS:
case TYPE_CDECL:
/* try to reduce output */
- if(strcmp(name, odp->link_name) || (odp->flags & FLAG_FORWARD))
+ if(!import_only && (strcmp(name, odp->link_name) || (odp->flags & FLAG_FORWARD)))
output( "=%s", odp->link_name );
break;
case TYPE_STDCALL:
{
int at_param = get_args_size( odp );
if (!kill_at && target_cpu == CPU_x86) output( "@%d", at_param );
+ if (import_only) break;
if (odp->flags & FLAG_FORWARD)
output( "=%s", odp->link_name );
else if (strcmp(name, odp->link_name)) /* try to reduce output */
More information about the wine-cvs
mailing list