From cb613f511137397d1023fd40eae4e539640377eb Mon Sep 17 00:00:00 2001 From: Jon Griffiths Date: Tue, 22 Feb 2005 14:52:35 +0000 Subject: [PATCH] Use config.h & HAVE_ where needed, -W fixes. --- programs/winedbg/dbg.y | 4 +++- tools/winedump/emf.c | 24 +++++++++++++++--------- tools/winedump/lnk.c | 12 +++++++++--- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y index b9cba6ce51..388295af7f 100644 --- a/programs/winedbg/dbg.y +++ b/programs/winedbg/dbg.y @@ -26,7 +26,9 @@ #include #include -#include +#ifdef HAVE_UNISTD_H +# include +#endif #include "wine/exception.h" #include "debugger.h" diff --git a/tools/winedump/emf.c b/tools/winedump/emf.c index a682a71a19..a418ae830d 100644 --- a/tools/winedump/emf.c +++ b/tools/winedump/emf.c @@ -18,10 +18,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" +#include "wine/port.h" + #include -#include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include #include @@ -31,7 +37,7 @@ static unsigned int read_int(unsigned char *buffer) { - return buffer[0] + return buffer[0] + (buffer[1]<<8) + (buffer[2]<<16) + (buffer[3]<<24); @@ -42,15 +48,15 @@ static unsigned int read_int(unsigned char *buffer) static int dump_emfrecord(int fd) { unsigned char buffer[8]; - int r,i; - unsigned int type, length; + int r; + unsigned int type, length, i; r = read(fd, buffer, 8); if(r!=8) return -1; - type = read_int(buffer); - length = read_int(buffer+4); + type = read_int(buffer); + length = read_int(buffer+4); switch(type) { @@ -97,7 +103,7 @@ static int dump_emfrecord(int fd) r = read(fd,buffer,4); if(r!=4) return -1; - printf("%08x ", read_int(buffer)); + printf("%08x ", read_int(buffer)); if ( (i%16 == 12) || ((i+4)==length) ) printf("\n"); } diff --git a/tools/winedump/lnk.c b/tools/winedump/lnk.c index 20214b841d..f8909ffc4c 100644 --- a/tools/winedump/lnk.c +++ b/tools/winedump/lnk.c @@ -18,11 +18,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" +#include "wine/port.h" + #include #include -#include -#include -#include +#ifdef HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif #include #include -- 2.32.0.93.g670b81a890