Commit 6d856782 authored by Alexandre Julliard's avatar Alexandre Julliard

Print a warning when a generated import library doesn't export

anything useful.
parent 52b5842f
...@@ -837,7 +837,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec ) ...@@ -837,7 +837,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
void BuildDef32File( FILE *outfile, DLLSPEC *spec ) void BuildDef32File( FILE *outfile, DLLSPEC *spec )
{ {
const char *name; const char *name;
int i; int i, total;
if (spec_file_name) if (spec_file_name)
fprintf( outfile, "; File generated automatically from %s; do not edit!\n\n", fprintf( outfile, "; File generated automatically from %s; do not edit!\n\n",
...@@ -851,18 +851,21 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec ) ...@@ -851,18 +851,21 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec )
/* Output the exports and relay entry points */ /* Output the exports and relay entry points */
for(i = 0; i < spec->nb_entry_points; i++) for (i = total = 0; i < spec->nb_entry_points; i++)
{ {
const ORDDEF *odp = &spec->entry_points[i]; const ORDDEF *odp = &spec->entry_points[i];
int is_data = 0; int is_data = 0;
if (!odp) continue; if (!odp) continue;
if (odp->type == TYPE_STUB) continue;
if (odp->name) name = odp->name; if (odp->name) name = odp->name;
else if (odp->export_name) name = odp->export_name; else if (odp->export_name) name = odp->export_name;
else continue; else continue;
if (!(odp->flags & FLAG_PRIVATE)) total++;
if (odp->type == TYPE_STUB) continue;
fprintf(outfile, " %s", name); fprintf(outfile, " %s", name);
switch(odp->type) switch(odp->type)
...@@ -900,6 +903,7 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec ) ...@@ -900,6 +903,7 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec )
if (odp->flags & FLAG_PRIVATE) fprintf( outfile, " PRIVATE" ); if (odp->flags & FLAG_PRIVATE) fprintf( outfile, " PRIVATE" );
fprintf( outfile, "\n" ); fprintf( outfile, "\n" );
} }
if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment