Alexandre Julliard : winebuild: Print a warning when failing to import a data export.
Alexandre Julliard
julliard at winehq.org
Fri Dec 7 11:01:47 CST 2007
Module: wine
Branch: master
Commit: 32fc1acb1c26adc200d45df074459c1ba6126bb9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=32fc1acb1c26adc200d45df074459c1ba6126bb9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 6 21:14:07 2007 +0100
winebuild: Print a warning when failing to import a data export.
---
tools/winebuild/import.c | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 1e9cfe3..4487921 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -254,19 +254,13 @@ static int read_import_lib( struct import *imp )
nb_delayed++;
}
- imp->exports = xmalloc( spec->nb_entry_points * sizeof(*imp->exports) );
-
- for (i = 0; i < spec->nb_entry_points; i++)
+ if (spec->nb_entry_points)
{
- ORDDEF *odp = &spec->entry_points[i];
-
- if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL) continue;
- if (odp->flags & FLAG_PRIVATE) continue;
- imp->exports[imp->nb_exports++] = odp;
- }
- imp->exports = xrealloc( imp->exports, imp->nb_exports * sizeof(*imp->exports) );
- if (imp->nb_exports)
+ imp->exports = xmalloc( spec->nb_entry_points * sizeof(*imp->exports) );
+ for (i = 0; i < spec->nb_entry_points; i++)
+ imp->exports[imp->nb_exports++] = &spec->entry_points[i];
qsort( imp->exports, imp->nb_exports, sizeof(*imp->exports), func_cmp );
+ }
return 1;
}
@@ -614,15 +608,22 @@ int resolve_imports( DLLSPEC *spec )
odp = find_export( undef_symbols.names[j], imp->exports, imp->nb_exports );
if (odp)
{
- add_import_func( imp, odp );
- remove_name( &undef_symbols, j-- );
- removed++;
+ if (odp->flags & FLAG_PRIVATE) continue;
+ if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL)
+ warning( "winebuild: Data export '%s' cannot be imported from %s\n",
+ odp->link_name, imp->spec->file_name );
+ else
+ {
+ add_import_func( imp, odp );
+ remove_name( &undef_symbols, j-- );
+ removed++;
+ }
}
}
if (!removed && check_unused( imp, spec ))
{
/* the dll is not used, get rid of it */
- warning( "%s imported but no symbols used\n", imp->spec->file_name );
+ warning( "winebuild: %s imported but no symbols used\n", imp->spec->file_name );
remove_import_dll( i );
i--;
}
More information about the wine-cvs
mailing list