summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorRobert M Campbell <robert.rcampbell@gmail.com>2013-11-13 17:23:40 +0700
committerEike Rathke <erack@redhat.com>2013-11-13 15:35:16 +0000
commit8ab4752820331ab80410877836093630198812d8 (patch)
tree89ac9bb59f9ad1bc21e9c7c4ca0d7284f07228ca /external
parentb7b4ce70d84591d4d17428e0f237737208f2d0f2 (diff)
upgrade to ICU 52.1, fdo#70995
Change-Id: I25e4b630c9029749cc459c0b65da287d6f0ba95e Reviewed-on: https://gerrit.libreoffice.org/6666 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/icu/UnpackedTarball_icu.mk8
-rw-r--r--external/icu/icu4c-aix.patch39
-rw-r--r--external/icu/icu4c-android.patch38
-rw-r--r--external/icu/icu4c-buffer-overflow.patch3
-rw-r--r--external/icu/icu4c-build.patch35
-rw-r--r--external/icu/icu4c-macosx.patch3
-rw-r--r--external/icu/icu4c-mkdir.patch3
-rw-r--r--external/icu/icu4c-rpath.patch1
-rw-r--r--external/icu/icu4c-solarisgcc.patch6
-rw-r--r--external/icu/icu4c-warnings.patch5
-rw-r--r--external/icu/icu4c-wchar_t.patch5
-rw-r--r--external/icu/icu4c.10129.wintz.patch24
-rw-r--r--external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch36
13 files changed, 58 insertions, 148 deletions
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index 2fdc9eefa8c0..77cd38a8bb1f 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -11,15 +11,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,icu))
$(eval $(call gb_UnpackedTarball_set_tarball,icu,$(ICU_TARBALL)))
-# *ONLY* for ICU 51(.1)!
-# http://site.icu-project.org/download/51#TOC-Known-Issues
-$(eval $(call gb_UnpackedTarball_set_pre_action,icu,\
- $(GNUTAR) -x -z -f $(gb_UnpackedTarget_TARFILE_LOCATION)/$(ICU_51_LAYOUT_FIX_TARBALL) \
-))
-
$(eval $(call gb_UnpackedTarball_add_patches,icu,\
- external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch \
- external/icu/icu4c.10129.wintz.patch \
external/icu/icu4c-build.patch \
external/icu/icu4c-aix.patch \
external/icu/icu4c-wchar_t.patch \
diff --git a/external/icu/icu4c-aix.patch b/external/icu/icu4c-aix.patch
index 48659ca0406a..580a8fc8e004 100644
--- a/external/icu/icu4c-aix.patch
+++ b/external/icu/icu4c-aix.patch
@@ -1,20 +1,6 @@
---- misc/icu/source/config/mh-aix-gcc 2009-01-15 01:46:10.000000000 -0600
-+++ misc/build/icu/source/config/mh-aix-gcc 2010-06-24 20:58:16.000000000 -0500
-@@ -1,10 +1,7 @@
- ## -*-makefile-*-
--## Copyright (c) 2003-2009 IBM, Ken Foskey, and others. All rights reserved.
--##
--## Aix-specific setup (for gcc)
--##
--## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability).
--## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1
-+## Linux-specific setup
-+## Copyright (c) 1999-2006, International Business Machines Corporation and
-+## others. All Rights Reserved.
-
- # Certain files don't compile in -ansi mode (e.g. umutex.c, toolutil.c, and cdatatst.c)
- CFLAGS += -D_ALL_SOURCE
-@@ -13,84 +10,30 @@
+--- misc/icu/source/config/mh-aix-gcc 2010-06-24 20:58:16.000000000 -0500
++++ misc/build/icu/source/config/mh-aix-gcc 2013-10-31 20:34:16.607982310 +0700
+@@ -13,84 +13,29 @@
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
@@ -30,6 +16,10 @@
-## Commands to make a shared library
-SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
-SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
+-
+-## Compiler switch to embed a runtime search path
+-LD_RPATH= -I
+-LD_RPATH_PRE=
+## Flags for position independent code
+SHAREDLIBCFLAGS = -fPIC
+SHAREDLIBCXXFLAGS = -fPIC
@@ -39,10 +29,6 @@
+THREADSCPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
+LIBCPPFLAGS =
- ## Compiler switch to embed a runtime search path
--LD_RPATH= -I
--LD_RPATH_PRE=
--
-## enable the shared lib loader
-LDFLAGS += -Wl,-bbigtoc
+LD_RPATH=
@@ -86,7 +72,7 @@
-# without the -brtl option, the library names use .a. AIX is funny that way.
-SO= a
-A= a
-+SO = so
++SO= so
## Non-shared intermediate object suffix
-STATIC_O = o
@@ -111,7 +97,7 @@
## Compilation rules
%.$(STATIC_O): $(srcdir)/%.c
-@@ -118,10 +61,10 @@
+@@ -118,10 +63,10 @@
[ -s $@ ] || rm -f $@'
## Versioned libraries rules
@@ -126,8 +112,8 @@
## BIR - bind with internal references [so app data and icu data doesn't collide]
---- misc/icu/source/tools/pkgdata/pkgdata.cpp 2013-03-15 22:12:06.000000000 +0000
-+++ misc/build/icu/source/tools/pkgdata/pkgdata.cpp 2013-04-06 20:56:00.935656635 +0100
+--- misc/icu/source/tools/pkgdata/pkgdata.cpp 2013-04-06 20:56:00.935656635 +0100
++++ misc/build/icu/source/tools/pkgdata/pkgdata.cpp 2013-10-31 20:38:10.623984554 +0700
@@ -888,7 +888,7 @@
uprv_strcat(pkgDataFlags[SO_EXT], ".");
@@ -137,7 +123,7 @@
sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s.%s",
libFileNames[LIB_FILE],
pkgDataFlags[SOBJ_EXT]);
-@@ -1302,15 +1298,6 @@
+@@ -1302,15 +1302,6 @@
pkgDataFlags[LDICUDTFLAGS],
targetDir,
libFileNames[LIB_FILE_CYGWIN_VERSION],
@@ -153,3 +139,4 @@
#else
sprintf(cmd, "%s %s -o %s%s %s %s%s %s %s",
pkgDataFlags[GENLIB],
+
diff --git a/external/icu/icu4c-android.patch b/external/icu/icu4c-android.patch
index 55764a12bbf3..ad10fe339473 100644
--- a/external/icu/icu4c-android.patch
+++ b/external/icu/icu4c-android.patch
@@ -1,17 +1,17 @@
---- misc/icu/source/config/mh-linux
-+++ misc/build/icu/source/config/mh-linux
-@@ -30,7 +30,7 @@
+--- misc/icu/source/config/mh-linux 2013-10-05 03:50:00.000000000 +0700
++++ misc/build/icu/source/config/mh-linux 2013-11-10 17:11:46.856222557 +0700
+@@ -25,7 +25,7 @@
## Compiler switch to embed a library name
# The initial tab in the next line is to prevent icu-config from reading it.
- LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
-+# LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
++ #LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
#SH# # We can't depend on MIDDLE_SO_TARGET being set.
#SH# LD_SONAME=
---- misc/icu/source/configure
-+++ misc/build/icu/source/configure
-@@ -5053,7 +5053,7 @@
+--- misc/icu/source/configure 2013-10-05 03:54:58.000000000 +0700
++++ misc/build/icu/source/configure 2013-11-10 17:19:19.200218763 +0700
+@@ -4872,7 +4872,7 @@
else
icu_cv_host_frag=mh-linux-va
fi ;;
@@ -20,17 +20,18 @@
*-*-cygwin|*-*-mingw32|*-*-mingw64)
if test "$GCC" = yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-@@ -6127,6 +6127,9 @@
+@@ -6032,6 +6032,10 @@
# Check to see if genccode can generate simple assembly.
GENCCODE_ASSEMBLY=
case "${host}" in
+arm-*-linux-androideabi)
-+ GENCCODE_ASSEMBLY="-a gcc-android-arm"
-+ ;;
++ if test "$GCC" = yes; then
++ GENCCODE_ASSEMBLY="-a gcc-android-arm"
++ fi ;;
*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
if test "$GCC" = yes; then
# We're using gcc, and the simple -a gcc command line works for genccode
-@@ -7200,6 +7203,10 @@
+@@ -7104,6 +7108,10 @@
# wchar_t can be used
CHECK_UTF16_STRING_RESULT="available"
;;
@@ -41,9 +42,10 @@
*)
;;
esac
---- misc/icu/source/common/putilimp.h
-+++ misc/build/icu/source/common/putilimp.h
-@@ -86,6 +86,8 @@
+
+--- misc/icu/source/common/putilimp.h 2013-10-05 03:49:30.000000000 +0700
++++ misc/build/icu/source/common/putilimp.h 2013-11-10 17:21:26.224217698 +0700
+@@ -87,6 +87,8 @@
/* Use the predefined value. */
#elif U_PLATFORM_HAS_WIN32_API
# define U_HAVE_NL_LANGINFO_CODESET 0
@@ -52,9 +54,10 @@
#else
# define U_HAVE_NL_LANGINFO_CODESET 1
#endif
---- misc/icu/source/common/unicode/platform.h
-+++ misc/build/icu/source/common/unicode/platform.h
-@@ -641,7 +641,7 @@
+
+--- misc/icu/source/common/unicode/platform.h 2013-10-05 03:49:10.000000000 +0700
++++ misc/build/icu/source/common/unicode/platform.h 2013-11-10 17:22:27.160217186 +0700
+@@ -703,7 +703,7 @@
#elif defined(U_STATIC_IMPLEMENTATION)
# define U_EXPORT
#elif defined(__GNUC__)
@@ -63,3 +66,4 @@
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
|| (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
# define U_EXPORT __global
+
diff --git a/external/icu/icu4c-buffer-overflow.patch b/external/icu/icu4c-buffer-overflow.patch
index 7385d3b470d9..46815634addd 100644
--- a/external/icu/icu4c-buffer-overflow.patch
+++ b/external/icu/icu4c-buffer-overflow.patch
@@ -11,7 +11,7 @@ Index: icu/source/tools/pkgdata/pkgdata.cpp
===================================================================
--- build/icu.orig/source/tools/pkgdata/pkgdata.cpp
+++ build/icu/source/tools/pkgdata/pkgdata.cpp
-@@ -1914,12 +1914,12 @@ static void loadLists(UPKGOptions *o, UE
+@@ -1980,12 +1980,12 @@
const char cmd[] = "icu-config --incpkgdatafile";
/* #1 try the same path where pkgdata was called from. */
@@ -27,3 +27,4 @@ Index: icu/source/tools/pkgdata/pkgdata.cpp
if(verbose) {
fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf);
+
diff --git a/external/icu/icu4c-build.patch b/external/icu/icu4c-build.patch
index ba47658b3f7f..8f4a7eefcff2 100644
--- a/external/icu/icu4c-build.patch
+++ b/external/icu/icu4c-build.patch
@@ -1,22 +1,3 @@
---- misc/icu/source/common/umutex.h
-+++ misc/icu/source/common/umutex.h
-@@ -48,16 +48,8 @@
- #endif /* win32 */
-
- #if U_PLATFORM_IS_DARWIN_BASED
--#if defined(__STRICT_ANSI__)
--#define UPRV_REMAP_INLINE
--#define inline
--#endif
- #include <libkern/OSAtomic.h>
- #define USE_MAC_OS_ATOMIC_INCREMENT 1
--#if defined(UPRV_REMAP_INLINE)
--#undef inline
--#undef UPRV_REMAP_INLINE
--#endif
- #endif
-
- /*
--- misc/icu/source/tools/toolutil/pkg_genc.h
+++ misc/build/icu/source/tools/toolutil/pkg_genc.h
@@ -58,7 +58,7 @@
@@ -27,10 +8,10 @@
+#define SMALL_BUFFER_MAX_SIZE 2048
#define SMALL_BUFFER_FLAG_NAMES 32
#define BUFFER_PADDING_SIZE 20
-
+
--- misc/icu/source/tools/toolutil/pkg_genc.c
+++ misc/build/icu/source/tools/toolutil/pkg_genc.c
-@@ -145,6 +145,28 @@
+@@ -152,6 +152,28 @@
".long ","",HEX_0X
},
@@ -56,13 +37,13 @@
+ "\t.section .note.GNU-stack,\"\",%%progbits\n",
+ HEX_0X
+ },
+ // 16 bytes alignment.
+ // http://docs.oracle.com/cd/E19641-01/802-1947/802-1947.pdf
{"sun",
- "\t.section \".rodata\"\n"
- "\t.align 8\n"
--- misc/icu/source/config/mh-darwin 2010-09-29 20:37:36.000000000 +0200
+++ misc/build/icu/source/config/mh-darwin 2011-03-15 10:56:26.653056004 +0100
-@@ -25,11 +25,7 @@
+@@ -28,11 +28,7 @@
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
## Compiler switches to embed a library name and version information
@@ -75,7 +56,7 @@
## Compiler switch to embed a runtime search path
LD_RPATH=
-@@ -45,10 +41,6 @@
+@@ -48,10 +44,6 @@
## Non-shared intermediate object suffix
STATIC_O = ao
@@ -85,8 +66,8 @@
-
## Compilation and dependency rules
%.$(STATIC_O): $(srcdir)/%.c
- $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<)
-@@ -80,16 +72,10 @@
+ $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS)) -MMD -MT "$*.d $*.o $*.$(STATIC_O)" -o $@ $<)
+@@ -65,16 +57,10 @@
## Versioned libraries rules
diff --git a/external/icu/icu4c-macosx.patch b/external/icu/icu4c-macosx.patch
index 0de6ac30381a..8f9f9a75507e 100644
--- a/external/icu/icu4c-macosx.patch
+++ b/external/icu/icu4c-macosx.patch
@@ -1,6 +1,6 @@
--- misc/icu/source/common/putil.cpp
+++ misc/build/icu/source/common/putil.cpp
-@@ -1080,8 +1080,16 @@
+@@ -1111,8 +1111,16 @@
static const time_t decemberSolstice=1198332540; /*2007-12-22 06:09 UT*/
/* This probing will tell us when daylight savings occurs. */
@@ -17,3 +17,4 @@
if(decemberSol.tm_isdst > 0) {
daylightType = U_DAYLIGHT_DECEMBER;
} else if(juneSol.tm_isdst > 0) {
+
diff --git a/external/icu/icu4c-mkdir.patch b/external/icu/icu4c-mkdir.patch
index 859220c37207..c9758a306464 100644
--- a/external/icu/icu4c-mkdir.patch
+++ b/external/icu/icu4c-mkdir.patch
@@ -1,6 +1,6 @@
--- misc/icu/source/dataMakefile.in.sav 2012-04-05 22:49:20.000000000 +0200
+++ build/icu/source/data/Makefile.in 2012-12-04 14:24:40.548026700 +0100
-@@ -346,6 +346,7 @@
+@@ -350,6 +350,7 @@
ifeq ($(PKGDATA_MODE),dll)
SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
@@ -8,3 +8,4 @@
rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
endif
endif
+
diff --git a/external/icu/icu4c-rpath.patch b/external/icu/icu4c-rpath.patch
index 44ab8a652923..dd4e2e755401 100644
--- a/external/icu/icu4c-rpath.patch
+++ b/external/icu/icu4c-rpath.patch
@@ -33,3 +33,4 @@
## These are the library specific LDFLAGS
LDFLAGSICUDT=-nodefaultlibs -nostdlib
+
diff --git a/external/icu/icu4c-solarisgcc.patch b/external/icu/icu4c-solarisgcc.patch
index cb668d8b49b1..a47d9b1e3506 100644
--- a/external/icu/icu4c-solarisgcc.patch
+++ b/external/icu/icu4c-solarisgcc.patch
@@ -1,6 +1,5 @@
-diff -uriwb build/icu.old/source/common/uposixdefs.h misc/build/icu/source/common/uposixdefs.h
---- build/icu.old/source/common/uposixdefs.h 2012-04-05 21:46:18.000000000 +0100
-+++ build/icu/source/common/uposixdefs.h 2012-06-21 15:45:17.613369477 +0100
+--- build/icu.old/source/common/uposixdefs.h
++++ build/icu/source/common/uposixdefs.h
@@ -52,7 +52,7 @@
*
* z/OS needs this definition for timeval and to get usleep.
@@ -10,3 +9,4 @@ diff -uriwb build/icu.old/source/common/uposixdefs.h misc/build/icu/source/commo
# define _XOPEN_SOURCE_EXTENDED 1
#endif
+
diff --git a/external/icu/icu4c-warnings.patch b/external/icu/icu4c-warnings.patch
index 1407f3b5a702..d1460933857f 100644
--- a/external/icu/icu4c-warnings.patch
+++ b/external/icu/icu4c-warnings.patch
@@ -1,6 +1,6 @@
--- misc/icu/source/common/unicode/utf16.h
+++ misc/build/icu/source/common/unicode/utf16.h
-@@ -316,6 +316,7 @@
+@@ -319,6 +319,7 @@
(s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \
} else /* c>0x10ffff or not enough space */ { \
(isError)=TRUE; \
@@ -10,7 +10,7 @@
--- misc/icu/source/common/unicode/utypes.h
+++ misc/build/icu/source/common/unicode/utypes.h
-@@ -399,7 +399,7 @@ typedef double UDate;
+@@ -399,7 +399,7 @@
* some Linux/Unix compilers have problems with defining global new/delete.
* On Windows, it is _MSC_VER>=1200 for MSVC 6.0 and higher.
*/
@@ -19,3 +19,4 @@
#ifndef U_HIDE_INTERNAL_API
/**
+
diff --git a/external/icu/icu4c-wchar_t.patch b/external/icu/icu4c-wchar_t.patch
index 2360a08f03a6..b3eefe104a7f 100644
--- a/external/icu/icu4c-wchar_t.patch
+++ b/external/icu/icu4c-wchar_t.patch
@@ -1,5 +1,5 @@
---- misc/icu/source/config/mh-cygwin-msvc 2012-05-10 11:42:22.886869800 +0100
-+++ misc/build/icu/source/config/mh-cygwin-msvc 2012-05-10 11:42:45.110227500 +0100
+--- misc/icu/source/config/mh-cygwin-msvc
++++ misc/build/icu/source/config/mh-cygwin-msvc
@@ -43,10 +43,9 @@
# /GF pools strings and places them into read-only memory
@@ -13,3 +13,4 @@
CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
DEFS+=-DWIN32 -DCYGWINMSVC
LDFLAGS+=/nologo
+
diff --git a/external/icu/icu4c.10129.wintz.patch b/external/icu/icu4c.10129.wintz.patch
deleted file mode 100644
index 1c6ace908425..000000000000
--- a/external/icu/icu4c.10129.wintz.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-# Fix for fdo#59850
-# Patch was also submitted with https://ssl.icu-project.org/trac/ticket/10129
-# of which the outcome should be monitored.
-
---- misc/icu/source/common/wintz.c
-+++ misc/build/icu/source/common/wintz.c
-@@ -254,7 +254,6 @@
- char apiStdName[MAX_LENGTH_ID];
- char regStdName[MAX_LENGTH_ID];
- char tmpid[MAX_LENGTH_ID];
-- int32_t apiStdLength = 0;
- int32_t len;
- int id;
- int errorCode;
-@@ -280,8 +279,8 @@
-
- /* Convert the wchar_t* standard name to char* */
- uprv_memset(apiStdName, 0, sizeof(apiStdName));
-- u_strFromWCS(apiStd, MAX_LENGTH_ID, &apiStdLength, apiTZI.StandardName, -1, &status);
-- u_austrncpy(apiStdName, apiStd, apiStdLength);
-+ u_strFromWCS(apiStd, MAX_LENGTH_ID, NULL, apiTZI.StandardName, -1, &status);
-+ u_austrncpy(apiStdName, apiStd, sizeof(apiStdName) - 1);
-
- tmpid[0] = 0;
diff --git a/external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch b/external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch
deleted file mode 100644
index 90f50ab0318f..000000000000
--- a/external/icu/icu4c.10318.CVE-2013-2924_changeset_34076.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Index: /icu/trunk/source/i18n/csrucode.cpp
-===================================================================
---- a/orig.icu/source/i18n/csrucode.cpp (revision 34075)
-+++ b/icu/source/i18n/csrucode.cpp (revision 34076)
-@@ -1,5 +1,5 @@
- /*
- **********************************************************************
-- * Copyright (C) 2005-2012, International Business Machines
-+ * Copyright (C) 2005-2013, International Business Machines
- * Corporation and others. All Rights Reserved.
- **********************************************************************
-@@ -34,6 +34,7 @@
- const uint8_t *input = textIn->fRawInput;
- int32_t confidence = 0;
-+ int32_t length = textIn->fRawLength;
-
-- if (input[0] == 0xFE && input[1] == 0xFF) {
-+ if (length >=2 && input[0] == 0xFE && input[1] == 0xFF) {
- confidence = 100;
- }
-@@ -58,6 +59,7 @@
- const uint8_t *input = textIn->fRawInput;
- int32_t confidence = 0;
-+ int32_t length = textIn->fRawLength;
-
-- if (input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
-+ if (length >= 4 && input[0] == 0xFF && input[1] == 0xFE && (input[2] != 0x00 || input[3] != 0x00)) {
- confidence = 100;
- }
-@@ -82,5 +84,5 @@
- int32_t confidence = 0;
-
-- if (getChar(input, 0) == 0x0000FEFFUL) {
-+ if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) {
- hasBOM = TRUE;
- }