summaryrefslogtreecommitdiff
path: root/parser/expat/lib
diff options
context:
space:
mode:
Diffstat (limited to 'parser/expat/lib')
-rw-r--r--parser/expat/lib/Makefile.in27
-rw-r--r--parser/expat/lib/expat_external.h2
-rw-r--r--parser/expat/lib/moz.build13
-rw-r--r--parser/expat/lib/xmlparse.c6
4 files changed, 15 insertions, 33 deletions
diff --git a/parser/expat/lib/Makefile.in b/parser/expat/lib/Makefile.in
deleted file mode 100644
index 473ed6bdd..000000000
--- a/parser/expat/lib/Makefile.in
+++ /dev/null
@@ -1,27 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH = @DEPTH@
-topsrcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-MSVC_ENABLE_PGO := 1
-
-CSRCS = \
- xmlparse.c \
- xmlrole.c \
- xmltok.c \
- $(NULL)
-
-# We want only the static lib, not the shared lib
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
-
-xmltok.$(OBJ_SUFFIX): moz_extensions.c
-
-DEFINES += -DHAVE_EXPAT_CONFIG_H
diff --git a/parser/expat/lib/expat_external.h b/parser/expat/lib/expat_external.h
index e257c15f2..70c630bc9 100644
--- a/parser/expat/lib/expat_external.h
+++ b/parser/expat/lib/expat_external.h
@@ -82,7 +82,7 @@ extern "C" {
#define XML_UNICODE
#endif
-/* BEGIN MOZILLA CHANGE (typedef XML_Char to PRUnichar) */
+/* BEGIN MOZILLA CHANGE (typedef XML_Char to char16_t) */
#if 0
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
diff --git a/parser/expat/lib/moz.build b/parser/expat/lib/moz.build
index bea67ad77..c69dca4bc 100644
--- a/parser/expat/lib/moz.build
+++ b/parser/expat/lib/moz.build
@@ -4,12 +4,19 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-MODULE = 'expat'
-
EXPORTS += [
'expat.h',
'expat_external.h',
]
-LIBRARY_NAME = 'mozexpat_s'
+SOURCES += [
+ 'xmlparse.c',
+ 'xmlrole.c',
+ 'xmltok.c',
+]
+
+MSVC_ENABLE_PGO = True
+
+FINAL_LIBRARY = 'gkmedias'
+DEFINES['HAVE_EXPAT_CONFIG_H'] = True
diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c
index 045ffa15a..ad4e3698d 100644
--- a/parser/expat/lib/xmlparse.c
+++ b/parser/expat/lib/xmlparse.c
@@ -49,7 +49,7 @@ typedef char ICHAR;
#endif
-/* BEGIN MOZILLA CHANGE (typedef XML_Char to PRUnichar) */
+/* BEGIN MOZILLA CHANGE (typedef XML_Char to char16_t) */
#if 0
#ifdef XML_UNICODE
@@ -136,7 +136,9 @@ typedef struct {
#define INIT_DATA_BUF_SIZE 1024
#define INIT_ATTS_SIZE 16
#define INIT_ATTS_VERSION 0xFFFFFFFF
-#define INIT_BLOCK_SIZE 1024
+/* BEGIN MOZILLA CHANGE (Avoid slop in poolGrow() allocations) */
+#define INIT_BLOCK_SIZE ((int)(1024 - (offsetof(BLOCK, s) / sizeof(XML_Char))))
+/* END MOZILLA CHANGE */
#define INIT_BUFFER_SIZE 1024
#define EXPAND_SPARE 24