RFC - patch for psapi and missing imports on Mingw target

Steven Edwards Steven_Ed4153 at yahoo.com
Wed May 29 00:37:37 CDT 2002

This kind of a dirty hack but just a idea and it shouldn't have a effect
on cygwin as it will use the win32api package also. Mabey a better name
then MINGW_IMPORTS can be used.

This patch allows psapi.dll to be (almost) built. Mingws libkernel32.a
doesn't contain the import information for the toolhelp APIs. Instead it
models Visual Studio 6 and implents them in libth32.a. Does anyone know
if this has changed in Visual Studio .NET? If so then I will submit a
patch to mingw for the Win32api. If not, then I belive using libth32.a
is the most proper way. 

Would a better solution be for me to make the make implib rule and just
use wines libkernel32.a? I havent really looked at doing it because
NTDLL, MSVCRT,GDI,USER and KERNEL32 are not targets of my port and may
contain exports lacking on a Windows host.

The only bug after this patch is -
psapi_main.o(.text+0x1248):psapi_main.c: undefined reference to


"Every revolution was once a thought in one man's mind"
- Ralph Waldo Emerson 

cvs diff -u Makedll.rules.in 
Index: Makedll.rules.in
RCS file: /home/wine/wine/dlls/Makedll.rules.in,v
retrieving revision 1.27
diff -u -r1.27 Makedll.rules.in
--- Makedll.rules.in	22 May 2002 21:32:49 -0000	1.27
+++ Makedll.rules.in	29 May 2002 05:32:10 -0000
@@ -35,7 +35,7 @@
 # Rules for .dll files
 $(MODULE): $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in
-	$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib
$(MODULE:.dll=.a) -o $@ $(OBJS) $(MODULE).dbg.o -L$(DLLDIR)
+	$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib
$(MODULE:.dll=.a) -o $@ $(OBJS) $(MODULE).dbg.o -L$(DLLDIR)

cvs diff -u Makefile.in 
Index: Makefile.in
RCS file: /home/wine/wine/dlls/psapi/Makefile.in,v
retrieving revision 1.11
diff -u -r1.11 Makefile.in
--- Makefile.in	11 May 2002 23:06:34 -0000	1.11
+++ Makefile.in	29 May 2002 05:33:48 -0000
@@ -4,6 +4,7 @@
 VPATH     = @srcdir@
 MODULE    = psapi.dll
 IMPORTS   = kernel32 ntdll

More information about the wine-patches mailing list