Author: hpoussin Date: Fri Feb 8 22:27:32 2008 New Revision: 32227
URL: http://svn.reactos.org/svn/reactos?rev=32227&view=rev Log: Do not emit __wine_spec_unimplemented_stub() function if not needed
Modified: trunk/reactos/tools/winebuild/spec32.c
Modified: trunk/reactos/tools/winebuild/spec32.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/spec32.c?re... ============================================================================== --- trunk/reactos/tools/winebuild/spec32.c (original) +++ trunk/reactos/tools/winebuild/spec32.c Fri Feb 8 22:27:32 2008 @@ -648,10 +648,25 @@ */ void BuildPedllFile( DLLSPEC *spec ) { - int nr_exports; - - nr_exports = spec->base <= spec->limit ? spec->limit - spec->base + 1 : 0; + int i, has_stubs = 0; + output_standard_file_header(); + + for (i = 0; i < spec->nb_entry_points; i++) + { + const ORDDEF *odp = &spec->entry_points[i]; + if (odp->type == TYPE_STUB) + { + has_stubs = 1; + break; + } + } + + if (!has_stubs) + { + output( "/* This file is intentionally left blank */\n"); + return; + }
output( "#include <stdarg.h>\n"); output( "#include "windef.h"\n"); @@ -670,10 +685,6 @@
output( "static const char __wine_spec_file_name[] = "%s";\n\n", spec->file_name );
- if (nr_exports) - { - /* Output the stub functions */ - - output_stub_funcs( spec ); - } -} + /* Output the stub functions */ + output_stub_funcs( spec ); +}