Make winedump compilable by MSVC

Dmitry Timoshkov dmitry at baikal.ru
Wed Aug 21 22:46:52 CDT 2002


Hello.

Changelog:
    Make winedump compilable by MSVC.

-- 
Dmitry.


-------------- next part --------------
diff -u cvs/hq/wine/tools/winedump/main.c wine/tools/winedump/main.c
--- cvs/hq/wine/tools/winedump/main.c	Sun Jun 02 08:28:34 2002
+++ wine/tools/winedump/main.c	Thu Aug 22 03:35:18 2002
@@ -17,8 +17,10 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "winedump.h"
 
+#include "config.h"
+
+#include "winedump.h"
 
 _globals globals; /* All global variables */
 
diff -u cvs/hq/wine/tools/winedump/misc.c wine/tools/winedump/misc.c
--- cvs/hq/wine/tools/winedump/misc.c	Fri May 10 07:15:58 2002
+++ wine/tools/winedump/misc.c	Thu Aug 22 03:31:34 2002
@@ -224,5 +224,4 @@
     perror (message);
   else
     puts (message);
-  do_usage ();
 }
diff -u cvs/hq/wine/tools/winedump/pe.c wine/tools/winedump/pe.c
--- cvs/hq/wine/tools/winedump/pe.c	Tue Aug 20 02:20:04 2002
+++ wine/tools/winedump/pe.c	Thu Aug 22 03:05:26 2002
@@ -42,6 +42,10 @@
 #include "winedump.h"
 #include "pe.h"
 
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
 static void*			base;
 static unsigned long		total_len;
 static IMAGE_NT_HEADERS*	nt_headers;
@@ -649,7 +653,7 @@
 
 static void dump_data( const unsigned char *ptr, unsigned int size, const char *prefix )
 {
-    int i, j;
+    unsigned int i, j;
 
     printf( "%s", prefix );
     for (i = 0; i < size; i++)
@@ -822,7 +826,7 @@
 
     setbuf(stdout, NULL);
 
-    fd = open(name, O_RDONLY);
+    fd = open(name, O_RDONLY | O_BINARY);
     if (fd == -1) fatal("Can't open file");
 
     if (fstat(fd, &s) < 0) fatal("Can't get size");


More information about the wine-patches mailing list