From ffc6107d40f73196ea3db160e51f57805adbcebc Mon Sep 17 00:00:00 2001
From: darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Date: Fri, 18 Jan 2013 20:36:27 +0000
Subject: AppPkg/Applications/Python: Add support for the pyexpat module.

Add required flags to [BuildOptions] in PythonCore.inf.
Add initialization routine to Efi/config.c.
Alter #include targets if building for UEFI in expat_external.h and xmlparse.c.
Add expat modifications to PyMod-2.7.2/Modules/expat.

Contributed-under: TianoCore Contribution Agreement 1.0
Submitted-by:   Duane Voth <duanev@gmail.com>
Signed-off-by:  daryl.mcdaniel@intel.com
Reviewed-by:    duanev@gmail.com
Reviewed-by:    daryl.mcdaniel@intel.com


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14071 6f19259b-4bc3-4df7-8a09-765794883524
---
 AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c')

diff --git a/AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c b/AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c
index cb84274d0a..87ee2ea126 100644
--- a/AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c
+++ b/AppPkg/Applications/Python/Python-2.7.2/Modules/expat/xmlparse.c
@@ -18,7 +18,11 @@
 #include <string.h>                     /* memset(), memcpy() */
 #include <assert.h>
 
+#if defined(UEFI_C_SOURCE)
+  #include <expat/expat.h>
+#else
 #include "expat.h"
+#endif
 
 #ifdef XML_UNICODE
 #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX
@@ -1493,6 +1497,10 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
           ps_parsing = XML_FINISHED;
           return result;
         }
+        break;
+      default:
+        /* XML_FINISHED case required by compiler - but not tested - djv */
+        return XML_STATUS_OK;
       }
     }
 
-- 
cgit v1.2.3