stubbed powrprof.dll

Mike McCormack mike at codeweavers.com
Sat Apr 9 23:29:40 CDT 2005


Hi Benjamin,

Benjamin Cutler wrote:

> Better patch, plus I messed up one function name (leave it to MS to
> break their own convention in their own library).

Generally looks good.  I'd advise you to try get the header 
modifications in first in a seperate patch, then send a different patch 
for the implementation of the DLL.

I'll add some comments:

> --- wine/configure	2005-04-09 21:33:30.000000000 -0600
> +++ wine.new/configure	2005-04-09 21:32:53.000000000 -0600

You don't need to diff configure, only configure.ac

> diff -urN wine/dlls/Makefile.in wine.new/dlls/Makefile.in

You can probably omit dlls/Makefile.in too, as it is also automatically 
generated (by make_dlls).

> diff -urN wine/include/powrprof.h wine.new/include/powrprof.h
> --- wine/include/powrprof.h	1969-12-31 17:00:00.000000000 -0700
> +++ wine.new/include/powrprof.h	2005-04-09 20:07:39.000000000 -0600

> +#ifndef _POWRPROF_H
> +#define _POWRPROF_H 1

Most of the Wine headers use the prefix __WINE_ -> __WINE_POWRPROF_H

> +#include <stdarg.h>
> +
> +#include "windef.h"
> +#include "winbase.h"
> +#include "winnt.h"
> +#include "winreg.h"
> +#include "winternl.h"

Don't include other headers in your header unless the Windows Platform 
SDK does it (it doesn't in this case).  We would like the header 
dependencies to be the same as the Platform SDK, so programs can compile 
the same way.

> +/* Constants needed by various functions */
> +
> +/* Used by SYSTEM_POWER_LEVEL structures */
> +
> +#define DISCHARGE_POLICY_CRITICAL 	0	/* When battery hits critical threshold */
> +#define DISCHARGE_POLICY_LOW		1	/* When battery hits low threshold */

These are defined in winnt.h. You need to patch that, not add it to your 
new file.  You shouldn't add comments for all these things unless 
there's some trick to them.

> +/* FIXME: These enums belong in winnt.h */

Yes.  Is there any reason you didn't fix it?

So have a go at patching all the headers first, and then after the 
header patches are accepted, try submitting the dll implementation. 
Smaller patches are easier to get accepted.

Mike




More information about the wine-devel mailing list