diff --git a/if1632/builtin.c b/if1632/builtin.c index 0efda2de0e7..4e495c8f5e0 100644 --- a/if1632/builtin.c +++ b/if1632/builtin.c @@ -12,7 +12,6 @@ #include "wine/winbase16.h" #include "wine/winestring.h" #include "builtin16.h" -#include "builtin32.h" #include "global.h" #include "heap.h" #include "module.h" diff --git a/include/builtin32.h b/include/builtin32.h index fc42f48be78..7df211155d6 100644 --- a/include/builtin32.h +++ b/include/builtin32.h @@ -7,6 +7,7 @@ #ifndef __WINE_BUILTIN32_H #define __WINE_BUILTIN32_H +/* Warning: this must match the definition in tools/winebuild/spec32.c */ typedef struct { const char* filename; /* DLL file name */ @@ -21,7 +22,6 @@ typedef struct } BUILTIN32_DESCRIPTOR; extern void BUILTIN32_RegisterDLL( const BUILTIN32_DESCRIPTOR *descr ); -extern void BUILTIN32_Unimplemented( const char *dllname, const char *funcname ); extern void RELAY_SetupDLL( const char *module ); #endif /* __WINE_BUILTIN32_H */ diff --git a/relay32/relay386.c b/relay32/relay386.c index d764d86fb28..7da06f15d4a 100644 --- a/relay32/relay386.c +++ b/relay32/relay386.c @@ -9,7 +9,6 @@ #include #include #include "winnt.h" -#include "builtin32.h" #include "selectors.h" #include "stackframe.h" #include "syslevel.h" diff --git a/relay32/snoop.c b/relay32/snoop.c index d87ae070e3e..fbbb2d4272d 100644 --- a/relay32/snoop.c +++ b/relay32/snoop.c @@ -12,7 +12,6 @@ #include "winbase.h" #include "winnt.h" #include "heap.h" -#include "builtin32.h" #include "snoop.h" #include "neexe.h" #include "selectors.h" diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 383cb0eb55b..e01d1749274 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -288,7 +288,7 @@ void BuildSpec32File( FILE *outfile ) fprintf( outfile, "/* File generated automatically from %s; do not edit! */\n\n", input_file_name ); - fprintf( outfile, "#include \"builtin32.h\"\n\n" ); + fprintf( outfile, "extern void BUILTIN32_Unimplemented( const char *dllname, const char *funcname );\n\n" ); /* Reserve some space for the PE header */ @@ -439,7 +439,18 @@ void BuildSpec32File( FILE *outfile ) if (rsrc_name[0]) fprintf( outfile, "extern char %s[];\n\n", rsrc_name ); - fprintf( outfile, "static const BUILTIN32_DESCRIPTOR descriptor =\n{\n" ); + /* Warning: this must match the definition in builtin32.h */ + fprintf( outfile, "static const struct dll_descriptor\n{\n" ); + fprintf( outfile, " const char* filename;\n" ); + fprintf( outfile, " int nb_imports;\n" ); + fprintf( outfile, " void *pe_header;\n" ); + fprintf( outfile, " void *exports;\n" ); + fprintf( outfile, " unsigned int exports_size;\n" ); + fprintf( outfile, " const char * const *imports;\n" ); + fprintf( outfile, " void (*dllentrypoint)();\n" ); + fprintf( outfile, " int characteristics;\n" ); + fprintf( outfile, " void *rsrc;\n" ); + fprintf( outfile, "} descriptor = {\n" ); fprintf( outfile, " \"%s\",\n", DLLFileName ); fprintf( outfile, " %d,\n", nb_imports ); fprintf( outfile, " pe_header,\n" ); @@ -462,6 +473,7 @@ void BuildSpec32File( FILE *outfile ) fprintf( outfile, " \"\\t.previous\\n\");\n" ); fprintf( outfile, "}\n" ); fprintf( outfile, "#endif /* defined(__GNUC__) */\n" ); - fprintf( outfile, "static void %s_init(void) { BUILTIN32_RegisterDLL( &descriptor ); }\n", - DLLName ); + fprintf( outfile, "static void %s_init(void)\n{\n", DLLName ); + fprintf( outfile, " extern void BUILTIN32_RegisterDLL( const struct dll_descriptor * );\n" ); + fprintf( outfile, " BUILTIN32_RegisterDLL( &descriptor );\n}\n" ); }