Index: bootstrap.sh
===================================================================
RCS file: /cvs/cygwin-apps/setup/bootstrap.sh,v
retrieving revision 2.6
diff -u -p -r2.6 bootstrap.sh
--- bootstrap.sh	24 Feb 2012 20:21:42 -0000	2.6
+++ bootstrap.sh	1 Jun 2012 07:12:48 -0000
@@ -50,7 +50,7 @@ fi
 cd "$builddir"
 
 build=`$srcdir/cfgaux/config.guess`
-host="i686-pc-mingw32"
+host="i686-w64-mingw32"
 
 if hash $host-g++ 2> /dev/null; then
 	CC="$host-gcc"
Index: filemanip.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/filemanip.h,v
retrieving revision 1.15
diff -u -p -r1.15 filemanip.h
--- filemanip.h	11 May 2009 10:49:15 -0000	1.15
+++ filemanip.h	1 Jun 2012 07:12:48 -0000
@@ -16,6 +16,7 @@
 #ifndef SETUP_FILEMANIP_H
 #define SETUP_FILEMANIP_H
 
+#include <sys/types.h>
 #include <string>
 
 extern int find_tar_ext (const char *path);
Index: gpg-packet.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/gpg-packet.cc,v
retrieving revision 2.1
diff -u -p -r2.1 gpg-packet.cc
--- gpg-packet.cc	22 Jun 2008 02:37:16 -0000	2.1
+++ gpg-packet.cc	1 Jun 2012 07:12:48 -0000
@@ -42,7 +42,9 @@ static const char *cvsid =
 #define MESSAGE while (0) msg
 #endif /* CRYPTODEBUGGING */
 
+#ifndef ARRAYSIZE
 #define ARRAYSIZE(_ar) (sizeof (_ar) / sizeof (_ar[0]))
+#endif
 
 static const struct { char from; char to; } RFC4880HashCodesToGPGHashCodes[] =
 {
Index: propsheet.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/propsheet.cc,v
retrieving revision 2.17
diff -u -p -r2.17 propsheet.cc
--- propsheet.cc	10 Nov 2010 20:25:27 -0000	2.17
+++ propsheet.cc	1 Jun 2012 07:12:48 -0000
@@ -37,7 +37,10 @@ typedef struct _DllVersionInfo
 }
 DLLVERSIONINFO;
 typedef HRESULT CALLBACK (*DLLGETVERSIONPROC) (DLLVERSIONINFO * pdvi);
+
+#ifndef PROPSHEETHEADER_V1_SIZE
 #define PROPSHEETHEADER_V1_SIZE 40
+#endif
 
 // Sort of a "hidden" Windows structure.  Used in the PropSheetCallback.
 #include <pshpack1.h>
Index: win32.h
===================================================================
RCS file: /cvs/cygwin-apps/setup/win32.h,v
retrieving revision 2.27
diff -u -p -r2.27 win32.h
--- win32.h	8 Mar 2012 09:20:03 -0000	2.27
+++ win32.h	1 Jun 2012 07:12:48 -0000
@@ -17,6 +17,7 @@
 #ifndef SETUP_WIN32_H
 #define SETUP_WIN32_H
 
+#include <sys/types.h>
 #include <string>
 
 /* Any include of <windows.h> should be through this file, which wraps it in
@@ -42,11 +43,14 @@
  * multiple declaration errors at link time. This define turns that off again.
  * It will default to off again in later w32api versions, but we need to work
  * with 3.1 for now. */
+#undef WINBASEAPI
 #define WINBASEAPI
 
 /* Require at least Internet Explorer 3, in order to have access to
  * sufficient Windows Common Controls features from <commctrl.h> . */
+#ifndef _WIN32_IE
 #define _WIN32_IE 0x0300
+#endif
 
 #include <windows.h>
 
