add proper support for native NT drivers and programs to the build system

Alexandre Julliard julliard at winehq.org
Tue Sep 6 08:40:02 CDT 2005


Ivan Leo Puoti <ivanleo at gmail.com> writes:

> @@ -469,8 +469,10 @@
>  /* get the default entry point for a given spec file */
>  static const char *get_default_entry_point( const DLLSPEC *spec )
>  {
> +    if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE && spec->characteristics & IMAGE_FILE_DLL)
> +        return "__wine_spec_drv_entry";
> +    if (spec->subsystem == IMAGE_SUBSYSTEM_NATIVE) return "__wine_spec_exe_nentry";

Native drivers are not supposed to be dlls.

> @@ -322,9 +322,15 @@
>          ORDDEF *odp = &spec->entry_points[i];
>          if (odp->type != TYPE_STUB) continue;
>          fprintf( outfile, "#ifdef __GNUC__\n" );
> -        fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" );
> +        if(spec->subsystem == IMAGE_SUBSYSTEM_NATIVE)
> +            fprintf( outfile, "extern void __wine_spec_nunimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" );
> +        else
> +            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" );
> +        if(spec->subsystem == IMAGE_SUBSYSTEM_NATIVE)
> +            fprintf( outfile, "extern void __wine_spec_nunimplemented_stub( const char *module, const char *func ) __attribute__((noreturn));\n" );
> +        else
> +            fprintf( outfile, "extern void __wine_spec_unimplemented_stub( const char *module, const char *func );\n" );

You should provide your own handling of stubs inside ntoskrnl, like
ntdll does.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list