From: Daniel Glassey (danglassey@ntlworld.com)
Date: Tue May 21 2002 - 14:24:02 EDT
Hi,
I've just managed to compile AbiWord with mingw (gcc for windows). 
The patches that are attached are against current stable cvs. Some of the 
changes are just quick hacks to get it to compile rather than viable changes . 
There are also some leftovers from an aborted attempt to try with cygwin using --
mno-cygwin that I need to clean up as well. So mostly it's a prrof of concept of 
what needs to be done.
 
The second part will be additional files for the build system for mingw as 
another ABI_NATIVE.
it uses current mingw and mys (not cygwin) - see www.mingw.org
Regards,
Daniel
N.B. it compiles and starts but there are a few little issues that will need ironing 
out (like not being able to enter any text except whitespace)
Index: libole2/ms-ole.c
===================================================================
RCS file: /cvsroot/wv/libole2/ms-ole.c,v
retrieving revision 1.36
diff -u -w -p -u -w -r1.36 ms-ole.c
--- libole2/ms-ole.c	28 Mar 2002 15:17:37 -0000	1.36
+++ libole2/ms-ole.c	21 May 2002 18:15:10 -0000
@@ -18,7 +18,7 @@
 #include <libole2/ms-ole.h>
 
 /* BSDs require unistd.h before including stat.h */
-#ifdef HAVE_UNISTD_H
+#if defined(HAVE_UNISTD_H) && !defined(__MINGW32__)
 #	include <unistd.h>
 #else
 #	define S_IRUSR 0000400
Index: libole2/ms-ole.h
===================================================================
RCS file: /cvsroot/wv/libole2/ms-ole.h,v
retrieving revision 1.17
diff -u -w -p -u -w -r1.17 ms-ole.h
--- libole2/ms-ole.h	23 Jan 2002 22:50:14 -0000	1.17
+++ libole2/ms-ole.h	21 May 2002 18:15:10 -0000
@@ -23,7 +23,9 @@ extern "C" {
 # include <fcntl.h>       /* for mode_t */
 #else
 # include <stdlib.h>
+#ifndef __MINGW32__
         typedef unsigned long mode_t;
+#endif
         typedef size_t ssize_t;
         typedef /* signed */ long off_t;
         typedef /* unsigned */ long caddr_t;
? src/make.exe.stackdump
? src/MINGW32_1.0.8_i386_OBJ
? src/af/ev/mingw
? src/af/gr/make.exe.stackdump
? src/af/gr/mingw
? src/af/gr/xp/uname.exe.stackdump
? src/af/util/make.exe.stackdump
? src/af/util/mingw
? src/af/xap/mingw
? src/config/make.exe.stackdump
? src/config/platforms/mingw.mk
? src/config/require/mingw
? src/config/require/xp/make.exe.stackdump
? src/hello/ap/mingw
? src/other/make.exe.stackdump
? src/text/fmt/make.exe.stackdump
? src/tools/make.exe.stackdump
? src/tools/cdump/mingw
? src/tools/cdump/xp/make.exe.stackdump
? src/wp/ap/mingw
? src/wp/impexp/mingw
? src/wp/main/make.exe.stackdump
? src/wp/main/mingw
Index: Makefile
===================================================================
RCS file: /cvsroot/abi/Makefile,v
retrieving revision 1.23
diff -u -w -p -u -w -r1.23 Makefile
Index: src/Makefile
===================================================================
RCS file: /cvsroot/abi/src/Makefile,v
retrieving revision 1.62
diff -u -w -p -u -w -r1.62 Makefile
Index: src/af/ev/win/ev_Win32Keyboard.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/ev/win/ev_Win32Keyboard.cpp,v
retrieving revision 1.29
diff -u -w -p -u -w -r1.29 ev_Win32Keyboard.cpp
--- src/af/ev/win/ev_Win32Keyboard.cpp	25 Sep 2001 21:12:21 -0000	1.29
+++ src/af/ev/win/ev_Win32Keyboard.cpp	21 May 2002 18:07:51 -0000
@@ -668,7 +668,11 @@ int ev_Win32Keyboard::_scanCodeToChars(U
                 return (*m_pToUnicodeEx)(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
         }
         else
+	#if 0
                 return ToAsciiEx(nVirtKey,wScanCode,lpKeyState,pwszBuff,0,m_hKeyboardLayout);
+	#else
+	return 0;
+	#endif
 };
 
 /*****************************************************************/
Index: src/af/gr/win/gr_Win32CharWidths.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/gr/win/gr_Win32CharWidths.cpp,v
retrieving revision 1.8
diff -u -w -p -u -w -r1.8 gr_Win32CharWidths.cpp
--- src/af/gr/win/gr_Win32CharWidths.cpp	22 Oct 2001 15:57:42 -0000	1.8
+++ src/af/gr/win/gr_Win32CharWidths.cpp	21 May 2002 18:07:55 -0000
@@ -91,7 +91,7 @@ void GR_Win32CharWidths::setCharWidthsOf
                                 SIZE Size;
                                 char str[sizeof(UT_UCSChar)];
                                 int iConverted = WideCharToMultiByte(CP_ACP, NULL, 
-					(unsigned short*) &k, 1, str, sizeof(str), NULL, NULL);
+					(WCHAR *) &k, 1, str, sizeof(str), NULL, NULL);
                                 GetTextExtentPoint32A(hdc, str, iConverted, &Size);
                                 setWidth(k,Size.cx);
                         }
Index: src/af/gr/win/gr_Win32Graphics.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/gr/win/gr_Win32Graphics.cpp,v
retrieving revision 1.83
diff -u -w -p -u -w -r1.83 gr_Win32Graphics.cpp
--- src/af/gr/win/gr_Win32Graphics.cpp	1 Apr 2002 14:46:14 -0000	1.83
+++ src/af/gr/win/gr_Win32Graphics.cpp	21 May 2002 18:07:55 -0000
@@ -280,14 +280,14 @@ void GR_Win32Graphics::drawChar(UT_UCSCh
                 // Symbol character handling for Win9x
                 char str[sizeof(UT_UCSChar)];
                 int iConverted = WideCharToMultiByte(CP_ACP, NULL, 
-			¤tChar, 1,
+			(WCHAR *) ¤tChar, 1,
                         str, sizeof(str), NULL, NULL);
                 ExtTextOutA(m_hdc, xoff, yoff, 0, NULL, str, iConverted, NULL);
         }
         else
         {
                 // Unicode font and default character set handling for WinNT and Win9x
-		ExtTextOutW(m_hdc, xoff, yoff, 0/*ETO_GLYPH_INDEX*/, NULL, ¤tChar, 1, NULL);
+		ExtTextOutW(m_hdc, xoff, yoff, 0/*ETO_GLYPH_INDEX*/, NULL, (WCHAR *) ¤tChar, 1, NULL);
         }
 }
 
@@ -321,7 +321,7 @@ void GR_Win32Graphics::drawChars(const U
                 // Symbol character handling for Win9x
                 char* str = new char[iLength * sizeof(UT_UCSChar)];
                 int iConverted = WideCharToMultiByte(CP_ACP, NULL, 
-			currentChars, iLength, 
+			(WCHAR *) currentChars, iLength,
                         str, iLength * sizeof(UT_UCSChar), NULL, NULL);
                 ExtTextOutA(m_hdc, xoff, yoff, 0, NULL, str, iConverted, NULL);
                 delete [] str;
@@ -359,7 +359,7 @@ void GR_Win32Graphics::drawChars(const U
 #ifdef BIDI_ENABLED
 simple_exttextout:
 #endif
-			ExtTextOutW(m_hdc, xoff, yoff, 0, NULL, currentChars, iLength, NULL);
+			ExtTextOutW(m_hdc, xoff, yoff, 0, NULL, (WCHAR *) currentChars, iLength, NULL);
                 }
         }
 
Index: src/af/util/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/util/Makefile,v
retrieving revision 1.74
diff -u -w -p -u -w -r1.74 Makefile
--- src/af/util/Makefile	21 Dec 2001 15:53:46 -0000	1.74
+++ src/af/util/Makefile	21 May 2002 18:07:56 -0000
@@ -57,6 +57,18 @@ PLATFORM_OBJS=	$(OBJDIR)/ut_debugmsg.$(O
                 $(OBJDIR)/ut_Xpm2Bmp.$(OBJ_SUFFIX)			
 endif
 
+ifeq ($(ABI_NATIVE), mingw)
+PLATFORM_OBJS=	$(OBJDIR)/ut_debugmsg.$(OBJ_SUFFIX)	\
+		$(OBJDIR)/ut_$(ABI_FE)OS.$(OBJ_SUFFIX)		\
+		$(OBJDIR)/ut_$(ABI_FE)String.$(OBJ_SUFFIX)	\
+		$(OBJDIR)/ut_$(ABI_FE)Timer.$(OBJ_SUFFIX)	\
+		$(OBJDIR)/ut_$(ABI_FE)Idle.$(OBJ_SUFFIX)	\
+		$(OBJDIR)/ut_$(ABI_FE)Locale.$(OBJ_SUFFIX)	\
+		$(OBJDIR)/ut_sleep.$(OBJ_SUFFIX)            \
+		$(OBJDIR)/ut_Xpm2Bmp.$(OBJ_SUFFIX)
+endif
+
+
 ifeq ($(ABI_NATIVE), beos)
 ## TODO fix capitalization and change to $(ABI_FE)
 PLATFORM_OBJS=	$(OBJDIR)/ut_$(ABI_FE)Assert.$(OBJ_SUFFIX)	\
Index: src/af/util/win/ut_Win32Locale.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/win/ut_Win32Locale.cpp,v
retrieving revision 1.1
diff -u -w -p -u -w -r1.1 ut_Win32Locale.cpp
--- src/af/util/win/ut_Win32Locale.cpp	7 Jun 2001 15:51:54 -0000	1.1
+++ src/af/util/win/ut_Win32Locale.cpp	21 May 2002 18:07:59 -0000
@@ -20,6 +20,7 @@
 
 
 #include <windows.h>
+#include <ctype.h>
 
 #include "ut_assert.h"
 #include "ut_string.h"
Index: src/af/util/win/ut_debugmsg.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/win/ut_debugmsg.cpp,v
retrieving revision 1.6
diff -u -w -p -u -w -r1.6 ut_debugmsg.cpp
--- src/af/util/win/ut_debugmsg.cpp	25 Sep 2001 14:19:00 -0000	1.6
+++ src/af/util/win/ut_debugmsg.cpp	21 May 2002 18:08:12 -0000
@@ -35,7 +35,7 @@ void _UT_OutputMessage(const char *s, ..
 
         va_start(marker, s);
 
-#if 0
+#if 1
         vsprintf(sBuf, s, marker);
 #else
         // MPritchett or others: REVERT THIS IF NECESSARY
Index: src/af/util/xp/Makefile
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/Makefile,v
retrieving revision 1.64
diff -u -w -p -u -w -r1.64 Makefile
--- src/af/util/xp/Makefile	17 Dec 2001 14:43:53 -0000	1.64
+++ src/af/util/xp/Makefile	21 May 2002 18:08:12 -0000
@@ -77,6 +77,11 @@ ifeq ($(OS_NAME),WIN32)  
 INCLUDES = -I$(ABI_XX_ROOT)/../libpng -I$(ABI_XX_ROOT)/../zlib -I$(ABI_XX_ROOT)/../libiconv/include 
 endif
 
+ifeq ($(ABI_NATIVE),mingw)
+INCLUDES = -I$(ABI_XX_ROOT)/../libpng -I$(ABI_XX_ROOT)/../zlib -I$(ABI_XX_ROOT)/../libiconv/include
+endif
+
+
 ifeq ($(ABI_NATIVE), qnx)
 INCLUDES = -I$(ABI_ROOT)/../libpng -I$(ABI_ROOT)/../zlib 
 endif
Index: src/af/util/xp/ut_iconv.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_iconv.cpp,v
retrieving revision 1.22
diff -u -w -p -u -w -r1.22 ut_iconv.cpp
--- src/af/util/xp/ut_iconv.cpp	24 Apr 2002 19:49:23 -0000	1.22
+++ src/af/util/xp/ut_iconv.cpp	21 May 2002 18:08:13 -0000
@@ -30,6 +30,9 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#define ICONV_CONST const
+
+
 #include "xap_EncodingManager.h"
 
 /************************************************************************/
Index: src/af/util/xp/ut_iconv.h
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_iconv.h,v
retrieving revision 1.11
diff -u -w -p -u -w -r1.11 ut_iconv.h
Index: src/af/util/xp/ut_math.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_math.cpp,v
retrieving revision 1.5
diff -u -w -p -u -w -r1.5 ut_math.cpp
--- src/af/util/xp/ut_math.cpp	18 Oct 2001 15:32:43 -0000	1.5
+++ src/af/util/xp/ut_math.cpp	21 May 2002 18:08:13 -0000
@@ -32,7 +32,7 @@ UT_uint32 UT_newNumber ()
   return theNumber++;
 }
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
 
 double rint(double x) 
 {
Index: src/af/util/xp/ut_math.h
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_math.h,v
retrieving revision 1.3
diff -u -w -p -u -w -r1.3 ut_math.h
--- src/af/util/xp/ut_math.h	15 Oct 2001 13:38:45 -0000	1.3
+++ src/af/util/xp/ut_math.h	21 May 2002 18:08:13 -0000
@@ -37,7 +37,7 @@
 #define UT_SQRT2         1.41421356237309504880  /* sqrt(2) */
 #define UT_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
 #define finite _finite
 double rint(double x);
 #endif /* _WIN32 */
Index: src/af/util/xp/ut_types.h
===================================================================
RCS file: /cvsroot/abi/src/af/util/xp/ut_types.h,v
retrieving revision 1.69
diff -u -w -p -u -w -r1.69 ut_types.h
--- src/af/util/xp/ut_types.h	20 Mar 2002 17:44:26 -0000	1.69
+++ src/af/util/xp/ut_types.h	21 May 2002 18:08:13 -0000
@@ -66,7 +66,7 @@ typedef UT_uint8 UT_Confidence_t;
 #define UT_CONFIDENCE_POOR     85
 #define UT_CONFIDENCE_ZILCH     0
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
   #define ABI_PLUGIN_EXPORT __declspec(dllexport)
   #ifndef ABI_DLL
      /* we are building AbiWord and wish for its parts to be used by plugins */
Index: src/af/xap/win/xap_Win32Module.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Module.cpp,v
retrieving revision 1.4
diff -u -w -p -u -w -r1.4 xap_Win32Module.cpp
--- src/af/xap/win/xap_Win32Module.cpp	12 Sep 2001 16:35:54 -0000	1.4
+++ src/af/xap/win/xap_Win32Module.cpp	21 May 2002 18:08:18 -0000
@@ -95,12 +95,14 @@ public:
                 }
 
                 FARPROC pProc = GetProcAddress(m_hMod, symbol_name);
+		#if 0
                 if (pProc)
                 {
                         *symbol = reinterpret_cast<void*>(pProc);
                         m_pszErr = 0;
                         return true;
                 }
+		#endif
                 return false;
         }
 
Index: src/config/Makefile
===================================================================
RCS file: /cvsroot/abi/src/config/Makefile,v
retrieving revision 1.6
diff -u -w -p -u -w -r1.6 Makefile
Index: src/config/abi_defs.mk
===================================================================
RCS file: /cvsroot/abi/src/config/abi_defs.mk,v
retrieving revision 1.184.2.2
diff -u -w -p -u -w -r1.184.2.2 abi_defs.mk
--- src/config/abi_defs.mk	14 May 2002 07:44:27 -0000	1.184.2.2
+++ src/config/abi_defs.mk	21 May 2002 18:08:23 -0000
@@ -181,6 +181,20 @@ OS_NAME = CYGWIN
 endif
 endif
 
+##################################################################
+##################################################################
+#### if ABI_OPT_CYGWIN_NATIVE is defined then the OS_NAME becomes
+#### CYGWIN, and we build with gcc etc. with --no-mingw option
+
+ifdef ABI_OPT_CYGWIN_NATIVE
+ifeq ($(OS_NAME), WIN32)
+OS_NAME = CYGWIN
+endif
+endif
+
+
+
+
 ifndef ABI_ESCAPE_QUOTES
  ABI_ESCAPE_QUOTES=NO
  ifeq ($(OS_NAME),WIN32)
@@ -286,13 +300,24 @@ endif
 ## ABI_AP_INCS should define application-specific headers.  these are set
 ##             in abi_defs_*.mk -- one for each application in AbiSuite.
 
+# native cygwin/mingw should use windows includes
+ifeq ($(ABI_OPT_CYGWIN_NATIVE),1)
+ABI_INCDIR= win
+else
+ifeq ($(OS_NAME),MINGW32)
+ABI_INCDIR= win
+else
+ABI_INCDIR:= $(ABI_NATIVE)
+endif
+endif
+
 ABI_XAP_INCS=	/config						\
-		/af/xap/xp		/af/xap/$(ABI_NATIVE)	\
-		/af/ev/xp		/af/ev/$(ABI_NATIVE)	\
-		/af/util/xp		/af/util/$(ABI_NATIVE)	\
-		/af/gr/xp		/af/gr/$(ABI_NATIVE) \
+		/af/xap/xp		/af/xap/$(ABI_INCDIR)	\
+		/af/ev/xp		/af/ev/$(ABI_INCDIR)	\
+		/af/util/xp		/af/util/$(ABI_INCDIR)	\
+		/af/gr/xp		/af/gr/$(ABI_INCDIR) \
                 /wp/ap/xp \
-                /wp/ap/$(ABI_NATIVE) \
+                /wp/ap/$(ABI_INCDIR) \
                 /text/ptbl/xp \
                 /text/fmt/xp \
                 /wp/impexp/xp \
@@ -300,8 +325,8 @@ ABI_XAP_INCS=	/config						\
 
 ifeq ($(ABI_OPT_GNOME),1)
 ABI_OPT_GNOMEVFS := 1
-ABI_XAP_INCS+=	/af/xap/$(ABI_NATIVE)/$(ABI_GNOME_DIR)	\
-		/af/ev/$(ABI_NATIVE)/$(ABI_GNOME_DIR) 
+ABI_XAP_INCS+=	/af/xap/$(ABI_INCDIR)/$(ABI_GNOME_DIR)	\
+		/af/ev/$(ABI_INCDIR)/$(ABI_GNOME_DIR)
 endif
 
 # consider adding some UNIX native includes because MacOS X is really hybrid.
@@ -314,6 +339,10 @@ ABI_OTH_INCS=	/other/spell/xp \
 ifeq ($(OS_NAME), WIN32)
 ABI_OTH_INCS+=	/../../wv/glib-wv 
 endif
+ifeq ($(OS_NAME), MINGW32)
+ABI_OTH_INCS+=	/../../wv/glib-wv
+endif
+
 
 ifeq ($(ABI_OPT_LIBXML2),1)
 ABI_PEER_INCS=
@@ -408,6 +437,11 @@ ifeq ($(OS_NAME), CYGWIN)
 include $(ABI_ROOT)/src/config/platforms/cygwin.mk
 endif
 
+ifeq ($(OS_NAME), MINGW32)
+include $(ABI_ROOT)/src/config/platforms/cygwin.mk
+endif
+
+
 ifeq ($(OS_NAME), Linux)
 include $(ABI_ROOT)/src/config/platforms/linux.mk
 endif
@@ -674,6 +708,18 @@ ABI_OPTIONS+=LibXML:Off
 endif
 endif
 
+ifeq ($(OS_NAME), CYGWIN)
+ifeq ($(ABI_OPT_LIBXML2),1)
+XML_CFLAGS	= $(shell $(LIBXML_CONFIG) --cflags)
+XML_LIBS	= $(shell $(LIBXML_CONFIG) --libs)
+CFLAGS 		+=	$(XML_CFLAGS) -DHAVE_LIBXML2
+EXTRA_LIBS	+=	$(XML_LIBS)
+ABI_OPTIONS+=LibXML:On
+else
+ABI_OPTIONS+=LibXML:Off
+endif
+endif
+
 ifeq ($(OS_NAME), WIN32)
 EXTRA_LIBS	+= $(ABI_ROOT)/../psiconv/psiconv/.libs/libpsiconv.lib
 EXTRA_LIBS	+= $(ABI_ROOT)/../expat/lib/.libs/libexpat.lib
Index: src/config/abi_defs_hello.mk
===================================================================
RCS file: /cvsroot/abi/src/config/abi_defs_hello.mk,v
retrieving revision 1.2
diff -u -w -p -u -w -r1.2 abi_defs_hello.mk
--- src/config/abi_defs_hello.mk	20 Apr 2000 01:52:13 -0000	1.2
+++ src/config/abi_defs_hello.mk	21 May 2002 18:08:23 -0000
@@ -18,9 +18,20 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
 ## 02111-1307, USA.
 
-ABI_AP_INCS=	/hello/ap/xp	/hello/ap/$(ABI_NATIVE)	\
-		/hello/ap/xp/ToolbarIcons /ev/xp /ev/$(ABI_NATIVE) \
-		/gr/xp /gr/$(ABI_NATIVE)
+ifeq ($(ABI_OPT_CYGWIN_NATIVE),1)
+ABI_INCDIR= win
+else
+ifeq ($(OS_NAME),MINGW32)
+ABI_INCDIR= win
+else
+ABI_INCDIR:= $(ABI_NATIVE)
+endif
+endif
+
+
+ABI_AP_INCS=	/hello/ap/xp	/hello/ap/$(ABI_INCDIR)	\
+		/hello/ap/xp/ToolbarIcons /ev/xp /ev/$(ABI_INCDIR) \
+		/gr/xp /gr/$(ABI_INCDIR)
 
 include $(ABI_ROOT)/src/config/abi_defs.mk
 
Index: src/config/abi_defs_wp.mk
===================================================================
RCS file: /cvsroot/abi/src/config/abi_defs_wp.mk,v
retrieving revision 1.16
diff -u -w -p -u -w -r1.16 abi_defs_wp.mk
--- src/config/abi_defs_wp.mk	29 Oct 2001 01:20:56 -0000	1.16
+++ src/config/abi_defs_wp.mk	21 May 2002 18:08:23 -0000
@@ -18,7 +18,19 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
 ## 02111-1307, USA.
 
-ABI_AP_INCS=	/wp/ap/xp	/wp/ap/$(ABI_NATIVE)	\
+# native cygwin/mingw should use windows includes
+ifeq ($(ABI_OPT_CYGWIN_NATIVE),1)
+ABI_INCDIR= win
+else
+ifeq ($(OS_NAME),MINGW32)
+ABI_INCDIR= win
+else
+ABI_INCDIR:= $(ABI_NATIVE)
+endif
+endif
+
+
+ABI_AP_INCS=	/wp/ap/xp	/wp/ap/$(ABI_INCDIR)	\
                 /text/fmt/xp				\
                 /wp/impexp/xp				\
                 /text/ptbl/xp	/wp/ap/xp/ToolbarIcons
@@ -26,7 +38,7 @@ ABI_AP_INCS=	/wp/ap/xp	/wp/ap/$(ABI_NATI
 include $(ABI_ROOT)/src/config/abi_defs.mk
 
 ifeq ($(ABI_OPT_GNOME),1)
-ABI_AP_INCS+=	/wp/ap/$(ABI_NATIVE)/$(ABI_GNOME_DIR) 
+ABI_AP_INCS+=	/wp/ap/$(ABI_INCDIR)/$(ABI_GNOME_DIR)
 endif
 
 ##################################################################
Index: src/config/platforms/cygwin.mk
===================================================================
RCS file: /cvsroot/abi/src/config/platforms/cygwin.mk,v
retrieving revision 1.4
diff -u -w -p -u -w -r1.4 cygwin.mk
--- src/config/platforms/cygwin.mk	11 Nov 2001 14:59:26 -0000	1.4
+++ src/config/platforms/cygwin.mk	21 May 2002 18:08:24 -0000
@@ -75,8 +75,9 @@ else
 # NOTE:  when optimizations are enabled in the compilation.  For this reason,
 # NOTE:  building with optimizations may reveal further warnings not 
 # NOTE:  visible without any -O[number] option.
-OPTIMIZER	= -O2 -Wall -W -ansi -pedantic
-DEFINES		=
+#OPTIMIZER	= -O2 -Wall -W -ansi -pedantic
+OPTIMIZER	= -O2 -w -mno-cygwin
+DEFINES		= -D_WIN32_IE=0x0400 -D__GNUC__
 OBJ_DIR_SFX	= OBJ
 endif
 
@@ -116,9 +117,13 @@ PLATFORM_FLAGS		+= $(M68K_ARCH_FLAGS)
 OS_ENDIAN		= BigEndian32
 endif
 
+ifdef ABI_OPT_CYGWIN_UNIX
 GLIB_CONFIG		= glib-config
 GTK_CONFIG		= gtk-config
 GNOME_CONFIG    	= gnome-config
+endif
+LIBXML_CONFIG		= xml2-config
+
 
 # Shared library flags
 MKSHLIB			= $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
@@ -132,9 +137,13 @@ UNIX_CAN_BUILD_STATIC=1
 DL_LIBS			= dl
 STATIC_FLAGS		= -static
 
+ifdef ABI_OPT_CYGWIN_UNIX
 ABI_NATIVE	= unix
 ABI_FE		= Unix
-
+else
+ABI_NATIVE	= mingw
+ABI_FE		= Win32
+endif
 ##################################################################
 ## Here you can choice if you want to use the gnome stuff.
 ## Set ABI_OPT_GNOME to 1 (when invoking 'make') or set as
Index: src/config/require/Makefile
===================================================================
RCS file: /cvsroot/abi/src/config/require/Makefile,v
retrieving revision 1.4
diff -u -w -p -u -w -r1.4 Makefile
Index: src/config/require/win/Makefile
===================================================================
RCS file: /cvsroot/abi/src/config/require/win/Makefile,v
retrieving revision 1.14
diff -u -w -p -u -w -r1.14 Makefile
Index: src/wp/ap/win/ap_Win32App.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32App.cpp,v
retrieving revision 1.84
diff -u -w -p -u -w -r1.84 ap_Win32App.cpp
--- src/wp/ap/win/ap_Win32App.cpp	11 Apr 2002 14:25:02 -0000	1.84
+++ src/wp/ap/win/ap_Win32App.cpp	21 May 2002 18:08:58 -0000
@@ -25,13 +25,25 @@
 #include <stdlib.h>
 #include <windows.h>
 #include <commctrl.h>   // includes the common control header
+#if 0
 #include <crtdbg.h>
+#else
+#define __try
+#define __except(x) if (0) /* don't execute handler */
+#define __finally
+
+#define _try __try
+#define _except __except
+#define _finally __finally
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #include <stdio.h>
 #include <string.h>
 #include <io.h>
+#include <excpt.h>
 
 #include "ut_debugmsg.h"
 #include "ut_bytebuf.h"
@@ -707,8 +719,11 @@ static GR_Image * _showSplash(HINSTANCE 
 #endif
 
 /*****************************************************************/
-
+#ifdef __MINGW32__
+typedef BOOL (CALLBACK *InitCommonControlsEx_fn)(LPINITCOMMONCONTROLSEX lpInitCtrls);
+#else
 typedef BOOL __declspec(dllimport) (CALLBACK *InitCommonControlsEx_fn)(LPINITCOMMONCONTROLSEX lpInitCtrls);
+#endif
 
 int AP_Win32App::WinMain(const char * szAppName, HINSTANCE hInstance, 
                                                  HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
@@ -719,10 +734,11 @@ int AP_Win32App::WinMain(const char * sz
 
         // this is a static function and doesn't have a 'this' pointer.
         MSG msg;
-
+	#if 0
         _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_DEBUG );
         _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );
         _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_WNDW);
+	#endif
 
         // Ensure that common control DLL is loaded
         HINSTANCE hinstCC = LoadLibrary("comctl32.dll");
Index: src/wp/ap/win/ap_Win32Clipboard.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Clipboard.cpp,v
retrieving revision 1.3
diff -u -w -p -u -w -r1.3 ap_Win32Clipboard.cpp
--- src/wp/ap/win/ap_Win32Clipboard.cpp	7 Jun 2001 15:52:36 -0000	1.3
+++ src/wp/ap/win/ap_Win32Clipboard.cpp	21 May 2002 18:08:58 -0000
@@ -35,7 +35,7 @@
 AP_Win32Clipboard::AP_Win32Clipboard(void)
         : XAP_Win32Clipboard()
 {
-#define AddFmt(szFormat,cf)	do { m_vecFormat.addItem(szFormat); m_vecCF.addItem((void*)cf); } while (0)
+#define AddFmt(szFormat,cf)	do { m_vecFormat.addItem((void*)szFormat); m_vecCF.addItem((void*)cf); } while (0)
 
         // TODO We may want to add CF_LOCALE to supplement CF_TEXT
         AddFmt(AP_CLIPBOARD_TEXTPLAIN_8BIT,		CF_TEXT);
Index: src/wp/ap/win/ap_Win32Dialog_PageSetup.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_PageSetup.cpp,v
retrieving revision 1.19
diff -u -w -p -u -w -r1.19 ap_Win32Dialog_PageSetup.cpp
--- src/wp/ap/win/ap_Win32Dialog_PageSetup.cpp	12 Apr 2002 21:08:23 -0000	1.19
+++ src/wp/ap/win/ap_Win32Dialog_PageSetup.cpp	21 May 2002 18:08:58 -0000
@@ -43,6 +43,10 @@
 #include "orient-vertical.xpm"
 #include "orient-horizontal.xpm"
 
+#ifdef __MINGW32__
+#define LPNMUPDOWN LPNM_UPDOWN
+#endif
+
 #define BUFSIZE		128
 #define SIGDIGIT	4
 
Index: src/wp/ap/win/ap_Win32Frame.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Frame.cpp,v
retrieving revision 1.82
diff -u -w -p -u -w -r1.82 ap_Win32Frame.cpp
--- src/wp/ap/win/ap_Win32Frame.cpp	21 Mar 2002 16:36:31 -0000	1.82
+++ src/wp/ap/win/ap_Win32Frame.cpp	21 May 2002 18:08:58 -0000
@@ -46,6 +46,9 @@
 
 #include <winuser.h>
 #include <zmouse.h>
+#ifdef __MINGW32__
+#include <imm.h>
+#endif
 
 #ifndef SPI_GETWHEELSCROLLLINES
 #define SPI_GETWHEELSCROLLLINES   104
Index: src/wp/ap/win/ap_Win32Toolbar_SizeCombo.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Toolbar_SizeCombo.cpp,v
retrieving revision 1.4
diff -u -w -p -u -w -r1.4 ap_Win32Toolbar_SizeCombo.cpp
--- src/wp/ap/win/ap_Win32Toolbar_SizeCombo.cpp	6 Feb 2001 22:54:55 -0000	1.4
+++ src/wp/ap/win/ap_Win32Toolbar_SizeCombo.cpp	21 May 2002 18:08:58 -0000
@@ -55,22 +55,22 @@ bool AP_Win32Toolbar_SizeCombo::populate
         m_vecContents.clear();
 
         // populate the vector
-	m_vecContents.addItem("8");
-	m_vecContents.addItem("9");
-	m_vecContents.addItem("10");
-	m_vecContents.addItem("11");
-	m_vecContents.addItem("12");
-	m_vecContents.addItem("14");
-	m_vecContents.addItem("16");
-	m_vecContents.addItem("18");
-	m_vecContents.addItem("20");
-	m_vecContents.addItem("22");
-	m_vecContents.addItem("24");
-	m_vecContents.addItem("26");
-	m_vecContents.addItem("28");
-	m_vecContents.addItem("36");
-	m_vecContents.addItem("48");
-	m_vecContents.addItem("72");
+	m_vecContents.addItem((void*)"8");
+	m_vecContents.addItem((void*)"9");
+	m_vecContents.addItem((void*)"10");
+	m_vecContents.addItem((void*)"11");
+	m_vecContents.addItem((void*)"12");
+	m_vecContents.addItem((void*)"14");
+	m_vecContents.addItem((void*)"16");
+	m_vecContents.addItem((void*)"18");
+	m_vecContents.addItem((void*)"20");
+	m_vecContents.addItem((void*)"22");
+	m_vecContents.addItem((void*)"24");
+	m_vecContents.addItem((void*)"26");
+	m_vecContents.addItem((void*)"28");
+	m_vecContents.addItem((void*)"36");
+	m_vecContents.addItem((void*)"48");
+	m_vecContents.addItem((void*)"72");
 
         // TODO: may want to populate this based on current font instead?
         return true;
Index: src/wp/ap/win/ap_Win32Toolbar_StyleCombo.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Toolbar_StyleCombo.cpp,v
retrieving revision 1.7
diff -u -w -p -u -w -r1.7 ap_Win32Toolbar_StyleCombo.cpp
--- src/wp/ap/win/ap_Win32Toolbar_StyleCombo.cpp	15 Jul 2001 04:28:52 -0000	1.7
+++ src/wp/ap/win/ap_Win32Toolbar_StyleCombo.cpp	21 May 2002 18:08:58 -0000
@@ -71,12 +71,12 @@ bool AP_Win32Toolbar_StyleCombo::populat
 
 #if 1
         // HACK: for now, just hardwire it
-	m_vecContents.addItem("Normal");
-	m_vecContents.addItem("Heading 1");
-	m_vecContents.addItem("Heading 2");
-	m_vecContents.addItem("Heading 3");
-	m_vecContents.addItem("Plain Text");
-	m_vecContents.addItem("Block Text");
+	m_vecContents.addItem((void*)"Normal");
+	m_vecContents.addItem((void*)"Heading 1");
+	m_vecContents.addItem((void*)"Heading 2");
+	m_vecContents.addItem((void*)"Heading 3");
+	m_vecContents.addItem((void*)"Plain Text");
+	m_vecContents.addItem((void*)"Block Text");
 #else
         // TODO: need a view/doc pointer to get this right
         // ALSO: will need to repopulate as new styles added
Index: src/wp/ap/win/ap_Win32Toolbar_ZoomCombo.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Toolbar_ZoomCombo.cpp,v
retrieving revision 1.6
diff -u -w -p -u -w -r1.6 ap_Win32Toolbar_ZoomCombo.cpp
--- src/wp/ap/win/ap_Win32Toolbar_ZoomCombo.cpp	6 Mar 2002 15:14:35 -0000	1.6
+++ src/wp/ap/win/ap_Win32Toolbar_ZoomCombo.cpp	21 May 2002 18:08:58 -0000
@@ -55,12 +55,12 @@ bool AP_Win32Toolbar_ZoomCombo::populate
         m_vecContents.clear();
 
         // populate the vector
-	m_vecContents.addItem("200%");
-	m_vecContents.addItem("150%");
-	m_vecContents.addItem("100%");
-	m_vecContents.addItem("75%");
-	m_vecContents.addItem("50%");
-	m_vecContents.addItem("25%");
+	m_vecContents.addItem((void*)"200%");
+	m_vecContents.addItem((void*)"150%");
+	m_vecContents.addItem((void*)"100%");
+	m_vecContents.addItem((void*)"75%");
+	m_vecContents.addItem((void*)"50%");
+	m_vecContents.addItem((void*)"25%");
 
         const XAP_StringSet * pSS = XAP_App::getApp()->getStringSet();
         
Index: src/wp/ap/xp/ap_StatusBar.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_StatusBar.h,v
retrieving revision 1.11
diff -u -w -p -u -w -r1.11 ap_StatusBar.h
--- src/wp/ap/xp/ap_StatusBar.h	6 Feb 2001 22:54:58 -0000	1.11
+++ src/wp/ap/xp/ap_StatusBar.h	21 May 2002 18:08:59 -0000
@@ -45,7 +45,7 @@ class GR_Graphics;
 enum _progress_flags {
         PROGRESS_RESERVED1 	= 0x0,	
         PROGRESS_START  	= 0x1,		/* Start using the progress bar */
-	PROGRESS_STOP	 	= 0x2,		/* Stop using the progress bar */	
+	//PROGRESS_STOP	 	= 0x2,		/* Stop using the progress bar */
         PROGRESS_RESERVED2	= 0x3,
     PROGRESS_SHOW_MSG	= 0x4,		/* Allow message to be displayed */
         PROGRESS_SHOW_RAW	= 0x8,		/* Allow raw value to be displayed */
? configure.lineno
? stamp-h1
? compat/.deps
? psiconv/.deps
Index: config.h.in
===================================================================
RCS file: /cvsroot/psiconv/config.h.in,v
retrieving revision 1.6
diff -u -w -p -u -w -r1.6 config.h.in
--- config.h.in	1 Feb 2002 11:05:30 -0000	1.6
+++ config.h.in	21 May 2002 18:21:43 -0000
@@ -80,3 +80,8 @@
 
 /* Define to `unsigned' if <sys/types.h> does not define. */
 #undef size_t
+
+#ifdef __MINGW32__
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#endif
Index: psiconv/error.c
===================================================================
RCS file: /cvsroot/psiconv/psiconv/error.c,v
retrieving revision 1.4
diff -u -w -p -u -w -r1.4 error.c
? make.exe.stackdump
Index: Makefile
===================================================================
RCS file: /cvsroot/libpng/Makefile,v
retrieving revision 1.10
diff -u -w -p -u -w -r1.10 Makefile
--- Makefile	1 Dec 1999 14:45:05 -0000	1.10
+++ Makefile	21 May 2002 18:22:11 -0000
@@ -26,7 +26,7 @@ include $(ABI_ROOT)/src/config/abi_defs.
 
 CSRCS=		png.c pngerror.c pngget.c pngmem.c pngpread.c	\
                 pngread.c pngrio.c pngrtran.c pngrutil.c	\
-		pngset.c pngtest.c pngtrans.c pngwio.c		\
+		pngset.c pngtrans.c pngwio.c		\
                 pngwrite.c pngwtran.c pngwutil.c 
 
 LIBRARY_NAME=		Abi_libpng
This archive was generated by hypermail 2.1.4 : Tue May 21 2002 - 14:28:31 EDT