diff --git a/build/bakefiles/expat.bkl b/build/bakefiles/expat.bkl
index 71647aaba7..560fb3296f 100644
--- a/build/bakefiles/expat.bkl
+++ b/build/bakefiles/expat.bkl
@@ -34,9 +34,6 @@
COMPILED_FROM_DSP
-
- XML_STATIC
-
OS2_32
diff --git a/build/msw/makefile.bcc b/build/msw/makefile.bcc
index 4a8cf7a4aa..3ca6486750 100644
--- a/build/msw/makefile.bcc
+++ b/build/msw/makefile.bcc
@@ -187,8 +187,8 @@ WXTIFF_OBJECTS = \
$(OBJS)\wxtiff_tif_zip.obj
WXEXPAT_CFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -DNDEBUG -I$(LIBDIRNAME) \
- -DCOMPILED_FROM_DSP -DXML_STATIC -w-8004 -w-8008 -w-8012 -w-8057 -w-8066 \
- $(CPPFLAGS) $(CFLAGS)
+ -DCOMPILED_FROM_DSP -w-8004 -w-8008 -w-8012 -w-8057 -w-8066 $(CPPFLAGS) \
+ $(CFLAGS)
WXEXPAT_OBJECTS = \
$(OBJS)\wxexpat_xmlparse.obj \
$(OBJS)\wxexpat_xmlrole.obj \
diff --git a/build/msw/makefile.gcc b/build/msw/makefile.gcc
index 66499ee4c5..e3581f1e7e 100644
--- a/build/msw/makefile.gcc
+++ b/build/msw/makefile.gcc
@@ -174,8 +174,8 @@ WXTIFF_OBJECTS = \
$(OBJS)\wxtiff_tif_write.o \
$(OBJS)\wxtiff_tif_zip.o
WXEXPAT_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
- -DHAVE_W32API_H -DNDEBUG -I$(LIBDIRNAME) -DCOMPILED_FROM_DSP -DXML_STATIC \
- $(CPPFLAGS) $(CFLAGS)
+ -DHAVE_W32API_H -DNDEBUG -I$(LIBDIRNAME) -DCOMPILED_FROM_DSP $(CPPFLAGS) \
+ $(CFLAGS)
WXEXPAT_OBJECTS = \
$(OBJS)\wxexpat_xmlparse.o \
$(OBJS)\wxexpat_xmlrole.o \
diff --git a/build/msw/makefile.vc b/build/msw/makefile.vc
index 82447ae200..ceb6f40843 100644
--- a/build/msw/makefile.vc
+++ b/build/msw/makefile.vc
@@ -195,7 +195,7 @@ WXEXPAT_CFLAGS = /M$(__RUNTIME_LIBS_85)$(__DEBUGRUNTIME) /DWIN32 \
$(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) /D_CRT_SECURE_NO_DEPRECATE=1 \
/D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
$(__NO_VC_CRTDBG_p) /DNDEBUG /D_CRT_SECURE_NO_WARNINGS /I$(LIBDIRNAME) \
- /DCOMPILED_FROM_DSP /DXML_STATIC $(CPPFLAGS) $(CFLAGS)
+ /DCOMPILED_FROM_DSP $(CPPFLAGS) $(CFLAGS)
WXEXPAT_OBJECTS = \
$(OBJS)\wxexpat_xmlparse.obj \
$(OBJS)\wxexpat_xmlrole.obj \
diff --git a/build/msw/makefile.wat b/build/msw/makefile.wat
index 6539a12d25..797e71fa49 100644
--- a/build/msw/makefile.wat
+++ b/build/msw/makefile.wat
@@ -3803,8 +3803,8 @@ WXTIFF_OBJECTS = &
$(OBJS)\wxtiff_tif_write.obj &
$(OBJS)\wxtiff_tif_zip.obj
WXEXPAT_CFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
- $(__RUNTIME_LIBS) -dNDEBUG -i=$(LIBDIRNAME) -dCOMPILED_FROM_DSP -dXML_STATIC &
- $(CPPFLAGS) $(CFLAGS)
+ $(__RUNTIME_LIBS) -dNDEBUG -i=$(LIBDIRNAME) -dCOMPILED_FROM_DSP $(CPPFLAGS) &
+ $(CFLAGS)
WXEXPAT_OBJECTS = &
$(OBJS)\wxexpat_xmlparse.obj &
$(OBJS)\wxexpat_xmlrole.obj &
diff --git a/build/msw/wx_vc7_wxexpat.vcproj b/build/msw/wx_vc7_wxexpat.vcproj
index 50a2ecd2c0..ec6216019c 100644
--- a/build/msw/wx_vc7_wxexpat.vcproj
+++ b/build/msw/wx_vc7_wxexpat.vcproj
@@ -27,7 +27,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\lib\vc_lib"
- PreprocessorDefinitions="WIN32;_LIB;_DEBUG;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP;XML_STATIC"
+ PreprocessorDefinitions="WIN32;_LIB;_DEBUG;NDEBUG;_CRT_SECURE_NO_WARNINGS;COMPILED_FROM_DSP"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
@@ -48,7 +48,7 @@
SuppressStartupBanner="TRUE"/>
@@ -58,7 +58,7 @@
Name="VCPreLinkEventTool"/>
@@ -111,7 +111,7 @@
Name="VCPreLinkEventTool"/>
@@ -167,7 +167,7 @@
Name="VCPreLinkEventTool"/>
@@ -220,7 +220,7 @@
Name="VCPreLinkEventTool"/>
@@ -124,14 +124,14 @@
/>
@@ -202,14 +202,14 @@
/>
@@ -283,14 +283,14 @@
/>
diff --git a/build/msw/wx_vc9_wxexpat.vcproj b/build/msw/wx_vc9_wxexpat.vcproj
index af5917ce67..641f545a23 100644
--- a/build/msw/wx_vc9_wxexpat.vcproj
+++ b/build/msw/wx_vc9_wxexpat.vcproj
@@ -43,7 +43,7 @@
/>
@@ -123,7 +123,7 @@
/>
@@ -201,7 +201,7 @@
/>
@@ -281,7 +281,7 @@
/>
diff --git a/build/msw/wx_wxexpat.dsp b/build/msw/wx_wxexpat.dsp
index 4a17ab4df1..dbe7f6aa87 100644
--- a/build/msw/wx_wxexpat.dsp
+++ b/build/msw/wx_wxexpat.dsp
@@ -42,8 +42,8 @@ RSC=rc.exe
# PROP Output_Dir "..\..\lib\vc_dll"
# PROP Intermediate_Dir "vc_mswudll\wxexpat"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
-# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
+# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
+# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -65,8 +65,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "..\..\lib\vc_dll"
# PROP Intermediate_Dir "vc_mswuddll\wxexpat"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpatd.pdb /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
-# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpatd.pdb /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
+# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpatd.pdb /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
+# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_dll\wxexpatd.pdb /I "..\..\lib\vc_dll" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -88,8 +88,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "..\..\lib\vc_lib"
# PROP Intermediate_Dir "vc_mswu\wxexpat"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
-# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
+# ADD BASE CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
+# ADD CPP /nologo /FD /MD /W1 /O2 /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpat.pdb /opt:ref /opt:icf /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
@@ -111,8 +111,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "..\..\lib\vc_lib"
# PROP Intermediate_Dir "vc_mswud\wxexpat"
# PROP Target_Dir ""
-# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpatd.pdb /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
-# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpatd.pdb /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /D "XML_STATIC" /c
+# ADD BASE CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpatd.pdb /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
+# ADD CPP /nologo /FD /MDd /W1 /Od /Gm /GR /EHsc /Zi /Fd..\..\lib\vc_lib\wxexpatd.pdb /I "..\..\lib\vc_lib" /D "WIN32" /D "_LIB" /D "_DEBUG" /D "NDEBUG" /D "_CRT_SECURE_NO_WARNINGS" /D "COMPILED_FROM_DSP" /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
diff --git a/src/expat/lib/expat_external.h b/src/expat/lib/expat_external.h
index 2c03284ea2..2944bff520 100644
--- a/src/expat/lib/expat_external.h
+++ b/src/expat/lib/expat_external.h
@@ -5,6 +5,13 @@
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
+/* wxWidgets modification: always predefine XML_STATIC as we always use
+ Expat as a static library.
+*/
+#ifndef XML_STATIC
+#define XML_STATIC
+#endif
+
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)