From 9c708060d3e4377e423aed57d33e53a1996e008d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 29 Aug 2005 10:50:26 +0000 Subject: [PATCH] Use __wine_unimplemented_stub from crt0 for 16-bit spec files too. --- tools/winebuild/spec16.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c index 04378e6bbc2..b978a791ec1 100644 --- a/tools/winebuild/spec16.c +++ b/tools/winebuild/spec16.c @@ -363,15 +363,10 @@ static void output_stub_funcs( FILE *outfile, const DLLSPEC *spec ) ORDDEF *odp = spec->ordinals[i]; if (!odp || odp->type != TYPE_STUB) continue; fprintf( outfile, "#ifdef __GNUC__\n" ); - fprintf( outfile, "static void __wine_unimplemented( const char *func ) __attribute__((noreturn));\n" ); - fprintf( outfile, "#endif\n" ); - fprintf( outfile, "static void __wine_unimplemented( const char *func )\n{\n" ); - fprintf( outfile, " extern void __stdcall RaiseException( unsigned int, unsigned int, unsigned int, const void ** );\n" ); - fprintf( outfile, " const void *args[2];\n" ); - fprintf( outfile, " args[0] = \"%s\";\n", spec->file_name ); - fprintf( outfile, " args[1] = func;\n" ); - fprintf( outfile, " for (;;) RaiseException( 0x%08x, %d, 2, args );\n}\n\n", - EXCEPTION_WINE_STUB, EH_NONCONTINUABLE ); + fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" ); + fprintf( outfile, "#else\n" ); + fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func );\n" ); + fprintf( outfile, "#endif\n\n" ); break; } for (i = 0; i <= spec->limit; i++) @@ -382,7 +377,7 @@ static void output_stub_funcs( FILE *outfile, const DLLSPEC *spec ) strcpy( odp->link_name, "__wine_stub_" ); strcat( odp->link_name, odp->name ); for (p = odp->link_name; *p; p++) if (!isalnum(*p)) *p = '_'; - fprintf( outfile, "static void %s(void) { __wine_unimplemented(\"%s\"); }\n", + fprintf( outfile, "static void %s(void) { __wine_spec_unimplemented_stub(__wine_spec16_file_name, \"%s\"); }\n", odp->link_name, odp->name ); } } @@ -414,6 +409,7 @@ void BuildSpec16File( FILE *outfile, DLLSPEC *spec ) /* File header */ output_file_header( outfile ); + fprintf( outfile, "static const char __wine_spec16_file_name[] = \"%s\";\n", spec->file_name ); fprintf( outfile, "extern unsigned short __wine_call_from_16_word();\n" ); fprintf( outfile, "extern unsigned int __wine_call_from_16_long();\n" ); fprintf( outfile, "extern void __wine_call_from_16_regs();\n" );