From 6d8567824f5a2b81911b0b0b99b68cd931702ce8 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 26 Jul 2005 18:57:19 +0000 Subject: [PATCH] Print a warning when a generated import library doesn't export anything useful. --- tools/winebuild/spec32.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 35f2e0472b7..118290974c1 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -837,7 +837,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec ) void BuildDef32File( FILE *outfile, DLLSPEC *spec ) { const char *name; - int i; + int i, total; if (spec_file_name) fprintf( outfile, "; File generated automatically from %s; do not edit!\n\n", @@ -851,18 +851,21 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec ) /* 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]; int is_data = 0; if (!odp) continue; - if (odp->type == TYPE_STUB) continue; if (odp->name) name = odp->name; else if (odp->export_name) name = odp->export_name; else continue; + if (!(odp->flags & FLAG_PRIVATE)) total++; + + if (odp->type == TYPE_STUB) continue; + fprintf(outfile, " %s", name); switch(odp->type) @@ -900,6 +903,7 @@ void BuildDef32File( FILE *outfile, DLLSPEC *spec ) if (odp->flags & FLAG_PRIVATE) fprintf( outfile, " PRIVATE" ); fprintf( outfile, "\n" ); } + if (!total) warning( "%s: Import library doesn't export anything\n", spec->file_name ); }