From a1e460d9f0c05b243bc164a267e1a4f21b9bf654 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 24 Aug 2011 15:48:40 +0000 Subject: [PATCH] * apply working bep & patch for icu-4.8.1 --- dev-libs/icu/icu-4.8.1.bep | 2 +- dev-libs/icu/patches/icu-4.8.1.patch | 706 ++++++++++++++------------- 2 files changed, 373 insertions(+), 335 deletions(-) diff --git a/dev-libs/icu/icu-4.8.1.bep b/dev-libs/icu/icu-4.8.1.bep index 859df5513..423c57d5d 100644 --- a/dev-libs/icu/icu-4.8.1.bep +++ b/dev-libs/icu/icu-4.8.1.bep @@ -7,7 +7,7 @@ STATUS_HAIKU="stable" DEPEND="" BUILD { cd icu/source - CPPFLAGS="-D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1" ./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-renaming --disable-samples --disable-extras + ./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-renaming --disable-samples --disable-extras make } diff --git a/dev-libs/icu/patches/icu-4.8.1.patch b/dev-libs/icu/patches/icu-4.8.1.patch index ddbbf7a28..0db0c4abe 100644 --- a/dev-libs/icu/patches/icu-4.8.1.patch +++ b/dev-libs/icu/patches/icu-4.8.1.patch @@ -1,6 +1,33 @@ -diff -ruwN icu/source/common/normalizer2.cpp icu-haiku/source/common/normalizer2.cpp ---- icu/source/common/normalizer2.cpp 2011-07-19 21:16:24.016252928 +0000 -+++ icu-haiku/source/common/normalizer2.cpp 2011-08-16 20:33:22.315621376 +0000 +diff -ruN icu/source/common/messagepattern.cpp icu-haiku/source/common/messagepattern.cpp +--- icu/source/common/messagepattern.cpp 2011-07-19 23:16:28.046137344 +0200 ++++ icu-haiku/source/common/messagepattern.cpp 2011-08-19 15:48:48.211025920 +0200 +@@ -88,8 +88,12 @@ + int32_t length, + UErrorCode &errorCode); + UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode); +- UBool memEquals(const MessagePatternList &other, int32_t length) const { +- return 0==uprv_memcmp(a.getAlias(), other.a.getAlias(), length*sizeof(T)); ++ UBool equals(const MessagePatternList &other, int32_t length) const { ++ for (int32_t i=0; i a; +@@ -309,7 +313,7 @@ + msg==other.msg && + // parts.equals(o.parts) + partsLength==other.partsLength && +- (partsLength==0 || partsList->memEquals(*other.partsList, partsLength)); ++ (partsLength==0 || partsList->equals(*other.partsList, partsLength)); + // No need to compare numericValues if msg and parts are the same. + } + +diff -ruN icu/source/common/normalizer2.cpp icu-haiku/source/common/normalizer2.cpp +--- icu/source/common/normalizer2.cpp 2011-07-19 23:16:24.008912896 +0200 ++++ icu-haiku/source/common/normalizer2.cpp 2011-08-19 15:46:55.276824064 +0200 @@ -239,7 +239,7 @@ ReorderingBuffer &buffer, UErrorCode &errorCode) const { impl.decompose(src, limit, &buffer, errorCode); @@ -55,308 +82,9 @@ diff -ruwN icu/source/common/normalizer2.cpp icu-haiku/source/common/normalizer2 virtual UBool hasBoundaryBefore(UChar32 c) const { return impl.hasFCDBoundaryBefore(c); } virtual UBool hasBoundaryAfter(UChar32 c) const { return impl.hasFCDBoundaryAfter(c); } virtual UBool isInert(UChar32 c) const { return impl.isFCDInert(c); } -diff -ruwN icu/source/configure icu-haiku/source/configure ---- icu/source/configure 2011-07-19 21:19:38.037224448 +0000 -+++ icu-haiku/source/configure 2011-08-16 20:33:22.324009984 +0000 -@@ -7748,6 +7748,7 @@ - *-*-nto*) platform=U_QNX ;; - *-dec-osf*) platform=U_OSF ;; - *-*-beos) platform=U_BEOS ;; -+ *-*-haiku) platform=U_HAIKU ;; - *-*-irix*) platform=U_IRIX ;; - *-ncr-*) platform=U_MPRAS ;; - *) platform=U_UNKNOWN_PLATFORM ;; -diff -ruwN icu/source/configure.in icu-haiku/source/configure.in ---- icu/source/configure.in 2011-07-19 21:19:38.036700160 +0000 -+++ icu-haiku/source/configure.in 2011-08-16 20:33:22.327417856 +0000 -@@ -1286,6 +1286,7 @@ - *-*-nto*) platform=U_QNX ;; - *-dec-osf*) platform=U_OSF ;; - *-*-beos) platform=U_BEOS ;; -+ *-*-haiku) platform=U_HAIKU ;; - *-*-irix*) platform=U_IRIX ;; - *-ncr-*) platform=U_MPRAS ;; - *) platform=U_UNKNOWN_PLATFORM ;; -diff -ruwN icu/source/i18n/currfmt.h icu-haiku/source/i18n/currfmt.h ---- icu/source/i18n/currfmt.h 2011-07-19 21:16:00.066060288 +0000 -+++ icu-haiku/source/i18n/currfmt.h 2011-08-16 20:33:22.333709312 +0000 -@@ -63,7 +63,9 @@ - virtual Format* clone() const; - - -+#if (__GNUC__ > 2) - using MeasureFormat::format; -+#endif - - /** - * Override Format API. -diff -ruwN icu/source/i18n/digitlst.cpp icu-haiku/source/i18n/digitlst.cpp ---- icu/source/i18n/digitlst.cpp 2011-07-19 21:16:00.057933824 +0000 -+++ icu-haiku/source/i18n/digitlst.cpp 2011-08-16 20:33:22.338952192 +0000 -@@ -37,7 +37,9 @@ - #include - #include - #include -+#if (__GNUC__ > 2) - #include -+#endif - - // *************************************************************************** - // class DigitList -@@ -423,11 +425,15 @@ - nonConstThis->fDouble /= -1; - } - } else if (isInfinite()) { -+#if (__GNUC__ > 2) - if (std::numeric_limits::has_infinity) { - nonConstThis->fDouble = std::numeric_limits::infinity(); - } else { - nonConstThis->fDouble = std::numeric_limits::max(); - } -+#else -+ nonConstThis->fDouble = DBL_MAX; -+#endif - if (!isPositive()) { - nonConstThis->fDouble = -fDouble; - } -diff -ruwN icu/source/i18n/reldtfmt.h icu-haiku/source/i18n/reldtfmt.h ---- icu/source/i18n/reldtfmt.h 2011-07-19 21:16:06.041418752 +0000 -+++ icu-haiku/source/i18n/reldtfmt.h 2011-08-16 20:33:22.342884352 +0000 -@@ -79,7 +79,9 @@ - virtual UBool operator==(const Format& other) const; - - -+#if (__GNUC__ > 2) - using DateFormat::format; -+#endif - - /** - * Format a date or time, which is the standard millis since 24:00 GMT, Jan -diff -ruwN icu/source/i18n/unicode/choicfmt.h icu-haiku/source/i18n/unicode/choicfmt.h ---- icu/source/i18n/unicode/choicfmt.h 2011-07-19 21:15:52.046137344 +0000 -+++ icu-haiku/source/i18n/unicode/choicfmt.h 2011-08-16 20:33:22.348127232 +0000 -@@ -352,7 +352,9 @@ - virtual const UnicodeString* getFormats(int32_t& count) const; - - -+#if (__GNUC__ > 2) - using NumberFormat::format; -+#endif - - /** - * Formats a double number using this object's choices. -diff -ruwN icu/source/i18n/unicode/datefmt.h icu-haiku/source/i18n/unicode/datefmt.h ---- icu/source/i18n/unicode/datefmt.h 2011-07-19 21:15:52.042729472 +0000 -+++ icu-haiku/source/i18n/unicode/datefmt.h 2011-08-16 20:33:22.355467264 +0000 -@@ -212,7 +212,9 @@ - virtual UBool operator==(const Format&) const; - - -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Format an object to produce a string. This method handles Formattable -diff -ruwN icu/source/i18n/unicode/decimfmt.h icu-haiku/source/i18n/unicode/decimfmt.h ---- icu/source/i18n/unicode/decimfmt.h 2011-07-19 21:15:54.047710208 +0000 -+++ icu-haiku/source/i18n/unicode/decimfmt.h 2011-08-16 20:33:22.358612992 +0000 -@@ -834,7 +834,16 @@ - virtual UBool operator==(const Format& other) const; - - -+#if (__GNUC__ > 2) - using NumberFormat::format; -+#else -+ virtual UnicodeString& format(const Formattable& obj, -+ UnicodeString& appendTo, -+ FieldPositionIterator* posIter, -+ UErrorCode& status) const { -+ return NumberFormat::format(obj, appendTo, posIter, status); -+ } -+#endif - - /** - * Format a double or long number using base-10 representation. -diff -ruwN icu/source/i18n/unicode/dtitvfmt.h icu-haiku/source/i18n/unicode/dtitvfmt.h ---- icu/source/i18n/unicode/dtitvfmt.h 2011-07-19 21:15:54.049545216 +0000 -+++ icu-haiku/source/i18n/unicode/dtitvfmt.h 2011-08-16 20:33:22.364118016 +0000 -@@ -363,7 +363,9 @@ - UBool operator!=(const Format& other) const; - - -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Format an object to produce a string. This method handles Formattable -diff -ruwN icu/source/i18n/unicode/msgfmt.h icu-haiku/source/i18n/unicode/msgfmt.h ---- icu/source/i18n/unicode/msgfmt.h 2011-07-19 21:15:54.048496640 +0000 -+++ icu-haiku/source/i18n/unicode/msgfmt.h 2011-08-16 20:33:22.366477312 +0000 -@@ -615,7 +615,9 @@ - virtual const Format** getFormats(int32_t& count) const; - - -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Formats the given array of arguments into a user-readable string. -diff -ruwN icu/source/i18n/unicode/numfmt.h icu-haiku/source/i18n/unicode/numfmt.h ---- icu/source/i18n/unicode/numfmt.h 2011-07-19 21:15:54.046399488 +0000 -+++ icu-haiku/source/i18n/unicode/numfmt.h 2011-08-16 20:33:22.368836608 +0000 -@@ -212,8 +212,9 @@ - */ - virtual UBool operator==(const Format& other) const; - -- -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Format an object to produce a string. This method handles -diff -ruwN icu/source/i18n/unicode/plurfmt.h icu-haiku/source/i18n/unicode/plurfmt.h ---- icu/source/i18n/unicode/plurfmt.h 2011-07-19 21:15:52.051380224 +0000 -+++ icu-haiku/source/i18n/unicode/plurfmt.h 2011-08-16 20:33:22.371195904 +0000 -@@ -281,7 +281,9 @@ - void applyPattern(const UnicodeString& pattern, UErrorCode& status); - - -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Formats a plural message for a given number. -diff -ruwN icu/source/i18n/unicode/rbnf.h icu-haiku/source/i18n/unicode/rbnf.h ---- icu/source/i18n/unicode/rbnf.h 2011-07-19 21:15:54.041680896 +0000 -+++ icu-haiku/source/i18n/unicode/rbnf.h 2011-08-16 20:33:22.373555200 +0000 -@@ -722,7 +722,9 @@ - const Locale& locale = Locale::getDefault()); - - -+#if (__GNUC__ > 2) - using NumberFormat::format; -+#endif - - /** - * Formats the specified 32-bit number using the default ruleset. -diff -ruwN icu/source/i18n/unicode/selfmt.h icu-haiku/source/i18n/unicode/selfmt.h ---- icu/source/i18n/unicode/selfmt.h 2011-07-19 21:15:52.050331648 +0000 -+++ icu-haiku/source/i18n/unicode/selfmt.h 2011-08-16 20:33:22.375652352 +0000 -@@ -219,7 +219,9 @@ - void applyPattern(const UnicodeString& pattern, UErrorCode& status); - - -+#if (__GNUC__ > 2) - using Format::format; -+#endif - - /** - * Selects the phrase for the given keyword -diff -ruwN icu/source/i18n/unicode/smpdtfmt.h icu-haiku/source/i18n/unicode/smpdtfmt.h ---- icu/source/i18n/unicode/smpdtfmt.h 2011-07-19 21:15:52.042205184 +0000 -+++ icu-haiku/source/i18n/unicode/smpdtfmt.h 2011-08-16 20:33:22.383778816 +0000 -@@ -369,7 +369,9 @@ - virtual UBool operator==(const Format& other) const; - - -+#if (__GNUC__ > 2) - using DateFormat::format; -+#endif - - /** - * Format a date or time, which is the standard millis since 24:00 GMT, Jan -diff -ruwN icu/source/i18n/unicode/tmutfmt.h icu-haiku/source/i18n/unicode/tmutfmt.h ---- icu/source/i18n/unicode/tmutfmt.h 2011-07-19 21:15:54.046923776 +0000 -+++ icu-haiku/source/i18n/unicode/tmutfmt.h 2011-08-16 20:33:22.386138112 +0000 -@@ -162,7 +162,16 @@ - void setNumberFormat(const NumberFormat& format, UErrorCode& status); - - -+#if (__GNUC__ > 2) - using MeasureFormat::format; -+#else -+ virtual UnicodeString& format(const Formattable& obj, -+ UnicodeString& appendTo, -+ FieldPositionIterator* posIter, -+ UErrorCode& status) const { -+ return MeasureFormat::format(obj, appendTo, posIter, status); -+ } -+#endif - - /** - * Format a TimeUnitAmount. -diff -ruwN icu/source/tools/pkgdata/pkgdata.cpp icu-haiku/source/tools/pkgdata/pkgdata.cpp ---- icu/source/tools/pkgdata/pkgdata.cpp 2011-07-19 21:16:36.011010048 +0000 -+++ icu-haiku/source/tools/pkgdata/pkgdata.cpp 2011-08-16 20:33:22.388235264 +0000 -@@ -476,7 +476,7 @@ - - static int runCommand(const char* command, UBool specialHandling) { - char *cmd = NULL; -- char cmdBuffer[SMALL_BUFFER_MAX_SIZE]; -+ char cmdBuffer[64000]; - int32_t len = strlen(command); - - if (len == 0) { ---- icu/source/config/mh-haiku 2011-07-19 21:16:46.035651584 +0000 -+++ icu-haiku/source/config/mh-haiku 2011-08-16 20:45:55.674758656 +0000 -@@ -31,35 +31,35 @@ - - ## Compilation rules - %.$(STATIC_O): $(srcdir)/%.c -- $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< -+ $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< - %.o: $(srcdir)/%.c -- $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< -+ $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< - - %.$(STATIC_O): $(srcdir)/%.cpp -- $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< -+ $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< - %.o: $(srcdir)/%.cpp -- $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< -+ $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< - - - ## Dependency rules - %.d: $(srcdir)/%.c -- @echo "generating dependency information for $<" -- @$(SHELL) -ec '$(GEN_DEPS.c) $< \ -- | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -- [ -s $@ ] || rm -f $@' -+ @echo "generating dependency information for $<" -+ @$(SHELL) -ec '$(GEN_DEPS.c) $< \ -+ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+ [ -s $@ ] || rm -f $@' - - %.d: $(srcdir)/%.cpp -- @echo "generating dependency information for $<" -- @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ -- | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -- [ -s $@ ] || rm -f $@' -+ @echo "generating dependency information for $<" -+ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ -+ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ -+ [ -s $@ ] || rm -f $@' - - ## Versioned libraries rules - - %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) -- $(RM) $@ && ln -s ${ 2) + #define U_EXPORT __attribute__((visibility("default"))) + #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ + || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) +diff -ruN icu/source/common/unicode/stringtriebuilder.h icu-haiku/source/common/unicode/stringtriebuilder.h +--- icu/source/common/unicode/stringtriebuilder.h 2011-07-19 23:16:18.056623104 +0200 ++++ icu-haiku/source/common/unicode/stringtriebuilder.h 2011-08-19 15:46:55.336068608 +0200 @@ -245,6 +245,9 @@ protected: int32_t value; @@ -433,9 +173,9 @@ diff -ruwN icu/source/common/unicode/stringtriebuilder.h icu-haiku/source/common /** @internal */ virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, -diff -ruwN icu/source/common/unicode/ucharstrie.h icu-haiku/source/common/unicode/ucharstrie.h ---- icu/source/common/unicode/ucharstrie.h 2011-07-19 23:16:18.049545216 +0200 -+++ icu-haiku/source/common/unicode/ucharstrie.h 2011-08-17 18:04:50.173539328 +0200 +diff -ruN icu/source/common/unicode/ucharstrie.h icu-haiku/source/common/unicode/ucharstrie.h +--- icu/source/common/unicode/ucharstrie.h 2011-07-19 23:16:18.058720256 +0200 ++++ icu-haiku/source/common/unicode/ucharstrie.h 2011-08-19 15:46:55.338165760 +0200 @@ -368,6 +368,9 @@ // but the code looks more confusing that way.) UVector32 *stack_; @@ -446,9 +186,9 @@ diff -ruwN icu/source/common/unicode/ucharstrie.h icu-haiku/source/common/unicod private: friend class UCharsTrieBuilder; -diff -ruwN icu/source/common/unicode/ucharstriebuilder.h icu-haiku/source/common/unicode/ucharstriebuilder.h ---- icu/source/common/unicode/ucharstriebuilder.h 2011-07-19 23:16:18.050331648 +0200 -+++ icu-haiku/source/common/unicode/ucharstriebuilder.h 2011-08-17 18:02:52.647495680 +0200 +diff -ruN icu/source/common/unicode/ucharstriebuilder.h icu-haiku/source/common/unicode/ucharstriebuilder.h +--- icu/source/common/unicode/ucharstriebuilder.h 2011-07-19 23:16:18.059244544 +0200 ++++ icu-haiku/source/common/unicode/ucharstriebuilder.h 2011-08-19 15:46:55.339738624 +0200 @@ -145,6 +145,9 @@ private: const UChar *s; @@ -459,9 +199,94 @@ diff -ruwN icu/source/common/unicode/ucharstriebuilder.h icu-haiku/source/common virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const; -diff -ruwN icu/source/i18n/alphaindex.cpp icu-haiku/source/i18n/alphaindex.cpp ---- icu/source/i18n/alphaindex.cpp 2011-07-19 23:16:04.038273024 +0200 -+++ icu-haiku/source/i18n/alphaindex.cpp 2011-08-17 17:40:50.383254528 +0200 +diff -ruN icu/source/config/mh-haiku icu-haiku/source/config/mh-haiku +--- icu/source/config/mh-haiku 2011-07-19 23:16:46.026214400 +0200 ++++ icu-haiku/source/config/mh-haiku 2011-08-19 15:46:55.328990720 +0200 +@@ -17,6 +17,9 @@ + LIBCPPFLAGS = + THREADSCPPFLAGS = + ++# ++CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1 ++ + ## Compiler switch to embed a runtime search path + LD_RPATH= + LD_RPATH_PRE = -Wl,-rpath, +@@ -31,35 +34,35 @@ + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c +- $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< ++ $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< + %.o: $(srcdir)/%.c +- $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< ++ $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $< + + %.$(STATIC_O): $(srcdir)/%.cpp +- $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< ++ $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $< + %.o: $(srcdir)/%.cpp +- $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< ++ $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $< + + + ## Dependency rules + %.d: $(srcdir)/%.c +- @echo "generating dependency information for $<" +- @$(SHELL) -ec '$(GEN_DEPS.c) $< \ +- | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ +- [ -s $@ ] || rm -f $@' ++ @echo "generating dependency information for $<" ++ @$(SHELL) -ec '$(GEN_DEPS.c) $< \ ++ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ ++ [ -s $@ ] || rm -f $@' + + %.d: $(srcdir)/%.cpp +- @echo "generating dependency information for $<" +- @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ +- | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ +- [ -s $@ ] || rm -f $@' ++ @echo "generating dependency information for $<" ++ @$(SHELL) -ec '$(GEN_DEPS.cc) $< \ ++ | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \ ++ [ -s $@ ] || rm -f $@' + + ## Versioned libraries rules + + %.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) +- $(RM) $@ && ln -s ${ 2) + using MeasureFormat::format; ++#endif + + /** + * Override Format API. +diff -ruN icu/source/i18n/digitlst.cpp icu-haiku/source/i18n/digitlst.cpp +--- icu/source/i18n/digitlst.cpp 2011-07-19 23:16:00.050593792 +0200 ++++ icu-haiku/source/i18n/digitlst.cpp 2011-08-19 15:46:55.295698432 +0200 +@@ -37,7 +37,9 @@ + #include + #include + #include ++#if (__GNUC__ > 2) + #include ++#endif + + // *************************************************************************** + // class DigitList +@@ -423,11 +425,15 @@ + nonConstThis->fDouble /= -1; + } + } else if (isInfinite()) { ++#if (__GNUC__ > 2) + if (std::numeric_limits::has_infinity) { + nonConstThis->fDouble = std::numeric_limits::infinity(); + } else { + nonConstThis->fDouble = std::numeric_limits::max(); + } ++#else ++ nonConstThis->fDouble = DBL_MAX; ++#endif + if (!isPositive()) { + nonConstThis->fDouble = -fDouble; + } +diff -ruN icu/source/i18n/reldtfmt.h icu-haiku/source/i18n/reldtfmt.h +--- icu/source/i18n/reldtfmt.h 2011-07-19 23:16:06.034078720 +0200 ++++ icu-haiku/source/i18n/reldtfmt.h 2011-08-19 15:46:55.297533440 +0200 +@@ -79,7 +79,9 @@ + virtual UBool operator==(const Format& other) const; + + ++#if (__GNUC__ > 2) + using DateFormat::format; ++#endif + + /** + * Format a date or time, which is the standard millis since 24:00 GMT, Jan +diff -ruN icu/source/i18n/unicode/alphaindex.h icu-haiku/source/i18n/unicode/alphaindex.h +--- icu/source/i18n/unicode/alphaindex.h 2011-07-19 23:15:52.042467328 +0200 ++++ icu-haiku/source/i18n/unicode/alphaindex.h 2011-08-19 15:46:55.344719360 +0200 @@ -588,6 +588,9 @@ Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, const void *data); ~Record(); @@ -539,15 +419,173 @@ diff -ruwN icu/source/i18n/unicode/alphaindex.h icu-haiku/source/i18n/unicode/al /** * Holds all user records before they are distributed into buckets. -diff -ruwN icu/source/common/unicode/platform.h.in icu-haiku/source/common/unicode/platform.h.in ---- icu/source/common/unicode/platform.h.in 2011-07-19 23:16:18.046661632 +0200 -+++ icu-haiku/source/common/unicode/platform.h.in 2011-08-17 23:52:31.632553472 +0200 -@@ -299,7 +299,7 @@ +diff -ruN icu/source/i18n/unicode/choicfmt.h icu-haiku/source/i18n/unicode/choicfmt.h +--- icu/source/i18n/unicode/choicfmt.h 2011-07-19 23:15:52.038797312 +0200 ++++ icu-haiku/source/i18n/unicode/choicfmt.h 2011-08-19 15:46:55.300154880 +0200 +@@ -352,7 +352,9 @@ + virtual const UnicodeString* getFormats(int32_t& count) const; - #ifdef U_STATIC_IMPLEMENTATION - #define U_EXPORT --#elif @U_USE_GCC_VISIBILITY_ATTRIBUTE@ -+#elif (@U_USE_GCC_VISIBILITY_ATTRIBUTE@) && (__GNUC__ > 2) - #define U_EXPORT __attribute__((visibility("default"))) - #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ - || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) + ++#if (__GNUC__ > 2) + using NumberFormat::format; ++#endif + + /** + * Formats a double number using this object's choices. +diff -ruN icu/source/i18n/unicode/datefmt.h icu-haiku/source/i18n/unicode/datefmt.h +--- icu/source/i18n/unicode/datefmt.h 2011-07-19 23:15:52.035389440 +0200 ++++ icu-haiku/source/i18n/unicode/datefmt.h 2011-08-19 15:46:55.302514176 +0200 +@@ -212,7 +212,9 @@ + virtual UBool operator==(const Format&) const; + + ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Format an object to produce a string. This method handles Formattable +diff -ruN icu/source/i18n/unicode/decimfmt.h icu-haiku/source/i18n/unicode/decimfmt.h +--- icu/source/i18n/unicode/decimfmt.h 2011-07-19 23:15:54.040370176 +0200 ++++ icu-haiku/source/i18n/unicode/decimfmt.h 2011-08-19 15:46:55.305397760 +0200 +@@ -834,7 +834,16 @@ + virtual UBool operator==(const Format& other) const; + + ++#if (__GNUC__ > 2) + using NumberFormat::format; ++#else ++ virtual UnicodeString& format(const Formattable& obj, ++ UnicodeString& appendTo, ++ FieldPositionIterator* posIter, ++ UErrorCode& status) const { ++ return NumberFormat::format(obj, appendTo, posIter, status); ++ } ++#endif + + /** + * Format a double or long number using base-10 representation. +diff -ruN icu/source/i18n/unicode/dtitvfmt.h icu-haiku/source/i18n/unicode/dtitvfmt.h +--- icu/source/i18n/unicode/dtitvfmt.h 2011-07-19 23:15:54.042467328 +0200 ++++ icu-haiku/source/i18n/unicode/dtitvfmt.h 2011-08-19 15:46:55.307757056 +0200 +@@ -363,7 +363,9 @@ + UBool operator!=(const Format& other) const; + + ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Format an object to produce a string. This method handles Formattable +diff -ruN icu/source/i18n/unicode/msgfmt.h icu-haiku/source/i18n/unicode/msgfmt.h +--- icu/source/i18n/unicode/msgfmt.h 2011-07-19 23:15:54.041156608 +0200 ++++ icu-haiku/source/i18n/unicode/msgfmt.h 2011-08-19 15:46:55.310116352 +0200 +@@ -615,7 +615,9 @@ + virtual const Format** getFormats(int32_t& count) const; + + ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Formats the given array of arguments into a user-readable string. +diff -ruN icu/source/i18n/unicode/numfmt.h icu-haiku/source/i18n/unicode/numfmt.h +--- icu/source/i18n/unicode/numfmt.h 2011-07-19 23:15:54.039059456 +0200 ++++ icu-haiku/source/i18n/unicode/numfmt.h 2011-08-19 15:46:55.312213504 +0200 +@@ -212,8 +212,9 @@ + */ + virtual UBool operator==(const Format& other) const; + +- ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Format an object to produce a string. This method handles +diff -ruN icu/source/i18n/unicode/plurfmt.h icu-haiku/source/i18n/unicode/plurfmt.h +--- icu/source/i18n/unicode/plurfmt.h 2011-07-19 23:15:52.044040192 +0200 ++++ icu-haiku/source/i18n/unicode/plurfmt.h 2011-08-19 15:46:55.314310656 +0200 +@@ -281,7 +281,9 @@ + void applyPattern(const UnicodeString& pattern, UErrorCode& status); + + ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Formats a plural message for a given number. +diff -ruN icu/source/i18n/unicode/rbnf.h icu-haiku/source/i18n/unicode/rbnf.h +--- icu/source/i18n/unicode/rbnf.h 2011-07-19 23:15:54.034340864 +0200 ++++ icu-haiku/source/i18n/unicode/rbnf.h 2011-08-19 15:46:55.316932096 +0200 +@@ -722,7 +722,9 @@ + const Locale& locale = Locale::getDefault()); + + ++#if (__GNUC__ > 2) + using NumberFormat::format; ++#endif + + /** + * Formats the specified 32-bit number using the default ruleset. +diff -ruN icu/source/i18n/unicode/selfmt.h icu-haiku/source/i18n/unicode/selfmt.h +--- icu/source/i18n/unicode/selfmt.h 2011-07-19 23:15:52.042991616 +0200 ++++ icu-haiku/source/i18n/unicode/selfmt.h 2011-08-19 15:46:55.318767104 +0200 +@@ -219,7 +219,9 @@ + void applyPattern(const UnicodeString& pattern, UErrorCode& status); + + ++#if (__GNUC__ > 2) + using Format::format; ++#endif + + /** + * Selects the phrase for the given keyword +diff -ruN icu/source/i18n/unicode/smpdtfmt.h icu-haiku/source/i18n/unicode/smpdtfmt.h +--- icu/source/i18n/unicode/smpdtfmt.h 2011-07-19 23:15:52.035127296 +0200 ++++ icu-haiku/source/i18n/unicode/smpdtfmt.h 2011-08-19 15:46:55.321126400 +0200 +@@ -369,7 +369,9 @@ + virtual UBool operator==(const Format& other) const; + + ++#if (__GNUC__ > 2) + using DateFormat::format; ++#endif + + /** + * Format a date or time, which is the standard millis since 24:00 GMT, Jan +diff -ruN icu/source/i18n/unicode/tmutfmt.h icu-haiku/source/i18n/unicode/tmutfmt.h +--- icu/source/i18n/unicode/tmutfmt.h 2011-07-19 23:15:54.039583744 +0200 ++++ icu-haiku/source/i18n/unicode/tmutfmt.h 2011-08-19 15:46:55.322961408 +0200 +@@ -162,7 +162,16 @@ + void setNumberFormat(const NumberFormat& format, UErrorCode& status); + + ++#if (__GNUC__ > 2) + using MeasureFormat::format; ++#else ++ virtual UnicodeString& format(const Formattable& obj, ++ UnicodeString& appendTo, ++ FieldPositionIterator* posIter, ++ UErrorCode& status) const { ++ return MeasureFormat::format(obj, appendTo, posIter, status); ++ } ++#endif + + /** + * Format a TimeUnitAmount. +diff -ruN icu/source/tools/pkgdata/pkgdata.cpp icu-haiku/source/tools/pkgdata/pkgdata.cpp +--- icu/source/tools/pkgdata/pkgdata.cpp 2011-07-19 23:16:36.003670016 +0200 ++++ icu-haiku/source/tools/pkgdata/pkgdata.cpp 2011-08-19 15:46:55.326107136 +0200 +@@ -476,7 +476,7 @@ + + static int runCommand(const char* command, UBool specialHandling) { + char *cmd = NULL; +- char cmdBuffer[SMALL_BUFFER_MAX_SIZE]; ++ char cmdBuffer[64000]; + int32_t len = strlen(command); + + if (len == 0) {