Patch - Make a broken winedump build on MINGW

Steven Edwards Steven_Ed4153 at
Fri May 31 12:18:13 CDT 2002

I played around with doing this right and Using MapViewOfFile or
CreateFileMapping but decided its not really worth it as there are
better PE dumping utils for Win32. Instead we silently break winedump on
Windows platforms untill someone wants to come up with a better
solution. If this patch is rejected I'll submit a patch to the to not build at all on Windows.

Changelog: Silent breakage of winedump to fix builds on Windows


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

cvs diff -u pe.c 
Index: pe.c
RCS file: /home/wine/wine/tools/winedump/pe.c,v
retrieving revision 1.11
diff -u -r1.11 pe.c
--- pe.c	16 May 2002 18:29:11 -0000	1.11
+++ pe.c	31 May 2002 17:15:44 -0000
@@ -822,7 +822,9 @@
     if (fstat(fd, &s) < 0) fatal("Can't get size");
     total_len = s.st_size;
+#ifndef _WINDOWS
     base = mmap(NULL, total_len, PROT_READ, MAP_PRIVATE, fd, 0);
     if (base == (void*)-1) fatal("Can't map file");
     effective_sig = check_headers();
@@ -856,9 +858,10 @@
     if (ret) printf("Done dumping %s\n", name);
+#ifndef _WINDOWS
     munmap(base, total_len);
     return ret;

More information about the wine-patches mailing list