mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
add icu-4.8.1, which contains very interesting stuff relating to message formatting
This commit is contained in:
20
dev-libs/icu/icu-4.8.1.bep
Normal file
20
dev-libs/icu/icu-4.8.1.bep
Normal file
@@ -0,0 +1,20 @@
|
||||
DESCRIPTION="icu"
|
||||
HOMEPAGE="http://www.icu-project.org"
|
||||
SRC_URI="http://download.icu-project.org/files/icu4c/4.8.1/icu4c-4_8_1-src.tgz"
|
||||
CHECKSUM_MD5="af36f635271a239d76d038d6cf8da8df"
|
||||
REVISION="1"
|
||||
STATUS_HAIKU="stable"
|
||||
DEPEND=""
|
||||
BUILD {
|
||||
cd icu/source
|
||||
CPPFLAGS="-D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1" ./configure --prefix=`finddir B_COMMON_DIRECTORY`
|
||||
make
|
||||
}
|
||||
|
||||
INSTALL {
|
||||
cd icu/source
|
||||
make install
|
||||
}
|
||||
|
||||
LICENSE="ICU"
|
||||
COPYRIGHT="1997-2011 IBM Corporation and others."
|
||||
541
dev-libs/icu/patches/icu-4.8.1.patch
Normal file
541
dev-libs/icu/patches/icu-4.8.1.patch
Normal file
@@ -0,0 +1,541 @@
|
||||
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
|
||||
@@ -239,7 +239,7 @@
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
impl.decompose(src, limit, &buffer, errorCode);
|
||||
}
|
||||
- using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
virtual void
|
||||
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
|
||||
UnicodeString &safeMiddle,
|
||||
@@ -250,7 +250,7 @@
|
||||
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
|
||||
return impl.decompose(src, limit, NULL, errorCode);
|
||||
}
|
||||
- using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
|
||||
return impl.isDecompYes(impl.getNorm16(c)) ? UNORM_YES : UNORM_NO;
|
||||
}
|
||||
@@ -270,7 +270,7 @@
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
|
||||
}
|
||||
- using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
virtual void
|
||||
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
|
||||
UnicodeString &safeMiddle,
|
||||
@@ -313,7 +313,7 @@
|
||||
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const {
|
||||
return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
|
||||
}
|
||||
- using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
|
||||
return impl.getCompQuickCheck(impl.getNorm16(c));
|
||||
}
|
||||
@@ -340,7 +340,7 @@
|
||||
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
|
||||
impl.makeFCD(src, limit, &buffer, errorCode);
|
||||
}
|
||||
- using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
|
||||
virtual void
|
||||
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
|
||||
UnicodeString &safeMiddle,
|
||||
@@ -351,7 +351,7 @@
|
||||
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
|
||||
return impl.makeFCD(src, limit, NULL, errorCode);
|
||||
}
|
||||
- using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
+// using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
|
||||
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 <limits.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
+#if (__GNUC__ > 2)
|
||||
#include <limits>
|
||||
+#endif
|
||||
|
||||
// ***************************************************************************
|
||||
// class DigitList
|
||||
@@ -423,11 +425,15 @@
|
||||
nonConstThis->fDouble /= -1;
|
||||
}
|
||||
} else if (isInfinite()) {
|
||||
+#if (__GNUC__ > 2)
|
||||
if (std::numeric_limits<double>::has_infinity) {
|
||||
nonConstThis->fDouble = std::numeric_limits<double>::infinity();
|
||||
} else {
|
||||
nonConstThis->fDouble = std::numeric_limits<double>::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 ${<F} $@
|
||||
+ $(RM) $@ && ln -s ${<F} $@
|
||||
%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
|
||||
- $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
|
||||
+ $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
|
||||
|
||||
## Bind internal references
|
||||
|
||||
diff -ruwN icu/source/common/unicode/bytestrie.h icu-haiku/source/common/unicode/bytestrie.h
|
||||
--- icu/source/common/unicode/bytestrie.h 2011-07-19 23:16:16.044040192 +0200
|
||||
+++ icu-haiku/source/common/unicode/bytestrie.h 2011-08-17 18:12:08.356253696 +0200
|
||||
@@ -338,6 +338,9 @@
|
||||
// but the code looks more confusing that way.)
|
||||
UVector32 *stack_;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class Iterator;
|
||||
+#endif
|
||||
|
||||
private:
|
||||
friend class BytesTrieBuilder;
|
||||
diff -ruwN icu/source/common/unicode/bytestriebuilder.h icu-haiku/source/common/unicode/bytestriebuilder.h
|
||||
--- icu/source/common/unicode/bytestriebuilder.h 2011-07-19 23:16:16.044826624 +0200
|
||||
+++ icu-haiku/source/common/unicode/bytestriebuilder.h 2011-08-17 18:11:41.677904384 +0200
|
||||
@@ -141,6 +141,9 @@
|
||||
private:
|
||||
const char *s;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class BTLinearMatchNode;
|
||||
+#endif
|
||||
|
||||
virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length,
|
||||
Node *nextNode) const;
|
||||
diff -ruwN 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.047710208 +0200
|
||||
+++ icu-haiku/source/common/unicode/stringtriebuilder.h 2011-08-17 18:09:45.641728512 +0200
|
||||
@@ -245,6 +245,9 @@
|
||||
protected:
|
||||
int32_t value;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class FinalValueNode;
|
||||
+#endif
|
||||
|
||||
/** @internal */
|
||||
class ValueNode : public Node {
|
||||
@@ -272,6 +275,9 @@
|
||||
protected:
|
||||
Node *next;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class IntermediateValueNode;
|
||||
+#endif
|
||||
|
||||
/** @internal */
|
||||
class LinearMatchNode : public ValueNode {
|
||||
@@ -323,6 +329,9 @@
|
||||
int32_t values[kMaxBranchLinearSubNodeLength];
|
||||
UChar units[kMaxBranchLinearSubNodeLength];
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class ListBranchNode;
|
||||
+#endif
|
||||
|
||||
/** @internal */
|
||||
class SplitBranchNode : public BranchNode {
|
||||
@@ -339,6 +348,9 @@
|
||||
Node *lessThan;
|
||||
Node *greaterOrEqual;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class SplitBranchNode;
|
||||
+#endif
|
||||
|
||||
// Branch head node, for writing the actual node lead unit.
|
||||
/** @internal */
|
||||
@@ -354,6 +366,9 @@
|
||||
int32_t length;
|
||||
Node *next; // A branch sub-node.
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class BranchHeadNode;
|
||||
+#endif
|
||||
|
||||
/** @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
|
||||
@@ -368,6 +368,9 @@
|
||||
// but the code looks more confusing that way.)
|
||||
UVector32 *stack_;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class Iterator;
|
||||
+#endif
|
||||
|
||||
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
|
||||
@@ -145,6 +145,9 @@
|
||||
private:
|
||||
const UChar *s;
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend class UCTLinearMatchNode;
|
||||
+#endif
|
||||
|
||||
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
|
||||
@@ -196,7 +196,7 @@
|
||||
|
||||
UnicodeSet labelSet;
|
||||
for (int32_t psIndex=0; psIndex<preferenceSorting.size(); psIndex++) {
|
||||
- UnicodeString item = *static_cast<const UnicodeString *>(preferenceSorting.elementAt(psIndex));
|
||||
+ UnicodeString item = *static_cast<UnicodeString *>(preferenceSorting.elementAt(psIndex));
|
||||
// TODO: Since preferenceSorting was originally populated from the contents of a UnicodeSet,
|
||||
// is it even possible for duplicates to show up in this check?
|
||||
if (labelSet.contains(item)) {
|
||||
@@ -240,7 +240,7 @@
|
||||
int32_t count = 0;
|
||||
int32_t old = -1;
|
||||
for (int32_t srcIndex=0; srcIndex<labels_->size(); srcIndex++) {
|
||||
- const UnicodeString *str = static_cast<const UnicodeString *>(labels_->elementAt(srcIndex));
|
||||
+ const UnicodeString *str = static_cast<UnicodeString *>(labels_->elementAt(srcIndex));
|
||||
++count;
|
||||
const int32_t bump = count * maxLabelCount_ / size;
|
||||
if (bump == old) {
|
||||
@@ -528,7 +528,7 @@
|
||||
const UnicodeString &AlphabeticIndex::getOverflowComparisonString(const UnicodeString &lowerLimit, UErrorCode &/*status*/) {
|
||||
for (int32_t i=0; i<firstScriptCharacters_->size(); i++) {
|
||||
const UnicodeString *s =
|
||||
- static_cast<const UnicodeString *>(firstScriptCharacters_->elementAt(i));
|
||||
+ const_cast<const UnicodeString *>(static_cast<UnicodeString *>(firstScriptCharacters_->elementAt(i)));
|
||||
if (collator_->compare(*s, lowerLimit) > 0) {
|
||||
return *s;
|
||||
}
|
||||
@@ -735,8 +735,10 @@
|
||||
sortCollateComparator(const void *context, const void *left, const void *right) {
|
||||
const UHashTok *leftTok = static_cast<const UHashTok *>(left);
|
||||
const UHashTok *rightTok = static_cast<const UHashTok *>(right);
|
||||
- const UnicodeString *leftString = static_cast<const UnicodeString *>(leftTok->pointer);
|
||||
- const UnicodeString *rightString = static_cast<const UnicodeString *>(rightTok->pointer);
|
||||
+ const UnicodeString *leftString
|
||||
+ = const_cast<const UnicodeString *>(static_cast<UnicodeString *>(leftTok->pointer));
|
||||
+ const UnicodeString *rightString
|
||||
+ = const_cast<const UnicodeString *>(static_cast<UnicodeString *>(rightTok->pointer));
|
||||
const Collator *col = static_cast<const Collator *>(context);
|
||||
|
||||
if (leftString == rightString) {
|
||||
@@ -760,8 +762,10 @@
|
||||
recordCompareFn(const void *context, const void *left, const void *right) {
|
||||
const UHashTok *leftTok = static_cast<const UHashTok *>(left);
|
||||
const UHashTok *rightTok = static_cast<const UHashTok *>(right);
|
||||
- const AlphabeticIndex::Record *leftRec = static_cast<const AlphabeticIndex::Record *>(leftTok->pointer);
|
||||
- const AlphabeticIndex::Record *rightRec = static_cast<const AlphabeticIndex::Record *>(rightTok->pointer);
|
||||
+ const AlphabeticIndex::Record *leftRec
|
||||
+ = const_cast<const AlphabeticIndex::Record *>(static_cast<AlphabeticIndex::Record *>(leftTok->pointer));
|
||||
+ const AlphabeticIndex::Record *rightRec
|
||||
+ = const_cast<const AlphabeticIndex::Record *>(static_cast<AlphabeticIndex::Record *>(rightTok->pointer));
|
||||
const Collator *col = static_cast<const Collator *>(context);
|
||||
|
||||
Collator::EComparisonResult r = col->compare(leftRec->sortingName_, rightRec->sortingName_);
|
||||
@@ -1087,8 +1091,8 @@
|
||||
PreferenceComparator(const void *context, const void *left, const void *right) {
|
||||
const UHashTok *leftTok = static_cast<const UHashTok *>(left);
|
||||
const UHashTok *rightTok = static_cast<const UHashTok *>(right);
|
||||
- const UnicodeString *s1 = static_cast<const UnicodeString *>(leftTok->pointer);
|
||||
- const UnicodeString *s2 = static_cast<const UnicodeString *>(rightTok->pointer);
|
||||
+ const UnicodeString *s1 = const_cast<const UnicodeString *>(static_cast<UnicodeString *>(leftTok->pointer));
|
||||
+ const UnicodeString *s2 = const_cast<const UnicodeString *>(static_cast<UnicodeString *>(rightTok->pointer));
|
||||
UErrorCode &status = *(UErrorCode *)(context); // Cast off both static and const.
|
||||
if (s1 == s2) {
|
||||
return 0;
|
||||
diff -ruwN 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.031457280 +0200
|
||||
+++ icu-haiku/source/i18n/unicode/alphaindex.h 2011-08-17 18:03:14.691011584 +0200
|
||||
@@ -588,6 +588,9 @@
|
||||
Record(AlphabeticIndex *alphaIndex, const UnicodeString &name, const void *data);
|
||||
~Record();
|
||||
};
|
||||
+#if (__GNUC__ == 2)
|
||||
+ friend struct Record;
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* Holds all user records before they are distributed into buckets.
|
||||
Reference in New Issue
Block a user