winebuild: Print a warning when failing to import a data export.
This commit is contained in:
parent
ad9396302d
commit
32fc1acb1c
|
@ -254,19 +254,13 @@ static int read_import_lib( struct import *imp )
|
||||||
nb_delayed++;
|
nb_delayed++;
|
||||||
}
|
}
|
||||||
|
|
||||||
imp->exports = xmalloc( spec->nb_entry_points * sizeof(*imp->exports) );
|
if (spec->nb_entry_points)
|
||||||
|
|
||||||
for (i = 0; i < spec->nb_entry_points; i++)
|
|
||||||
{
|
{
|
||||||
ORDDEF *odp = &spec->entry_points[i];
|
imp->exports = xmalloc( spec->nb_entry_points * sizeof(*imp->exports) );
|
||||||
|
for (i = 0; i < spec->nb_entry_points; i++)
|
||||||
if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL) continue;
|
imp->exports[imp->nb_exports++] = &spec->entry_points[i];
|
||||||
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)
|
|
||||||
qsort( imp->exports, imp->nb_exports, sizeof(*imp->exports), func_cmp );
|
qsort( imp->exports, imp->nb_exports, sizeof(*imp->exports), func_cmp );
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -614,15 +608,22 @@ int resolve_imports( DLLSPEC *spec )
|
||||||
odp = find_export( undef_symbols.names[j], imp->exports, imp->nb_exports );
|
odp = find_export( undef_symbols.names[j], imp->exports, imp->nb_exports );
|
||||||
if (odp)
|
if (odp)
|
||||||
{
|
{
|
||||||
add_import_func( imp, odp );
|
if (odp->flags & FLAG_PRIVATE) continue;
|
||||||
remove_name( &undef_symbols, j-- );
|
if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL)
|
||||||
removed++;
|
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 ))
|
if (!removed && check_unused( imp, spec ))
|
||||||
{
|
{
|
||||||
/* the dll is not used, get rid of it */
|
/* 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 );
|
remove_import_dll( i );
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue