icu: Remove old recipes.

This commit is contained in:
Augustin Cavalier
2019-05-14 14:05:03 -04:00
parent 5cd05c3696
commit 6f4ff0c44a
11 changed files with 0 additions and 5084 deletions

View File

@@ -1,144 +0,0 @@
SUMMARY="International Components for Unicode (ICU)"
HOMEPAGE="http://www.icu-project.org"
LICENSE="ICU"
COPYRIGHT="1997-2011 IBM Corporation and others."
SOURCE_URI="http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz"
CHECKSUM_SHA256="0a70491c5fdfc5a0fa7429f820da73951e07d59a268b3d8ffe052eec65820ca1"
REVISION="4"
ARCHITECTURES="x86_gcc2 x86 x86_64 arm"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PATCHES="icu-4.8.1.1.patch"
PROVIDES="
icu$secondaryArchSuffix = $portVersion compat >= 4.8
lib:libicudata$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicui18n$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicuio$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicule$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libiculx$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicutest$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicutu$secondaryArchSuffix = 48.1.1 compat >= 48
lib:libicuuc$secondaryArchSuffix = 48.1.1 compat >= 48
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
"
SOURCE_DIR="icu"
BUILD()
{
cd source
runConfigure ./configure \
--disable-renaming --disable-samples --disable-extras
make $jobArgs
}
INSTALL()
{
cd source
make install
prepareInstalledDevelLibs \
libicudata \
libicui18n \
libicuio \
libicule \
libiculx \
libicutu \
libicuuc
fixPkgconfig
# Rename the data/icu directory when built for the secondary architecture,
# so that it doesn't clash with the primary package's.
if [ -n "$secondaryArchSuffix" ]; then
mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
# TODO: The icu-config, the Makefile.inc, and possibly other files need
# to be adjusted as well. They are probably also not quite correct for
# the primary architecture (lib vs. develop/lib).
fi
# devel package
packageEntries devel \
$developDir \
$dataDir \
$libDir/icu \
$binDir/icu-config
# main package cleanup
rm -r $binDir
}
TEST()
{
cd source
make check
}
DESCRIPTION="
ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode \
and Globalization support for software applications. ICU is widely portable \
and gives applications the same results on all platforms and between C/C++ and \
Java software.
ICU is released under a nonrestrictive open source license that is suitable \
for use with both commercial software and with other open source or free \
software.
Here are a few highlights of the services provided by ICU:
* Code Page Conversion: Convert text data to or from Unicode and nearly any \
other character set or encoding. ICU's conversion tables are based on charset \
data collected by IBM over the course of many decades, and is the most \
complete available anywhere.
* Collation: Compare strings according to the conventions and standards of a \
particular language, region or country. ICU's collation is based on the \
Unicode Collation Algorithm plus locale-specific comparison rules from the \
Common Locale Data Repository, a comprehensive source for this type of data.
* Formatting: Format numbers, dates, times and currency amounts according the \
conventions of a chosen locale. This includes translating month and day names \
into the selected language, choosing appropriate abbreviations, ordering \
fields correctly, etc. This data also comes from the Common Locale Data \
Repository.
* Time Calculations: Multiple types of calendars are provided beyond the \
traditional Gregorian calendar. A thorough set of timezone calculation APIs \
are provided.
* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
access to all of the many Unicode character properties, Unicode Normalization, \
Case Folding and other fundamental operations as specified by the Unicode \
Standard.
* Regular Expression: ICU's regular expressions fully support Unicode while \
providing very competitive performance.
* Bidi: support for handling text containing a mixture of left to right \
(English) and right to left (Arabic or Hebrew) data.
* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
a range of text, or identify locations that would be suitable for line \
wrapping when displaying the text.
"
# ----- devel package -------------------------------------------------------
SUMMARY_devel="The ICU development files"
PROVIDES_devel="
icu${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 4.8
devel:libicudata${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicui18n${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicuio${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicule${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libiculx${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicutest${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicutu${secondaryArchSuffix} = 48.1.1 compat >= 48
devel:libicuuc${secondaryArchSuffix} = 48.1.1 compat >= 48
"
REQUIRES_devel="
icu${secondaryArchSuffix} == $portVersion base
"

View File

@@ -1,166 +0,0 @@
SUMMARY="International Components for Unicode (ICU)"
HOMEPAGE="http://www.icu-project.org"
LICENSE="ICU"
COPYRIGHT="1997-2014 IBM Corporation and others."
SOURCE_URI="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-54_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2015f.tar.gz#noarchive"
SOURCE_URI_3="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-54_1-data.zip#noarchive"
CHECKSUM_SHA256="d42bc9a8ca6a91c55eb0925c279f49e5b508d51ef26ac9850d9be55de5bb8ab3"
CHECKSUM_SHA256_2="959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d"
CHECKSUM_SHA256_3="ad99d024cd06de90f78ea9c3f145c456ab4a021d2110bd110a986a50d3f2b2b7"
REVISION="2"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 arm"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
icu54$secondaryArchSuffix = $portVersion compat >= 54
lib:libicudata$secondaryArchSuffix = 54.1 compat >= 54
lib:libicui18n$secondaryArchSuffix = 54.1 compat >= 54
lib:libicuio$secondaryArchSuffix = 54.1 compat >= 54
lib:libicule$secondaryArchSuffix = 54.1 compat >= 54
lib:libiculx$secondaryArchSuffix = 54.1 compat >= 54
lib:libicutest$secondaryArchSuffix = 54.1 compat >= 54
lib:libicutu$secondaryArchSuffix = 54.1 compat >= 54
lib:libicuuc$secondaryArchSuffix = 54.1 compat >= 54
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
REQUIRES+="
"
fi
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:sed
cmd:unzip
cmd:tar
"
SOURCE_DIR="icu"
PATCHES="icu-54.1.patchset"
BUILD()
{
cd source
cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
unzip -oq ../../../sources-3/icu4c-54_1-data.zip
rm -f data/in/icudt54l.dat
autoconf
runConfigure ./configure \
--disable-renaming --disable-samples --disable-extras
make $jobArgs
}
INSTALL()
{
cd source
make install
prepareInstalledDevelLibs \
libicudata \
libicui18n \
libicuio \
libicule \
libiculx \
libicutu \
libicuuc
fixPkgconfig
# Update icu-config to point to the develop/lib dir
fixDevelopLibDirReferences \
$binDir/icu-config
# Rename the data/icu directory when built for the secondary architecture,
# so that it doesn't clash with the primary package's.
if [ -n "$secondaryArchSuffix" ]; then
mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
# TODO: The icu-config, the Makefile.inc, and possibly other files need
# to be adjusted as well. They are probably also not quite correct for
# the primary architecture (lib vs. develop/lib).
fi
# devel package
packageEntries devel \
$developDir \
$dataDir/icu \
$libDir/icu \
$binDir/icu-config
# main package cleanup
rm -r $binDir
}
TEST()
{
cd source
make check
}
DESCRIPTION="
ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode \
and Globalization support for software applications. ICU is widely portable \
and gives applications the same results on all platforms and between C/C++ and \
Java software.
ICU is released under a nonrestrictive open source license that is suitable \
for use with both commercial software and with other open source or free \
software.
Here are a few highlights of the services provided by ICU:
* Code Page Conversion: Convert text data to or from Unicode and nearly any \
other character set or encoding. ICU's conversion tables are based on charset \
data collected by IBM over the course of many decades, and is the most \
complete available anywhere.
* Collation: Compare strings according to the conventions and standards of a \
particular language, region or country. ICU's collation is based on the \
Unicode Collation Algorithm plus locale-specific comparison rules from the \
Common Locale Data Repository, a comprehensive source for this type of data.
* Formatting: Format numbers, dates, times and currency amounts according the \
conventions of a chosen locale. This includes translating month and day names \
into the selected language, choosing appropriate abbreviations, ordering \
fields correctly, etc. This data also comes from the Common Locale Data \
Repository.
* Time Calculations: Multiple types of calendars are provided beyond the \
traditional Gregorian calendar. A thorough set of timezone calculation APIs \
are provided.
* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
access to all of the many Unicode character properties, Unicode Normalization, \
Case Folding and other fundamental operations as specified by the Unicode \
Standard.
* Regular Expression: ICU's regular expressions fully support Unicode while \
providing very competitive performance.
* Bidi: support for handling text containing a mixture of left to right \
(English) and right to left (Arabic or Hebrew) data.
* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
a range of text, or identify locations that would be suitable for line \
wrapping when displaying the text.
"
# ----- devel package -------------------------------------------------------
SUMMARY_devel="The ICU development files"
PROVIDES_devel="
icu54${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 54
devel:libicudata${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicui18n${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicuio${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicule${secondaryArchSuffix} = 54.1 compat >= 54
devel:libiculx${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicutest${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicutu${secondaryArchSuffix} = 54.1 compat >= 54
devel:libicuuc${secondaryArchSuffix} = 54.1 compat >= 54
"
REQUIRES_devel="
icu54${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
icu${secondaryArchSuffix}_devel
"

View File

@@ -1,169 +0,0 @@
SUMMARY="Libraries to support Unicode and globalization"
SUMMARY_devel="The ICU development files"
DESCRIPTION="International Components for Unicode (ICU) is a mature, widely \
used set of C/C++ and Java libraries providing Unicode and Globalization \
support for software applications. ICU is widely portable and gives \
applications the same results on all platforms and between C/C++ and Java \
software.
ICU is released under a nonrestrictive open source license that is suitable \
for use with both commercial software and with other open source or free \
software.
Here are a few highlights of the services provided by ICU:
* Code Page Conversion: Convert text data to or from Unicode and nearly any \
other character set or encoding. ICU's conversion tables are based on charset \
data collected by IBM over the course of many decades, and is the most \
complete available anywhere.
* Collation: Compare strings according to the conventions and standards of a \
particular language, region or country. ICU's collation is based on the \
Unicode Collation Algorithm plus locale-specific comparison rules from the \
Common Locale Data Repository, a comprehensive source for this type of data.
* Formatting: Format numbers, dates, times and currency amounts according the \
conventions of a chosen locale. This includes translating month and day names \
into the selected language, choosing appropriate abbreviations, ordering \
fields correctly, etc. This data also comes from the Common Locale Data \
Repository.
* Time Calculations: Multiple types of calendars are provided beyond the \
traditional Gregorian calendar. A thorough set of timezone calculation APIs \
are provided.
* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
access to all of the many Unicode character properties, Unicode Normalization, \
Case Folding and other fundamental operations as specified by the Unicode \
Standard.
* Regular Expression: ICU's regular expressions fully support Unicode while \
providing very competitive performance.
* Bidi: support for handling text containing a mixture of left to right \
(English) and right to left (Arabic or Hebrew) data.
* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
a range of text, or identify locations that would be suitable for line \
wrapping when displaying the text."
HOMEPAGE="http://www.icu-project.org"
COPYRIGHT="1995-2015 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-55_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2015g.tar.gz#noarchive"
SOURCE_URI_3="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-55_1-data.zip#noarchive"
CHECKSUM_SHA256="e16b22cbefdd354bec114541f7849a12f8fc2015320ca5282ee4fd787571457b"
CHECKSUM_SHA256_2="b923cdbf078491696b17bc8d069c74bce73fabc5774629da2f410c9b31576161"
CHECKSUM_SHA256_3="84ae6a6512b6f38b417497d05e4ed90d8fa7447b46db9905032354c8574b8f59"
SOURCE_DIR="icu"
PATCHES="icu-55.1.patchset"
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
PATCHES+="
"icu-55.1.gcc2.patchset"
"
fi
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 arm"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
icu55$secondaryArchSuffix = $portVersion compat >= 55
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 55
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 55
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 55
lib:libicule$secondaryArchSuffix = $portVersion compat >= 55
lib:libiculx$secondaryArchSuffix = $portVersion compat >= 55
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 55
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 55
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 55
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
REQUIRES+="
"
fi
PROVIDES_devel="
icu55${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicule${secondaryArchSuffix} = $portVersion compat >= 55
devel:libiculx${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 55
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 55
"
REQUIRES_devel="
icu55${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
icu${secondaryArchSuffix}_devel
icu54${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
BUILD()
{
cd source
cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
unzip -oq ../../../sources-3/icu4c-*-data.zip
rm -f data/in/icudt??l.dat
autoconf
runConfigure ./configure \
--disable-samples --disable-extras
make $jobArgs
}
INSTALL()
{
cd source
make install
prepareInstalledDevelLibs \
libicudata \
libicui18n \
libicuio \
libicule \
libiculx \
libicutu \
libicuuc
fixPkgconfig
# Update icu-config to point to the develop/lib dir
fixDevelopLibDirReferences \
$binDir/icu-config
# Rename the data/icu directory when built for the secondary architecture,
# so that it doesn't clash with the primary package's.
if [ -n "$secondaryArchSuffix" ]; then
mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
# TODO: The icu-config, the Makefile.inc, and possibly other files need
# to be adjusted as well. They are probably also not quite correct for
# the primary architecture (lib vs. develop/lib).
fi
# devel package
packageEntries devel \
$developDir \
$dataDir/icu$secondaryArchSuffix \
$libDir/icu \
$binDir/icu-config
# main package cleanup
rm -r $binDir
}
TEST()
{
cd source
make check
}

View File

@@ -1,171 +0,0 @@
SUMMARY="Libraries to support Unicode and globalization"
SUMMARY_devel="The ICU development files"
DESCRIPTION="International Components for Unicode (ICU) is a mature, widely \
used set of C/C++ and Java libraries providing Unicode and Globalization \
support for software applications. ICU is widely portable and gives \
applications the same results on all platforms and between C/C++ and Java \
software.
ICU is released under a nonrestrictive open source license that is suitable \
for use with both commercial software and with other open source or free \
software.
Here are a few highlights of the services provided by ICU:
* Code Page Conversion: Convert text data to or from Unicode and nearly any \
other character set or encoding. ICU's conversion tables are based on charset \
data collected by IBM over the course of many decades, and is the most \
complete available anywhere.
* Collation: Compare strings according to the conventions and standards of a \
particular language, region or country. ICU's collation is based on the \
Unicode Collation Algorithm plus locale-specific comparison rules from the \
Common Locale Data Repository, a comprehensive source for this type of data.
* Formatting: Format numbers, dates, times and currency amounts according the \
conventions of a chosen locale. This includes translating month and day names \
into the selected language, choosing appropriate abbreviations, ordering \
fields correctly, etc. This data also comes from the Common Locale Data \
Repository.
* Time Calculations: Multiple types of calendars are provided beyond the \
traditional Gregorian calendar. A thorough set of timezone calculation APIs \
are provided.
* Unicode Support: ICU closely tracks the Unicode standard, providing easy \
access to all of the many Unicode character properties, Unicode Normalization, \
Case Folding and other fundamental operations as specified by the Unicode \
Standard.
* Regular Expression: ICU's regular expressions fully support Unicode while \
providing very competitive performance.
* Bidi: support for handling text containing a mixture of left to right \
(English) and right to left (Arabic or Hebrew) data.
* Text Boundaries: Locate the positions of words, sentences, paragraphs within \
a range of text, or identify locations that would be suitable for line \
wrapping when displaying the text."
HOMEPAGE="http://www.icu-project.org"
COPYRIGHT="1995-2015 IBM Corporation and others."
LICENSE="ICU"
REVISION="1"
SOURCE_URI="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-56_1-src.tgz"
SOURCE_URI_2="http://www.iana.org/time-zones/repository/releases/tzdata2016f.tar.gz#noarchive"
SOURCE_URI_3="http://download.icu-project.org/files/icu4c/$portVersion/icu4c-56_1-data.zip#noarchive"
CHECKSUM_SHA256="3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816"
CHECKSUM_SHA256_2="ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0"
CHECKSUM_SHA256_3="d9114d82ea87c4b2e7f2ae11117c21922b98aefba7b4e92c3a80075303b2ed23"
SOURCE_DIR="icu"
PATCHES="icu-$portVersion.patchset"
if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
PATCHES+="
"icu-$portVersion.gcc2.patchset"
"
fi
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 arm"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
PROVIDES="
icu56$secondaryArchSuffix = $portVersion compat >= 56
lib:libicudata$secondaryArchSuffix = $portVersion compat >= 56
lib:libicui18n$secondaryArchSuffix = $portVersion compat >= 56
lib:libicuio$secondaryArchSuffix = $portVersion compat >= 56
lib:libicule$secondaryArchSuffix = $portVersion compat >= 56
lib:libiculx$secondaryArchSuffix = $portVersion compat >= 56
lib:libicutest$secondaryArchSuffix = $portVersion compat >= 56
lib:libicutu$secondaryArchSuffix = $portVersion compat >= 56
lib:libicuuc$secondaryArchSuffix = $portVersion compat >= 56
"
REQUIRES="
haiku$secondaryArchSuffix
"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
REQUIRES+="
"
fi
PROVIDES_devel="
icu56${secondaryArchSuffix}_devel = $portVersion
cmd:icu_config${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicudata${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicui18n${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicuio${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicule${secondaryArchSuffix} = $portVersion compat >= 56
devel:libiculx${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicutest${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicutu${secondaryArchSuffix} = $portVersion compat >= 56
devel:libicuuc${secondaryArchSuffix} = $portVersion compat >= 56
"
REQUIRES_devel="
icu56${secondaryArchSuffix} == $portVersion base
"
CONFLICTS_devel="
icu${secondaryArchSuffix}_devel
icu55${secondaryArchSuffix}_devel
icu54${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
BUILD()
{
cd source
cp ../../../sources-2/tzdata*.tar.gz tools/tzcode/
unzip -oq ../../../sources-3/icu4c-*-data.zip
rm -f data/in/icudt??l.dat
autoconf
runConfigure ./configure \
--disable-samples --disable-extras
make $jobArgs
}
INSTALL()
{
cd source
make install
prepareInstalledDevelLibs \
libicudata \
libicui18n \
libicuio \
libicule \
libiculx \
libicutu \
libicuuc
fixPkgconfig
# Update icu-config to point to the develop/lib dir
fixDevelopLibDirReferences \
$binDir/icu-config
# Rename the data/icu directory when built for the secondary architecture,
# so that it doesn't clash with the primary package's.
if [ -n "$secondaryArchSuffix" ]; then
mv $dataDir/icu $dataDir/icu$secondaryArchSuffix
# TODO: The icu-config, the Makefile.inc, and possibly other files need
# to be adjusted as well. They are probably also not quite correct for
# the primary architecture (lib vs. develop/lib).
fi
# devel package
packageEntries devel \
$developDir \
$dataDir/icu$secondaryArchSuffix \
$libDir/icu \
$binDir/icu-config \
$manDir/man1/icu-config.1
# main package cleanup
rm -r $binDir
}
TEST()
{
cd source
make check
}

View File

@@ -1,591 +0,0 @@
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<T, stackCapacity> &other, int32_t length) const {
- return 0==uprv_memcmp(a.getAlias(), other.a.getAlias(), length*sizeof(T));
+ UBool equals(const MessagePatternList<T, stackCapacity> &other, int32_t length) const {
+ for (int32_t i=0; i<length; ++i) {
+ if (!(a.getAlias()[i] == other.a.getAlias()[i]))
+ return FALSE;
+ }
+ return TRUE;
}
MaybeStackArray<T, stackCapacity> 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);
}
- 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 -ruN 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.052953088 +0200
+++ icu-haiku/source/common/unicode/bytestrie.h 2011-08-19 15:46:55.331874304 +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 -ruN 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.053477376 +0200
+++ icu-haiku/source/common/unicode/bytestriebuilder.h 2011-08-19 15:46:55.333185024 +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 -ruN 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.055574528 +0200
+++ icu-haiku/source/common/unicode/platform.h.in 2011-08-19 15:46:55.346554368 +0200
@@ -299,7 +299,7 @@
#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)
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;
};
+#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 -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_;
};
+#if (__GNUC__ == 2)
+ friend class Iterator;
+#endif
private:
friend class UCharsTrieBuilder;
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;
};
+#if (__GNUC__ == 2)
+ friend class UCTLinearMatchNode;
+#endif
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
Node *nextNode) const;
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 ${<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 -ruN icu/source/configure icu-haiku/source/configure
--- icu/source/configure 2011-07-19 23:19:38.029884416 +0200
+++ icu-haiku/source/configure 2011-08-19 15:46:55.287834112 +0200
@@ -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 -ruN icu/source/configure.in icu-haiku/source/configure.in
--- icu/source/configure.in 2011-07-19 23:19:38.029360128 +0200
+++ icu-haiku/source/configure.in 2011-08-19 15:46:55.290717696 +0200
@@ -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 -ruN icu/source/i18n/alphaindex.cpp icu-haiku/source/i18n/alphaindex.cpp
--- icu/source/i18n/alphaindex.cpp 2011-07-19 23:16:04.049545216 +0200
+++ icu-haiku/source/i18n/alphaindex.cpp 2011-08-19 15:46:55.342884352 +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 -ruN icu/source/i18n/currfmt.h icu-haiku/source/i18n/currfmt.h
--- icu/source/i18n/currfmt.h 2011-07-19 23:16:00.058720256 +0200
+++ icu-haiku/source/i18n/currfmt.h 2011-08-19 15:46:55.293339136 +0200
@@ -63,7 +63,9 @@
virtual Format* clone() const;
+#if (__GNUC__ > 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 <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 -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();
};
+#if (__GNUC__ == 2)
+ friend struct Record;
+#endif
/**
* Holds all user records before they are distributed into buckets.
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;
+#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) {

View File

@@ -1,591 +0,0 @@
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<T, stackCapacity> &other, int32_t length) const {
- return 0==uprv_memcmp(a.getAlias(), other.a.getAlias(), length*sizeof(T));
+ UBool equals(const MessagePatternList<T, stackCapacity> &other, int32_t length) const {
+ for (int32_t i=0; i<length; ++i) {
+ if (!(a.getAlias()[i] == other.a.getAlias()[i]))
+ return FALSE;
+ }
+ return TRUE;
}
MaybeStackArray<T, stackCapacity> 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);
}
- 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 -ruN 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.052953088 +0200
+++ icu-haiku/source/common/unicode/bytestrie.h 2011-08-19 15:46:55.331874304 +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 -ruN 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.053477376 +0200
+++ icu-haiku/source/common/unicode/bytestriebuilder.h 2011-08-19 15:46:55.333185024 +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 -ruN 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.055574528 +0200
+++ icu-haiku/source/common/unicode/platform.h.in 2011-08-19 15:46:55.346554368 +0200
@@ -299,7 +299,7 @@
#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)
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;
};
+#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 -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_;
};
+#if (__GNUC__ == 2)
+ friend class Iterator;
+#endif
private:
friend class UCharsTrieBuilder;
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;
};
+#if (__GNUC__ == 2)
+ friend class UCTLinearMatchNode;
+#endif
virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length,
Node *nextNode) const;
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 ${<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 -ruN icu/source/configure icu-haiku/source/configure
--- icu/source/configure 2011-07-19 23:19:38.029884416 +0200
+++ icu-haiku/source/configure 2011-08-19 15:46:55.287834112 +0200
@@ -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 -ruN icu/source/configure.in icu-haiku/source/configure.in
--- icu/source/configure.in 2011-07-19 23:19:38.029360128 +0200
+++ icu-haiku/source/configure.in 2011-08-19 15:46:55.290717696 +0200
@@ -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 -ruN icu/source/i18n/alphaindex.cpp icu-haiku/source/i18n/alphaindex.cpp
--- icu/source/i18n/alphaindex.cpp 2011-07-19 23:16:04.049545216 +0200
+++ icu-haiku/source/i18n/alphaindex.cpp 2011-08-19 15:46:55.342884352 +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 -ruN icu/source/i18n/currfmt.h icu-haiku/source/i18n/currfmt.h
--- icu/source/i18n/currfmt.h 2011-07-19 23:16:00.058720256 +0200
+++ icu-haiku/source/i18n/currfmt.h 2011-08-19 15:46:55.293339136 +0200
@@ -63,7 +63,9 @@
virtual Format* clone() const;
+#if (__GNUC__ > 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 <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 -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();
};
+#if (__GNUC__ == 2)
+ friend struct Record;
+#endif
/**
* Holds all user records before they are distributed into buckets.
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;
+#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) {

File diff suppressed because it is too large Load Diff

View File

@@ -1,861 +0,0 @@
From b545663a3d91c16233ce34181475d8fd84e47034 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:35:11 +0200
Subject: gcc2 fixes for tools, tests, layout.
diff --git a/source/layout/LETableReference.h b/source/layout/LETableReference.h
index de51228..f55b762 100644
--- a/source/layout/LETableReference.h
+++ b/source/layout/LETableReference.h
@@ -304,7 +304,11 @@ LE_TRACE_TR("INFO: new RTAO")
le_uint32 getCount() const { return fCount; }
+#if __GNUC__ == 2
+ const T *getAlias() const { return LETableReference::getAlias(); }
+#else
using LETableReference::getAlias;
+#endif
const T *getAlias(le_uint32 i, LEErrorCode &success) const {
return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success)));
diff --git a/source/test/intltest/apicoll.cpp b/source/test/intltest/apicoll.cpp
index 31b16dd..3e2e4a8 100644
--- a/source/test/intltest/apicoll.cpp
+++ b/source/test/intltest/apicoll.cpp
@@ -1971,7 +1971,22 @@ class TestCollator : public Collator
public:
virtual Collator* clone(void) const;
+#if __GNUC__ == 2
+ EComparisonResult compare (const UnicodeString& s1, const UnicodeString& s2)
+ const {
+ return Collator::compare(s1, s2);
+ }
+ EComparisonResult compare (const UnicodeString& s1, const UnicodeString& s2,
+ int32_t i) const {
+ return Collator::compare(s1, s2, i);
+ }
+ EComparisonResult compare (const UChar* s1, int32_t l1, const UChar* s2,
+ int32_t l2) const {
+ return Collator::compare(s1, l1, s2, l2);
+ }
+#else
using Collator::compare;
+#endif
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
diff --git a/source/test/iotest/stream.cpp b/source/test/iotest/stream.cpp
index a821636..083b4ab 100644
--- a/source/test/iotest/stream.cpp
+++ b/source/test/iotest/stream.cpp
@@ -131,7 +131,7 @@ static void U_CALLCONV TestStream(void)
#endif
UnicodeString ustr("string");
- outFormatStream << "1234567890" << setw(10) << left << ustr << " " << "0123456789";
+ outFormatStream << "1234567890" << setw(10) << ios::left << ustr << " " << "0123456789";
#ifdef USE_SSTREAM
tempStr = outFormatStream.str();
diff --git a/source/tools/toolutil/udbgutil.cpp b/source/tools/toolutil/udbgutil.cpp
index 911425c..cdd6683 100644
--- a/source/tools/toolutil/udbgutil.cpp
+++ b/source/tools/toolutil/udbgutil.cpp
@@ -639,7 +639,9 @@ U_CAPI void udbg_knownIssue_close(void *ptr) {
#include <set>
#include <map>
#include <string>
+#if __GNUC__ > 2
#include <ostream>
+#endif
#include <iostream>
class KnownIssues {
--
2.2.2
From 6cafed065f5d91859be09b8a219c1eaf5785d96d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:35:47 +0200
Subject: gcc2 fixes for sources/i18n
diff --git a/source/i18n/alphaindex.cpp b/source/i18n/alphaindex.cpp
index 9fa98b8..5535be2 100644
--- a/source/i18n/alphaindex.cpp
+++ b/source/i18n/alphaindex.cpp
@@ -952,8 +952,8 @@ static int32_t U_CALLCONV
collatorComparator(const void *context, const void *left, const void *right) {
const UElement *leftElement = static_cast<const UElement *>(left);
const UElement *rightElement = static_cast<const UElement *>(right);
- const UnicodeString *leftString = static_cast<const UnicodeString *>(leftElement->pointer);
- const UnicodeString *rightString = static_cast<const UnicodeString *>(rightElement->pointer);
+ const UnicodeString *leftString = (const UnicodeString *)(leftElement->pointer);
+ const UnicodeString *rightString = (const UnicodeString *)(rightElement->pointer);
if (leftString == rightString) {
// Catches case where both are NULL
@@ -977,8 +977,8 @@ static int32_t U_CALLCONV
recordCompareFn(const void *context, const void *left, const void *right) {
const UElement *leftElement = static_cast<const UElement *>(left);
const UElement *rightElement = static_cast<const UElement *>(right);
- const AlphabeticIndex::Record *leftRec = static_cast<const AlphabeticIndex::Record *>(leftElement->pointer);
- const AlphabeticIndex::Record *rightRec = static_cast<const AlphabeticIndex::Record *>(rightElement->pointer);
+ const AlphabeticIndex::Record *leftRec = (const AlphabeticIndex::Record *)(leftElement->pointer);
+ const AlphabeticIndex::Record *rightRec = (const AlphabeticIndex::Record *)(rightElement->pointer);
const Collator *col = static_cast<const Collator *>(context);
UErrorCode errorCode = U_ZERO_ERROR;
return col->compare(leftRec->name_, rightRec->name_, errorCode);
diff --git a/source/i18n/currfmt.h b/source/i18n/currfmt.h
index b3f23e5..1495316 100644
--- a/source/i18n/currfmt.h
+++ b/source/i18n/currfmt.h
@@ -58,7 +58,9 @@ class CurrencyFormat : public MeasureFormat {
virtual Format* clone() const;
+#if __GNUC__ > 2
using MeasureFormat::format;
+#endif
/**
* Override Format API.
diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp
index 51738be..c003c4b 100644
--- a/source/i18n/digitlst.cpp
+++ b/source/i18n/digitlst.cpp
@@ -38,7 +38,9 @@
#include <limits.h>
#include <string.h>
#include <stdio.h>
+#if __GNUC__ > 2
#include <limits>
+#endif
// ***************************************************************************
// class DigitList
@@ -437,11 +439,15 @@ DigitList::getDouble() const
tDouble /= -1;
}
} else if (isInfinite()) {
+#if __GNUC__ <= 2
+ tDouble = DBL_MAX;
+#else
if (std::numeric_limits<double>::has_infinity) {
tDouble = std::numeric_limits<double>::infinity();
} else {
tDouble = std::numeric_limits<double>::max();
}
+#endif
if (!isPositive()) {
tDouble = -tDouble; //this was incorrectly "-fDouble" originally.
}
diff --git a/source/i18n/digitlst.h b/source/i18n/digitlst.h
index 7e98d2b..4a95d71 100644
--- a/source/i18n/digitlst.h
+++ b/source/i18n/digitlst.h
@@ -413,7 +413,7 @@ private:
public:
-#if U_OVERRIDE_CXX_ALLOCATION
+#if U_OVERRIDE_CXX_ALLOCATION && __GNUC__ > 2
using UMemory::operator new;
using UMemory::operator delete;
#else
diff --git a/source/i18n/msgfmt.cpp b/source/i18n/msgfmt.cpp
index 32d9bc7..e6ca5c1 100644
--- a/source/i18n/msgfmt.cpp
+++ b/source/i18n/msgfmt.cpp
@@ -1484,6 +1484,7 @@ MessageFormat::parse(int32_t msgStart,
prevIndex=msgPattern.getPart(argLimit).getLimit();
i=argLimit;
}
+ return NULL;
}
// -------------------------------------
// Parses the source pattern and returns the Formattable objects array,
diff --git a/source/i18n/reldtfmt.h b/source/i18n/reldtfmt.h
index 67539e0..09f31e7 100644
--- a/source/i18n/reldtfmt.h
+++ b/source/i18n/reldtfmt.h
@@ -81,7 +81,9 @@ public:
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 --git a/source/i18n/sortkey.cpp b/source/i18n/sortkey.cpp
index baf3254..838ea82 100644
--- a/source/i18n/sortkey.cpp
+++ b/source/i18n/sortkey.cpp
@@ -172,7 +172,7 @@ Collator::EComparisonResult
CollationKey::compareTo(const CollationKey& target) const
{
UErrorCode errorCode = U_ZERO_ERROR;
- return static_cast<Collator::EComparisonResult>(compareTo(target, errorCode));
+ return (Collator::EComparisonResult)(compareTo(target, errorCode));
}
// Bitwise comparison for the collation keys.
diff --git a/source/i18n/unicode/choicfmt.h b/source/i18n/unicode/choicfmt.h
index cfd5206..d2b7f66 100644
--- a/source/i18n/unicode/choicfmt.h
+++ b/source/i18n/unicode/choicfmt.h
@@ -355,7 +355,22 @@ public:
virtual const UnicodeString* getFormats(int32_t& count) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo) const {
+ return NumberFormat::format(number, appendTo);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPosition& p, UErrorCode& e) const {
+ return NumberFormat::format(f, s, p, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ UErrorCode& e) const {
+ return NumberFormat::format(f, s, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Formats a double number using this object's choices.
@@ -421,7 +436,13 @@ public:
FieldPosition& pos,
UErrorCode& success) const;
+#if __GNUC__ == 2
+ void parse(UnicodeString& s, Formattable& f, UErrorCode& e) const {
+ NumberFormat::parse(s, f, e);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Looks for the longest match of any message string on the input text and,
diff --git a/source/i18n/unicode/compactdecimalformat.h b/source/i18n/unicode/compactdecimalformat.h
index bd8fdba..be2e580 100644
--- a/source/i18n/unicode/compactdecimalformat.h
+++ b/source/i18n/unicode/compactdecimalformat.h
@@ -104,7 +104,13 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ UnicodeString& format(double n, UnicodeString& s) const {
+ return DecimalFormat::format(n, s);
+ }
+#else
using DecimalFormat::format;
+#endif
/**
* Format a double or long number using base-10 representation.
diff --git a/source/i18n/unicode/datefmt.h b/source/i18n/unicode/datefmt.h
index 983f136..4531dc5 100644
--- a/source/i18n/unicode/datefmt.h
+++ b/source/i18n/unicode/datefmt.h
@@ -221,7 +221,13 @@ public:
virtual UBool operator==(const Format&) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+#else
using Format::format;
+#endif
/**
* Format an object to produce a string. This method handles Formattable
diff --git a/source/i18n/unicode/decimfmt.h b/source/i18n/unicode/decimfmt.h
index 138855b..4ed2995 100644
--- a/source/i18n/unicode/decimfmt.h
+++ b/source/i18n/unicode/decimfmt.h
@@ -918,7 +918,35 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo) const {
+ return NumberFormat::format(number, appendTo);
+ }
+
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo,
+ UErrorCode& status) const {
+ return NumberFormat::format(number, appendTo, status);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return NumberFormat::format(f, s, i, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPosition& p, UErrorCode& e) const {
+ return NumberFormat::format(f, s, p, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e)
+ const {
+ return NumberFormat::format(f, s, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Format a double or long number using base-10 representation.
@@ -1131,7 +1159,15 @@ public:
FieldPosition& pos,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ void parse(const UnicodeString& text,
+ Formattable& result,
+ UErrorCode& status) const {
+ NumberFormat::parse(text, result, status);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Parse the given string using this object's choices. The method
diff --git a/source/i18n/unicode/dtitvfmt.h b/source/i18n/unicode/dtitvfmt.h
index fb27eec..8fefb9e 100644
--- a/source/i18n/unicode/dtitvfmt.h
+++ b/source/i18n/unicode/dtitvfmt.h
@@ -373,7 +373,9 @@ public:
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 --git a/source/i18n/unicode/measfmt.h b/source/i18n/unicode/measfmt.h
index 61a1e86..0a272a8 100644
--- a/source/i18n/unicode/measfmt.h
+++ b/source/i18n/unicode/measfmt.h
@@ -92,8 +92,25 @@ class DateFormat;
*/
class U_I18N_API MeasureFormat : public Format {
public:
+#if __GNUC__ == 2
+ void parseObject (const UnicodeString& s, Formattable& f, UErrorCode& e)
+ const {
+ Format::parseObject(s, f, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+#else
using Format::parseObject;
using Format::format;
+#endif
/**
* Constructor.
diff --git a/source/i18n/unicode/msgfmt.h b/source/i18n/unicode/msgfmt.h
index 5de91e4..8f9f995 100644
--- a/source/i18n/unicode/msgfmt.h
+++ b/source/i18n/unicode/msgfmt.h
@@ -622,7 +622,17 @@ public:
virtual const Format** getFormats(int32_t& count) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) {
+ return Format::format(f, s, e);
+ }
+#else
using Format::format;
+#endif
/**
* Formats the given array of arguments into a user-readable string.
@@ -884,6 +894,9 @@ private:
PluralRules* rules;
UPluralType type;
};
+#if __GNUC__ == 2
+ friend class PluralSelectorProvider;
+#endif
/**
* A MessageFormat formats an array of arguments. Each argument
diff --git a/source/i18n/unicode/numfmt.h b/source/i18n/unicode/numfmt.h
index 164c657..4b03222 100644
--- a/source/i18n/unicode/numfmt.h
+++ b/source/i18n/unicode/numfmt.h
@@ -235,7 +235,15 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (const Formattable& obj,
+ UnicodeString& appendTo,
+ UErrorCode & status) const {
+ return Format::format(obj, appendTo, status);
+ }
+#else
using Format::format;
+#endif
/**
* Format an object to produce a string. This method handles
diff --git a/source/i18n/unicode/plurfmt.h b/source/i18n/unicode/plurfmt.h
index f7099d8..bedaf01 100644
--- a/source/i18n/unicode/plurfmt.h
+++ b/source/i18n/unicode/plurfmt.h
@@ -313,7 +313,14 @@ public:
void applyPattern(const UnicodeString& pattern, UErrorCode& status);
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+#else
using Format::format;
+#endif
/**
* Formats a plural message for a given number.
diff --git a/source/i18n/unicode/rbnf.h b/source/i18n/unicode/rbnf.h
index 7058c96..d0ad947 100644
--- a/source/i18n/unicode/rbnf.h
+++ b/source/i18n/unicode/rbnf.h
@@ -741,7 +741,23 @@ public:
const Locale& locale = Locale::getDefault());
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e)
+ const {
+ return NumberFormat::format(f, s, e);
+ }
+
+ UnicodeString& format(double n, UnicodeString& s) const {
+ return NumberFormat::format(n, s);
+ }
+
+ UnicodeString& format(int64_t n, UnicodeString& s, FieldPosition& p,
+ UErrorCode& e) const {
+ return NumberFormat::format(n, s, p, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Formats the specified 32-bit number using the default ruleset.
@@ -827,7 +843,13 @@ public:
FieldPosition& pos,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ void parse(const UnicodeString& s, Formattable& f, UErrorCode& e) const {
+ return NumberFormat::parse(s, f, e);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Parses the specfied string, beginning at the specified position, according
diff --git a/source/i18n/unicode/selfmt.h b/source/i18n/unicode/selfmt.h
index 635144b..7247839 100644
--- a/source/i18n/unicode/selfmt.h
+++ b/source/i18n/unicode/selfmt.h
@@ -219,7 +219,9 @@ public:
void applyPattern(const UnicodeString& pattern, UErrorCode& status);
+#if __GNUC__ > 2
using Format::format;
+#endif
/**
* Selects the phrase for the given keyword
@@ -340,9 +342,9 @@ public:
*/
virtual UClassID getDynamicClassID() const;
-private:
friend class MessageFormat;
+private:
SelectFormat(); // default constructor not implemented.
/**
diff --git a/source/i18n/unicode/smpdtfmt.h b/source/i18n/unicode/smpdtfmt.h
index ccdaff4..69f70ec 100644
--- a/source/i18n/unicode/smpdtfmt.h
+++ b/source/i18n/unicode/smpdtfmt.h
@@ -870,7 +870,27 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return DateFormat::format(f, s, i, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, FieldPosition& p,
+ UErrorCode& e) const {
+ return DateFormat::format(f, s, p, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+ UnicodeString& format(const UDate& d, UnicodeString& s, FieldPosition& f) const {
+ return DateFormat::format(d, s, f);
+ }
+ UnicodeString& format(const UDate& d, UnicodeString& s) const {
+ return DateFormat::format(d, s);
+ }
+#else
using DateFormat::format;
+#endif
/**
* Format a date or time, which is the standard millis since 24:00 GMT, Jan
@@ -915,7 +935,16 @@ public:
FieldPositionIterator* posIter,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ UDate parse(const UnicodeString& s, UErrorCode& e) const {
+ return DateFormat::parse(s, e);
+ }
+ UDate parse (const UnicodeString& s, ParsePosition& p) const {
+ return DateFormat::parse(s, p);
+ }
+#else
using DateFormat::parse;
+#endif
/**
* Parse a date/time string beginning at the given parse position. For
diff --git a/source/i18n/unicode/tblcoll.h b/source/i18n/unicode/tblcoll.h
index e56f189..2108699 100644
--- a/source/i18n/unicode/tblcoll.h
+++ b/source/i18n/unicode/tblcoll.h
@@ -254,7 +254,22 @@ public:
const CharacterIterator& source) const;
// Make deprecated versions of Collator::compare() visible.
+#if __GNUC__ == 2
+ EComparisonResult compare(const UChar* source, int sourceLength,
+ const UChar* target, int targetLength) const {
+ return Collator::compare(source, sourceLength, target, targetLength);
+ }
+ EComparisonResult compare(const UnicodeString& s1, const UnicodeString& s2,
+ int i) const {
+ return Collator::compare(s1, s2, i);
+ }
+ EComparisonResult compare(const UnicodeString& s1, const UnicodeString& s2)
+ const {
+ return Collator::compare(s1, s2);
+ }
+#else
using Collator::compare;
+#endif
/**
* The comparison function compares the character data stored in two
diff --git a/source/i18n/unicode/tzfmt.h b/source/i18n/unicode/tzfmt.h
index 24f0e49..969e08a 100644
--- a/source/i18n/unicode/tzfmt.h
+++ b/source/i18n/unicode/tzfmt.h
@@ -520,7 +520,14 @@ public:
*/
UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& data, UnicodeString& string,
+ FieldPositionIterator* iterator, UErrorCode& error) const {
+ return Format::format(data, string, iterator, error);
+ }
+#else
using Format::format;
+#endif
/**
* Returns the display name of the time zone at the given date for the style.
--
2.2.2
From 6fe3c3f205284dfb0a2c4d06717bb84cb61f0f66 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:36:37 +0200
Subject: gcc2 fixes in source/common
diff --git a/source/common/unicode/bytestrie.h b/source/common/unicode/bytestrie.h
index 9c77827..367a0ae 100644
--- a/source/common/unicode/bytestrie.h
+++ b/source/common/unicode/bytestrie.h
@@ -338,6 +338,9 @@ public:
// but the code looks more confusing that way.)
UVector32 *stack_;
};
+#if __GNUC__ == 2
+ friend class Iterator;
+#endif
private:
friend class BytesTrieBuilder;
diff --git a/source/common/unicode/bytestriebuilder.h b/source/common/unicode/bytestriebuilder.h
index d00ab9b..afbf59b 100644
--- a/source/common/unicode/bytestriebuilder.h
+++ b/source/common/unicode/bytestriebuilder.h
@@ -152,6 +152,9 @@ private:
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 --git a/source/common/unicode/platform.h b/source/common/unicode/platform.h
index 4829000..2411dd0 100644
--- a/source/common/unicode/platform.h
+++ b/source/common/unicode/platform.h
@@ -708,7 +708,7 @@
/* Use the predefined value. */
#elif defined(U_STATIC_IMPLEMENTATION)
# define U_EXPORT
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && __GNUC__ > 2
# define U_EXPORT __attribute__((visibility("default")))
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
|| (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
diff --git a/source/common/unicode/stringtriebuilder.h b/source/common/unicode/stringtriebuilder.h
index 04447e5..21bab82 100644
--- a/source/common/unicode/stringtriebuilder.h
+++ b/source/common/unicode/stringtriebuilder.h
@@ -379,6 +379,15 @@ protected:
int32_t length;
Node *next; // A branch sub-node.
};
+#if __GNUC__ >= 2
+ friend class FinalValueNode;
+ friend class ValueNode;
+ friend class IntermediateValueNode;
+ friend class BranchNode;
+ friend class ListBranchNode;
+ friend class SplitBranchNode;
+ friend class BranchHeadNode;
+#endif
#endif /* U_HIDE_INTERNAL_API */
/** @internal */
diff --git a/source/common/unicode/ucharstrie.h b/source/common/unicode/ucharstrie.h
index 0575a97..9fe81c1 100644
--- a/source/common/unicode/ucharstrie.h
+++ b/source/common/unicode/ucharstrie.h
@@ -356,6 +356,9 @@ public:
// but the code looks more confusing that way.)
UVector32 *stack_;
};
+#if __GNUC__ == 2
+ friend class Iterator;
+#endif
private:
friend class UCharsTrieBuilder;
diff --git a/source/common/unicode/ucharstriebuilder.h b/source/common/unicode/ucharstriebuilder.h
index 35e353d..30f40d9 100644
--- a/source/common/unicode/ucharstriebuilder.h
+++ b/source/common/unicode/ucharstriebuilder.h
@@ -156,6 +156,9 @@ private:
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;
--
2.2.2
From efa9ee8612ac7482e56fa2190ce1b1afd188e268 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Mon, 6 Oct 2014 13:28:09 +0200
Subject: more gcc2 fixes for ICU 54.
diff --git a/source/common/norm2allmodes.h b/source/common/norm2allmodes.h
index 64c84a2..aca1e08 100644
--- a/source/common/norm2allmodes.h
+++ b/source/common/norm2allmodes.h
@@ -193,7 +193,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.decompose(src, limit, &buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -204,7 +206,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
return impl.decompose(src, limit, NULL, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
return impl.isDecompYes(impl.getNorm16(c)) ? UNORM_YES : UNORM_NO;
}
@@ -225,7 +229,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -268,7 +274,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const {
return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
return impl.getCompQuickCheck(impl.getNorm16(c));
}
@@ -296,7 +304,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.makeFCD(src, limit, &buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -307,7 +317,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
return impl.makeFCD(src, limit, NULL, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
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 --git a/source/common/putilimp.h b/source/common/putilimp.h
index a3e361f..affb1a8 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -113,7 +113,7 @@ typedef size_t uintptr_t;
#if defined(U_TIMEZONE) || defined(U_HAVE_TIMEZONE)
/* Use the predefined value. */
-#elif U_PLATFORM == U_PF_ANDROID
+#elif U_PLATFORM == U_PF_ANDROID || defined(__HAIKU__)
# define U_TIMEZONE timezone
#elif U_PLATFORM_IS_LINUX_BASED
# if defined(__UCLIBC__)
diff --git a/source/common/unicode/platform.h b/source/common/unicode/platform.h
index 2411dd0..61fdfe1 100644
--- a/source/common/unicode/platform.h
+++ b/source/common/unicode/platform.h
@@ -159,7 +159,7 @@
# else
# define U_PLATFORM U_PF_DARWIN
# endif
-#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
+#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) || defined(__HAIKU__)
# define U_PLATFORM U_PF_BSD
#elif defined(sun) || defined(__sun)
/* Check defined(__SVR4) || defined(__svr4__) to distinguish Solaris from SunOS? */
diff --git a/source/i18n/filteredbrk.cpp b/source/i18n/filteredbrk.cpp
index 7ecb004..e3b3802 100644
--- a/source/i18n/filteredbrk.cpp
+++ b/source/i18n/filteredbrk.cpp
@@ -65,7 +65,13 @@ class U_I18N_API UStringSet : public UVector {
inline UBool contains(const UnicodeString& s) {
return contains((void*) &s);
}
+#if __GNUC__ == 2
+ UBool contains(void* s) {
+ return UVector::contains(s);
+ }
+#else
using UVector::contains;
+#endif
/**
* Return the ith UnicodeString alias
*/
--
2.2.2
From d1ec5200e5938bab93750e171a58182ea76eebc1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 26 Mar 2015 18:39:42 +0000
Subject: gcc2 fixes for tztools.
diff --git a/source/tools/tzcode/private.h b/source/tools/tzcode/private.h
index 1a85c88..0ee3329 100644
--- a/source/tools/tzcode/private.h
+++ b/source/tools/tzcode/private.h
@@ -120,7 +120,7 @@
*/
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H \
- (199901 <= __STDC_VERSION__ || \
+ (defined(__HAIKU__) || 199901 <= __STDC_VERSION__ || \
2 < (__GLIBC__ + (0 < __GLIBC_MINOR__)))
#endif /* !defined HAVE_STDINT_H */
--
2.2.2

View File

@@ -1,203 +0,0 @@
From 3c6dff2a3728889f67afcc5e2e5a667d59aa2b84 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:38:07 +0200
Subject: buildsystem configuration for Haiku
diff --git a/source/acinclude.m4 b/source/acinclude.m4
index 179c1c8..6a25dc4 100644
--- a/source/acinclude.m4
+++ b/source/acinclude.m4
@@ -470,6 +470,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
if test "$GCC" = yes
then
case "${host}" in
+ *-*-haiku*)
+ CFLAGS="$CFLAGS -std=c9x"
+ ;;
*)
# Do not use -ansi. It limits us to C90, and it breaks some platforms.
# We use -std=c99 to disable the gnu99 defaults and its associated warnings
diff --git a/source/config/mh-haiku b/source/config/mh-haiku
index ccf956e..55a3ed2 100644
--- a/source/config/mh-haiku
+++ b/source/config/mh-haiku
@@ -18,7 +18,7 @@ LIBCPPFLAGS =
THREADSCPPFLAGS =
#
-CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1
+CPPFLAGS += -DU_CHARSET_IS_UTF8=1
## Compiler switch to embed a runtime search path
LD_RPATH=
--
2.2.2
From 12c3d34d0c531dcd3af7ae9c0119001bcdf8261a Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 3 Oct 2014 11:07:01 +0200
Subject: Don't call tzset and tzname on Haiku
While they exist, they are implemented using ICU, and trying to use them
within ICU results in a deadlock.
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index d2c1c66..a3e361f 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -105,7 +105,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZSET _tzset
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZSET tzset
@@ -140,7 +140,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZNAME _tzname
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZNAME tzname
diff --git a/source/configure.ac b/source/configure.ac
index b30c8d0..89902b4 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -790,50 +790,26 @@ else
fi
AC_SUBST(U_HAVE_POPEN)
-AC_CHECK_FUNC(tzset)
+#AC_CHECK_FUNC(tzset)
U_HAVE_TZSET=0
-if test x$ac_cv_func_tzset = xyes
-then
- U_TZSET=tzset
- U_HAVE_TZSET=1
-else
- AC_CHECK_FUNC(_tzset)
- if test x$ac_cv_func__tzset = xyes
- then
- U_TZSET=_tzset
- U_HAVE_TZSET=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
- fi
-fi
+#if test x$ac_cv_func_tzset = xyes
+#then
+# U_TZSET=tzset
+# U_HAVE_TZSET=1
+#else
+# AC_CHECK_FUNC(_tzset)
+# if test x$ac_cv_func__tzset = xyes
+# then
+# U_TZSET=_tzset
+# U_HAVE_TZSET=1
+# else
+# CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
+# fi
+#fi
AC_SUBST(U_HAVE_TZSET)
AC_SUBST(U_TZSET)
U_HAVE_TZNAME=0
-AC_CACHE_CHECK(for tzname,ac_cv_var_tzname,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef __USE_POSIX
-#define __USE_POSIX
-#endif
-#include <stdlib.h>
-#include <time.h>
-#ifndef tzname /* For SGI. */
-extern char *tzname[]; /* RS6000 and others reject char **tzname. */
-#endif]], [atoi(*tzname);])],[ac_cv_var_tzname=yes],[ac_cv_var_tzname=no])])
-if test $ac_cv_var_tzname = yes; then
- U_TZNAME=tzname
- U_HAVE_TZNAME=1
-else
- AC_CACHE_CHECK(for _tzname,ac_cv_var__tzname,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
- #include <time.h>
- extern char *_tzname[];]], [atoi(*_tzname);])],[ac_cv_var__tzname=yes],[ac_cv_var__tzname=no])])
- if test $ac_cv_var__tzname = yes; then
- U_TZNAME=_tzname
- U_HAVE_TZNAME=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
- fi
-fi
AC_SUBST(U_HAVE_TZNAME)
AC_SUBST(U_TZNAME)
--
2.2.2
From 85cb05132c7caf7c17c786a816efb31a08a40319 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Fri, 14 Nov 2014 23:56:19 +0100
Subject: Restore missing parts for proper Haiku port.
* Actually set the platform to U_HAIKU for Haiku target.
* Use gcc to build icudt54l_dat.o for Haiku target.
diff --git a/source/configure.ac b/source/configure.ac
index 89902b4..9f3b893 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -626,7 +626,7 @@ AC_MSG_CHECKING([for genccode assembly])
# Check to see if genccode can generate simple assembly.
GENCCODE_ASSEMBLY=
case "${host}" in
-*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
+*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu|*-haiku*)
if test "$GCC" = yes; then
# We're using gcc, and the simple -a gcc command line works for genccode
GENCCODE_ASSEMBLY="-a gcc"
@@ -1227,6 +1227,7 @@ case "${host}" in
*-*-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 ;;
--
2.2.2
From 093540e0271aad6cc2aa23bfd8af1e37d04c5ef4 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 19 Dec 2015 14:44:35 +0000
Subject: [PATCH] Fix missing dependency of yearistype.sh to tzdata extraction.
This caused parallel builds to fail because the script file wasn't yet
extracted when it was copied. The regression was introduced in r26995
when the dependency was reused for TDATA which yearistype.sh isn't part
of.
---
source/tools/tzcode/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/tools/tzcode/Makefile.in b/source/tools/tzcode/Makefile.in
index b6ec447..d97e485 100644
--- a/source/tools/tzcode/Makefile.in
+++ b/source/tools/tzcode/Makefile.in
@@ -125,7 +125,7 @@ $(ICUZDUMPTARG): $(srcdir)/icuzdump.cpp
$(LINK.cc) -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/io -pedantic $(srcdir)/icuzdump.cpp $(LIBICUUC) $(LIBICUDT) $(LIBICUI18N) $(LIBICUIO) $(LIBICUTOOLUTIL) -o $@
-$(TDATA): tdatamarker
+$(TDATA) $(XDATA): tdatamarker
tdatamarker: $(TZDATA)
gunzip -d < $(TZDATA) | tar xf - --exclude=Makefile
--
2.2.2

View File

@@ -1,939 +0,0 @@
From b545663a3d91c16233ce34181475d8fd84e47034 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:35:11 +0200
Subject: gcc2 fixes for tools, tests, layout.
diff --git a/source/layout/LETableReference.h b/source/layout/LETableReference.h
index de51228..f55b762 100644
--- a/source/layout/LETableReference.h
+++ b/source/layout/LETableReference.h
@@ -304,7 +304,11 @@ LE_TRACE_TR("INFO: new RTAO")
le_uint32 getCount() const { return fCount; }
+#if __GNUC__ == 2
+ const T *getAlias() const { return LETableReference::getAlias(); }
+#else
using LETableReference::getAlias;
+#endif
const T *getAlias(le_uint32 i, LEErrorCode &success) const {
return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success)));
diff --git a/source/test/intltest/apicoll.cpp b/source/test/intltest/apicoll.cpp
index 31b16dd..3e2e4a8 100644
--- a/source/test/intltest/apicoll.cpp
+++ b/source/test/intltest/apicoll.cpp
@@ -1971,7 +1971,22 @@ class TestCollator : public Collator
public:
virtual Collator* clone(void) const;
+#if __GNUC__ == 2
+ EComparisonResult compare (const UnicodeString& s1, const UnicodeString& s2)
+ const {
+ return Collator::compare(s1, s2);
+ }
+ EComparisonResult compare (const UnicodeString& s1, const UnicodeString& s2,
+ int32_t i) const {
+ return Collator::compare(s1, s2, i);
+ }
+ EComparisonResult compare (const UChar* s1, int32_t l1, const UChar* s2,
+ int32_t l2) const {
+ return Collator::compare(s1, l1, s2, l2);
+ }
+#else
using Collator::compare;
+#endif
virtual UCollationResult compare(const UnicodeString& source,
const UnicodeString& target,
diff --git a/source/test/iotest/stream.cpp b/source/test/iotest/stream.cpp
index a821636..083b4ab 100644
--- a/source/test/iotest/stream.cpp
+++ b/source/test/iotest/stream.cpp
@@ -131,7 +131,7 @@ static void U_CALLCONV TestStream(void)
#endif
UnicodeString ustr("string");
- outFormatStream << "1234567890" << setw(10) << left << ustr << " " << "0123456789";
+ outFormatStream << "1234567890" << setw(10) << ios::left << ustr << " " << "0123456789";
#ifdef USE_SSTREAM
tempStr = outFormatStream.str();
diff --git a/source/tools/toolutil/udbgutil.cpp b/source/tools/toolutil/udbgutil.cpp
index 911425c..cdd6683 100644
--- a/source/tools/toolutil/udbgutil.cpp
+++ b/source/tools/toolutil/udbgutil.cpp
@@ -639,7 +639,9 @@ U_CAPI void udbg_knownIssue_close(void *ptr) {
#include <set>
#include <map>
#include <string>
+#if __GNUC__ > 2
#include <ostream>
+#endif
#include <iostream>
class KnownIssues {
--
2.2.2
From 6cafed065f5d91859be09b8a219c1eaf5785d96d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:35:47 +0200
Subject: gcc2 fixes for sources/i18n
diff --git a/source/i18n/alphaindex.cpp b/source/i18n/alphaindex.cpp
index 9fa98b8..5535be2 100644
--- a/source/i18n/alphaindex.cpp
+++ b/source/i18n/alphaindex.cpp
@@ -952,8 +952,8 @@ static int32_t U_CALLCONV
collatorComparator(const void *context, const void *left, const void *right) {
const UElement *leftElement = static_cast<const UElement *>(left);
const UElement *rightElement = static_cast<const UElement *>(right);
- const UnicodeString *leftString = static_cast<const UnicodeString *>(leftElement->pointer);
- const UnicodeString *rightString = static_cast<const UnicodeString *>(rightElement->pointer);
+ const UnicodeString *leftString = (const UnicodeString *)(leftElement->pointer);
+ const UnicodeString *rightString = (const UnicodeString *)(rightElement->pointer);
if (leftString == rightString) {
// Catches case where both are NULL
@@ -977,8 +977,8 @@ static int32_t U_CALLCONV
recordCompareFn(const void *context, const void *left, const void *right) {
const UElement *leftElement = static_cast<const UElement *>(left);
const UElement *rightElement = static_cast<const UElement *>(right);
- const AlphabeticIndex::Record *leftRec = static_cast<const AlphabeticIndex::Record *>(leftElement->pointer);
- const AlphabeticIndex::Record *rightRec = static_cast<const AlphabeticIndex::Record *>(rightElement->pointer);
+ const AlphabeticIndex::Record *leftRec = (const AlphabeticIndex::Record *)(leftElement->pointer);
+ const AlphabeticIndex::Record *rightRec = (const AlphabeticIndex::Record *)(rightElement->pointer);
const Collator *col = static_cast<const Collator *>(context);
UErrorCode errorCode = U_ZERO_ERROR;
return col->compare(leftRec->name_, rightRec->name_, errorCode);
diff --git a/source/i18n/currfmt.h b/source/i18n/currfmt.h
index b3f23e5..1495316 100644
--- a/source/i18n/currfmt.h
+++ b/source/i18n/currfmt.h
@@ -58,7 +58,9 @@ class CurrencyFormat : public MeasureFormat {
virtual Format* clone() const;
+#if __GNUC__ > 2
using MeasureFormat::format;
+#endif
/**
* Override Format API.
diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp
index 51738be..c003c4b 100644
--- a/source/i18n/digitlst.cpp
+++ b/source/i18n/digitlst.cpp
@@ -38,7 +38,9 @@
#include <limits.h>
#include <string.h>
#include <stdio.h>
+#if __GNUC__ > 2
#include <limits>
+#endif
// ***************************************************************************
// class DigitList
@@ -437,11 +439,15 @@ DigitList::getDouble() const
tDouble /= -1;
}
} else if (isInfinite()) {
+#if __GNUC__ <= 2
+ tDouble = DBL_MAX;
+#else
if (std::numeric_limits<double>::has_infinity) {
tDouble = std::numeric_limits<double>::infinity();
} else {
tDouble = std::numeric_limits<double>::max();
}
+#endif
if (!isPositive()) {
tDouble = -tDouble; //this was incorrectly "-fDouble" originally.
}
diff --git a/source/i18n/digitlst.h b/source/i18n/digitlst.h
index 7e98d2b..4a95d71 100644
--- a/source/i18n/digitlst.h
+++ b/source/i18n/digitlst.h
@@ -413,7 +413,7 @@ private:
public:
-#if U_OVERRIDE_CXX_ALLOCATION
+#if U_OVERRIDE_CXX_ALLOCATION && __GNUC__ > 2
using UMemory::operator new;
using UMemory::operator delete;
#else
diff --git a/source/i18n/msgfmt.cpp b/source/i18n/msgfmt.cpp
index 32d9bc7..e6ca5c1 100644
--- a/source/i18n/msgfmt.cpp
+++ b/source/i18n/msgfmt.cpp
@@ -1484,6 +1484,7 @@ MessageFormat::parse(int32_t msgStart,
prevIndex=msgPattern.getPart(argLimit).getLimit();
i=argLimit;
}
+ return NULL;
}
// -------------------------------------
// Parses the source pattern and returns the Formattable objects array,
diff --git a/source/i18n/reldtfmt.h b/source/i18n/reldtfmt.h
index 67539e0..09f31e7 100644
--- a/source/i18n/reldtfmt.h
+++ b/source/i18n/reldtfmt.h
@@ -81,7 +81,9 @@ public:
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 --git a/source/i18n/sortkey.cpp b/source/i18n/sortkey.cpp
index baf3254..838ea82 100644
--- a/source/i18n/sortkey.cpp
+++ b/source/i18n/sortkey.cpp
@@ -172,7 +172,7 @@ Collator::EComparisonResult
CollationKey::compareTo(const CollationKey& target) const
{
UErrorCode errorCode = U_ZERO_ERROR;
- return static_cast<Collator::EComparisonResult>(compareTo(target, errorCode));
+ return (Collator::EComparisonResult)(compareTo(target, errorCode));
}
// Bitwise comparison for the collation keys.
diff --git a/source/i18n/unicode/choicfmt.h b/source/i18n/unicode/choicfmt.h
index cfd5206..d2b7f66 100644
--- a/source/i18n/unicode/choicfmt.h
+++ b/source/i18n/unicode/choicfmt.h
@@ -355,7 +355,22 @@ public:
virtual const UnicodeString* getFormats(int32_t& count) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo) const {
+ return NumberFormat::format(number, appendTo);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPosition& p, UErrorCode& e) const {
+ return NumberFormat::format(f, s, p, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ UErrorCode& e) const {
+ return NumberFormat::format(f, s, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Formats a double number using this object's choices.
@@ -421,7 +436,13 @@ public:
FieldPosition& pos,
UErrorCode& success) const;
+#if __GNUC__ == 2
+ void parse(UnicodeString& s, Formattable& f, UErrorCode& e) const {
+ NumberFormat::parse(s, f, e);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Looks for the longest match of any message string on the input text and,
diff --git a/source/i18n/unicode/compactdecimalformat.h b/source/i18n/unicode/compactdecimalformat.h
index bd8fdba..be2e580 100644
--- a/source/i18n/unicode/compactdecimalformat.h
+++ b/source/i18n/unicode/compactdecimalformat.h
@@ -104,7 +104,13 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ UnicodeString& format(double n, UnicodeString& s) const {
+ return DecimalFormat::format(n, s);
+ }
+#else
using DecimalFormat::format;
+#endif
/**
* Format a double or long number using base-10 representation.
diff --git a/source/i18n/unicode/datefmt.h b/source/i18n/unicode/datefmt.h
index 983f136..4531dc5 100644
--- a/source/i18n/unicode/datefmt.h
+++ b/source/i18n/unicode/datefmt.h
@@ -221,7 +221,13 @@ public:
virtual UBool operator==(const Format&) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+#else
using Format::format;
+#endif
/**
* Format an object to produce a string. This method handles Formattable
diff --git a/source/i18n/unicode/decimfmt.h b/source/i18n/unicode/decimfmt.h
index 138855b..4ed2995 100644
--- a/source/i18n/unicode/decimfmt.h
+++ b/source/i18n/unicode/decimfmt.h
@@ -918,7 +918,35 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo) const {
+ return NumberFormat::format(number, appendTo);
+ }
+
+ virtual UnicodeString& format (double number,
+ icu::UnicodeString& appendTo,
+ UErrorCode& status) const {
+ return NumberFormat::format(number, appendTo, status);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return NumberFormat::format(f, s, i, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPosition& p, UErrorCode& e) const {
+ return NumberFormat::format(f, s, p, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e)
+ const {
+ return NumberFormat::format(f, s, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Format a double or long number using base-10 representation.
@@ -1131,7 +1159,15 @@ public:
FieldPosition& pos,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ void parse(const UnicodeString& text,
+ Formattable& result,
+ UErrorCode& status) const {
+ NumberFormat::parse(text, result, status);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Parse the given string using this object's choices. The method
diff --git a/source/i18n/unicode/dtitvfmt.h b/source/i18n/unicode/dtitvfmt.h
index fb27eec..8fefb9e 100644
--- a/source/i18n/unicode/dtitvfmt.h
+++ b/source/i18n/unicode/dtitvfmt.h
@@ -373,7 +373,9 @@ public:
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 --git a/source/i18n/unicode/measfmt.h b/source/i18n/unicode/measfmt.h
index 61a1e86..0a272a8 100644
--- a/source/i18n/unicode/measfmt.h
+++ b/source/i18n/unicode/measfmt.h
@@ -92,8 +92,25 @@ class DateFormat;
*/
class U_I18N_API MeasureFormat : public Format {
public:
+#if __GNUC__ == 2
+ void parseObject (const UnicodeString& s, Formattable& f, UErrorCode& e)
+ const {
+ Format::parseObject(s, f, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+#else
using Format::parseObject;
using Format::format;
+#endif
/**
* Constructor.
diff --git a/source/i18n/unicode/msgfmt.h b/source/i18n/unicode/msgfmt.h
index 5de91e4..8f9f995 100644
--- a/source/i18n/unicode/msgfmt.h
+++ b/source/i18n/unicode/msgfmt.h
@@ -622,7 +622,17 @@ public:
virtual const Format** getFormats(int32_t& count) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) {
+ return Format::format(f, s, e);
+ }
+#else
using Format::format;
+#endif
/**
* Formats the given array of arguments into a user-readable string.
@@ -884,6 +894,9 @@ private:
PluralRules* rules;
UPluralType type;
};
+#if __GNUC__ == 2
+ friend class PluralSelectorProvider;
+#endif
/**
* A MessageFormat formats an array of arguments. Each argument
diff --git a/source/i18n/unicode/numfmt.h b/source/i18n/unicode/numfmt.h
index 164c657..4b03222 100644
--- a/source/i18n/unicode/numfmt.h
+++ b/source/i18n/unicode/numfmt.h
@@ -235,7 +235,15 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ virtual UnicodeString& format (const Formattable& obj,
+ UnicodeString& appendTo,
+ UErrorCode & status) const {
+ return Format::format(obj, appendTo, status);
+ }
+#else
using Format::format;
+#endif
/**
* Format an object to produce a string. This method handles
diff --git a/source/i18n/unicode/plurfmt.h b/source/i18n/unicode/plurfmt.h
index f7099d8..bedaf01 100644
--- a/source/i18n/unicode/plurfmt.h
+++ b/source/i18n/unicode/plurfmt.h
@@ -313,7 +313,14 @@ public:
void applyPattern(const UnicodeString& pattern, UErrorCode& status);
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return Format::format(f, s, i, e);
+ }
+#else
using Format::format;
+#endif
/**
* Formats a plural message for a given number.
diff --git a/source/i18n/unicode/rbnf.h b/source/i18n/unicode/rbnf.h
index 7058c96..d0ad947 100644
--- a/source/i18n/unicode/rbnf.h
+++ b/source/i18n/unicode/rbnf.h
@@ -741,7 +741,23 @@ public:
const Locale& locale = Locale::getDefault());
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e)
+ const {
+ return NumberFormat::format(f, s, e);
+ }
+
+ UnicodeString& format(double n, UnicodeString& s) const {
+ return NumberFormat::format(n, s);
+ }
+
+ UnicodeString& format(int64_t n, UnicodeString& s, FieldPosition& p,
+ UErrorCode& e) const {
+ return NumberFormat::format(n, s, p, e);
+ }
+#else
using NumberFormat::format;
+#endif
/**
* Formats the specified 32-bit number using the default ruleset.
@@ -827,7 +843,13 @@ public:
FieldPosition& pos,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ void parse(const UnicodeString& s, Formattable& f, UErrorCode& e) const {
+ return NumberFormat::parse(s, f, e);
+ }
+#else
using NumberFormat::parse;
+#endif
/**
* Parses the specfied string, beginning at the specified position, according
diff --git a/source/i18n/unicode/selfmt.h b/source/i18n/unicode/selfmt.h
index 635144b..7247839 100644
--- a/source/i18n/unicode/selfmt.h
+++ b/source/i18n/unicode/selfmt.h
@@ -219,7 +219,9 @@ public:
void applyPattern(const UnicodeString& pattern, UErrorCode& status);
+#if __GNUC__ > 2
using Format::format;
+#endif
/**
* Selects the phrase for the given keyword
@@ -340,9 +342,9 @@ public:
*/
virtual UClassID getDynamicClassID() const;
-private:
friend class MessageFormat;
+private:
SelectFormat(); // default constructor not implemented.
/**
diff --git a/source/i18n/unicode/smpdtfmt.h b/source/i18n/unicode/smpdtfmt.h
index ccdaff4..69f70ec 100644
--- a/source/i18n/unicode/smpdtfmt.h
+++ b/source/i18n/unicode/smpdtfmt.h
@@ -870,7 +870,27 @@ public:
virtual UBool operator==(const Format& other) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& f, UnicodeString& s,
+ FieldPositionIterator* i, UErrorCode& e) const {
+ return DateFormat::format(f, s, i, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, FieldPosition& p,
+ UErrorCode& e) const {
+ return DateFormat::format(f, s, p, e);
+ }
+ UnicodeString& format(const Formattable& f, UnicodeString& s, UErrorCode& e) const {
+ return Format::format(f, s, e);
+ }
+ UnicodeString& format(const UDate& d, UnicodeString& s, FieldPosition& f) const {
+ return DateFormat::format(d, s, f);
+ }
+ UnicodeString& format(const UDate& d, UnicodeString& s) const {
+ return DateFormat::format(d, s);
+ }
+#else
using DateFormat::format;
+#endif
/**
* Format a date or time, which is the standard millis since 24:00 GMT, Jan
@@ -915,7 +935,16 @@ public:
FieldPositionIterator* posIter,
UErrorCode& status) const;
+#if __GNUC__ == 2
+ UDate parse(const UnicodeString& s, UErrorCode& e) const {
+ return DateFormat::parse(s, e);
+ }
+ UDate parse (const UnicodeString& s, ParsePosition& p) const {
+ return DateFormat::parse(s, p);
+ }
+#else
using DateFormat::parse;
+#endif
/**
* Parse a date/time string beginning at the given parse position. For
diff --git a/source/i18n/unicode/tblcoll.h b/source/i18n/unicode/tblcoll.h
index e56f189..2108699 100644
--- a/source/i18n/unicode/tblcoll.h
+++ b/source/i18n/unicode/tblcoll.h
@@ -254,7 +254,22 @@ public:
const CharacterIterator& source) const;
// Make deprecated versions of Collator::compare() visible.
+#if __GNUC__ == 2
+ EComparisonResult compare(const UChar* source, int sourceLength,
+ const UChar* target, int targetLength) const {
+ return Collator::compare(source, sourceLength, target, targetLength);
+ }
+ EComparisonResult compare(const UnicodeString& s1, const UnicodeString& s2,
+ int i) const {
+ return Collator::compare(s1, s2, i);
+ }
+ EComparisonResult compare(const UnicodeString& s1, const UnicodeString& s2)
+ const {
+ return Collator::compare(s1, s2);
+ }
+#else
using Collator::compare;
+#endif
/**
* The comparison function compares the character data stored in two
diff --git a/source/i18n/unicode/tzfmt.h b/source/i18n/unicode/tzfmt.h
index 24f0e49..969e08a 100644
--- a/source/i18n/unicode/tzfmt.h
+++ b/source/i18n/unicode/tzfmt.h
@@ -520,7 +520,14 @@ public:
*/
UnicodeString& formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const;
+#if __GNUC__ == 2
+ UnicodeString& format(const Formattable& data, UnicodeString& string,
+ FieldPositionIterator* iterator, UErrorCode& error) const {
+ return Format::format(data, string, iterator, error);
+ }
+#else
using Format::format;
+#endif
/**
* Returns the display name of the time zone at the given date for the style.
--
2.2.2
From 6fe3c3f205284dfb0a2c4d06717bb84cb61f0f66 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:36:37 +0200
Subject: gcc2 fixes in source/common
diff --git a/source/common/unicode/bytestrie.h b/source/common/unicode/bytestrie.h
index 9c77827..367a0ae 100644
--- a/source/common/unicode/bytestrie.h
+++ b/source/common/unicode/bytestrie.h
@@ -338,6 +338,9 @@ public:
// but the code looks more confusing that way.)
UVector32 *stack_;
};
+#if __GNUC__ == 2
+ friend class Iterator;
+#endif
private:
friend class BytesTrieBuilder;
diff --git a/source/common/unicode/bytestriebuilder.h b/source/common/unicode/bytestriebuilder.h
index d00ab9b..afbf59b 100644
--- a/source/common/unicode/bytestriebuilder.h
+++ b/source/common/unicode/bytestriebuilder.h
@@ -152,6 +152,9 @@ private:
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 --git a/source/common/unicode/platform.h b/source/common/unicode/platform.h
index 4829000..2411dd0 100644
--- a/source/common/unicode/platform.h
+++ b/source/common/unicode/platform.h
@@ -708,7 +708,7 @@
/* Use the predefined value. */
#elif defined(U_STATIC_IMPLEMENTATION)
# define U_EXPORT
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && __GNUC__ > 2
# define U_EXPORT __attribute__((visibility("default")))
#elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \
|| (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550)
diff --git a/source/common/unicode/stringtriebuilder.h b/source/common/unicode/stringtriebuilder.h
index 04447e5..21bab82 100644
--- a/source/common/unicode/stringtriebuilder.h
+++ b/source/common/unicode/stringtriebuilder.h
@@ -379,6 +379,15 @@ protected:
int32_t length;
Node *next; // A branch sub-node.
};
+#if __GNUC__ >= 2
+ friend class FinalValueNode;
+ friend class ValueNode;
+ friend class IntermediateValueNode;
+ friend class BranchNode;
+ friend class ListBranchNode;
+ friend class SplitBranchNode;
+ friend class BranchHeadNode;
+#endif
#endif /* U_HIDE_INTERNAL_API */
/** @internal */
diff --git a/source/common/unicode/ucharstrie.h b/source/common/unicode/ucharstrie.h
index 0575a97..9fe81c1 100644
--- a/source/common/unicode/ucharstrie.h
+++ b/source/common/unicode/ucharstrie.h
@@ -356,6 +356,9 @@ public:
// but the code looks more confusing that way.)
UVector32 *stack_;
};
+#if __GNUC__ == 2
+ friend class Iterator;
+#endif
private:
friend class UCharsTrieBuilder;
diff --git a/source/common/unicode/ucharstriebuilder.h b/source/common/unicode/ucharstriebuilder.h
index 35e353d..30f40d9 100644
--- a/source/common/unicode/ucharstriebuilder.h
+++ b/source/common/unicode/ucharstriebuilder.h
@@ -156,6 +156,9 @@ private:
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;
--
2.2.2
From efa9ee8612ac7482e56fa2190ce1b1afd188e268 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Mon, 6 Oct 2014 13:28:09 +0200
Subject: more gcc2 fixes for ICU 54.
diff --git a/source/common/norm2allmodes.h b/source/common/norm2allmodes.h
index 64c84a2..aca1e08 100644
--- a/source/common/norm2allmodes.h
+++ b/source/common/norm2allmodes.h
@@ -193,7 +193,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.decompose(src, limit, &buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -204,7 +206,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
return impl.decompose(src, limit, NULL, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
return impl.isDecompYes(impl.getNorm16(c)) ? UNORM_YES : UNORM_NO;
}
@@ -225,7 +229,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -268,7 +274,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &) const {
return impl.composeQuickCheck(src, limit, onlyContiguous, NULL);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
virtual UNormalizationCheckResult getQuickCheck(UChar32 c) const {
return impl.getCompQuickCheck(impl.getNorm16(c));
}
@@ -296,7 +304,9 @@ private:
ReorderingBuffer &buffer, UErrorCode &errorCode) const {
impl.makeFCD(src, limit, &buffer, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::normalize; // Avoid warning about hiding base class function.
+#endif
virtual void
normalizeAndAppend(const UChar *src, const UChar *limit, UBool doNormalize,
UnicodeString &safeMiddle,
@@ -307,7 +317,9 @@ private:
spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
return impl.makeFCD(src, limit, NULL, errorCode);
}
+#if __GNUC__ != 2
using Normalizer2WithImpl::spanQuickCheckYes; // Avoid warning about hiding base class function.
+#endif
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 --git a/source/common/putilimp.h b/source/common/putilimp.h
index a3e361f..affb1a8 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -113,7 +113,7 @@ typedef size_t uintptr_t;
#if defined(U_TIMEZONE) || defined(U_HAVE_TIMEZONE)
/* Use the predefined value. */
-#elif U_PLATFORM == U_PF_ANDROID
+#elif U_PLATFORM == U_PF_ANDROID || defined(__HAIKU__)
# define U_TIMEZONE timezone
#elif U_PLATFORM_IS_LINUX_BASED
# if defined(__UCLIBC__)
diff --git a/source/common/unicode/platform.h b/source/common/unicode/platform.h
index 2411dd0..61fdfe1 100644
--- a/source/common/unicode/platform.h
+++ b/source/common/unicode/platform.h
@@ -159,7 +159,7 @@
# else
# define U_PLATFORM U_PF_DARWIN
# endif
-#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
+#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__) || defined(__HAIKU__)
# if defined(__FreeBSD__)
# include <sys/endian.h>
# endif
diff --git a/source/common/filteredbrk.cpp b/source/common/filteredbrk.cpp
index 5a8f0b0..d771056 100644
--- a/source/common/filteredbrk.cpp
+++ b/source/common/filteredbrk.cpp
@@ -68,7 +68,13 @@ class U_COMMON_API UStringSet : public UVector {
inline UBool contains(const UnicodeString& s) {
return contains((void*) &s);
}
+#if __GNUC__ == 2
+ UBool contains(void* s) {
+ return UVector::contains(s);
+ }
+#else
using UVector::contains;
+#endif
/**
* Return the ith UnicodeString alias
*/
--
2.2.2
From d1ec5200e5938bab93750e171a58182ea76eebc1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 26 Mar 2015 18:39:42 +0000
Subject: gcc2 fixes for tztools.
diff --git a/source/tools/tzcode/private.h b/source/tools/tzcode/private.h
index 1a85c88..0ee3329 100644
--- a/source/tools/tzcode/private.h
+++ b/source/tools/tzcode/private.h
@@ -120,7 +120,7 @@
*/
#ifndef HAVE_STDINT_H
#define HAVE_STDINT_H \
- (199901 <= __STDC_VERSION__ || \
+ (defined(__HAIKU__) || 199901 <= __STDC_VERSION__ || \
2 < (__GLIBC__ + (0 < __GLIBC_MINOR__)))
#endif /* !defined HAVE_STDINT_H */
--
2.2.2
From 33866a5b7922345f39321cddad64cf36a9f401e9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 11 Jan 2016 21:56:11 +0000
Subject: [PATCH] gcc2 fixes for icu 56.
---
source/tools/genrb/reslist.cpp | 6 +++---
source/tools/genrb/reslist.h | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/source/tools/genrb/reslist.cpp b/source/tools/genrb/reslist.cpp
index 9f8365d..7158961 100644
--- a/source/tools/genrb/reslist.cpp
+++ b/source/tools/genrb/reslist.cpp
@@ -303,14 +303,14 @@ StringBaseResource::~StringBaseResource() {}
static int32_t U_CALLCONV
string_hash(const UElement key) {
- const StringResource *res = static_cast<const StringResource *>(key.pointer);
+ const StringResource *res = reinterpret_cast<const StringResource *>(key.pointer);
return res->fString.hashCode();
}
static UBool U_CALLCONV
string_comp(const UElement key1, const UElement key2) {
- const StringResource *res1 = static_cast<const StringResource *>(key1.pointer);
- const StringResource *res2 = static_cast<const StringResource *>(key2.pointer);
+ const StringResource *res1 = reinterpret_cast<const StringResource *>(key1.pointer);
+ const StringResource *res2 = reinterpret_cast<const StringResource *>(key2.pointer);
return res1->fString == res2->fString;
}
diff --git a/source/tools/genrb/reslist.h b/source/tools/genrb/reslist.h
index 032c0c2..1017b91 100644
--- a/source/tools/genrb/reslist.h
+++ b/source/tools/genrb/reslist.h
@@ -65,7 +65,7 @@ typedef struct KeyMapEntry {
} KeyMapEntry;
/* Resource bundle root table */
-struct SRBRoot {
+typedef struct SRBRoot {
SRBRoot(const UString *comment, UBool isPoolBundle, UErrorCode &errorCode);
~SRBRoot();
@@ -113,8 +113,8 @@ public:
int32_t fPoolStringIndexLimit;
int32_t fPoolStringIndex16Limit;
int32_t fLocalStringIndexLimit;
- SRBRoot *fWritePoolBundle;
-};
+ struct SRBRoot *fWritePoolBundle;
+} SRBRoot;
/* write a java resource file */
// TODO: C++ify
@@ -217,7 +217,7 @@ struct SResource {
int32_t fKey; /* Index into bundle->fKeys; -1 if no key. */
int32_t fKey16; /* Key16 version of fKey for Table & Table16; -1 if no key or it does not fit. */
int line; /* used internally to report duplicate keys in tables */
- SResource *fNext; /* This is for internal chaining while building */
+ struct SResource *fNext; /* This is for internal chaining while building */
struct UString fComment;
};
@@ -344,7 +344,7 @@ public:
void writeUTF16v2(int32_t base, icu::UnicodeString &dest);
- StringResource *fSame; // used for duplicates
+ class StringResource *fSame; // used for duplicates
int32_t fSuffixOffset; // this string is a suffix of fSame at this offset
int32_t fNumCopies; // number of equal strings represented by one stringSet element
int32_t fNumUnitsSaved; // from not writing duplicates and suffixes
--
2.7.0

View File

@@ -1,203 +0,0 @@
From 3c6dff2a3728889f67afcc5e2e5a667d59aa2b84 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Sun, 19 Apr 2015 13:38:07 +0200
Subject: buildsystem configuration for Haiku
diff --git a/source/acinclude.m4 b/source/acinclude.m4
index 179c1c8..6a25dc4 100644
--- a/source/acinclude.m4
+++ b/source/acinclude.m4
@@ -470,6 +470,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
if test "$GCC" = yes
then
case "${host}" in
+ *-*-haiku*)
+ CFLAGS="$CFLAGS -std=c9x"
+ ;;
*)
# Do not use -ansi. It limits us to C90, and it breaks some platforms.
# We use -std=c99 to disable the gnu99 defaults and its associated warnings
diff --git a/source/config/mh-haiku b/source/config/mh-haiku
index ccf956e..55a3ed2 100644
--- a/source/config/mh-haiku
+++ b/source/config/mh-haiku
@@ -18,7 +18,7 @@ LIBCPPFLAGS =
THREADSCPPFLAGS =
#
-CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1
+CPPFLAGS += -DU_CHARSET_IS_UTF8=1
## Compiler switch to embed a runtime search path
LD_RPATH=
--
2.2.2
From 12c3d34d0c531dcd3af7ae9c0119001bcdf8261a Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 3 Oct 2014 11:07:01 +0200
Subject: Don't call tzset and tzname on Haiku
While they exist, they are implemented using ICU, and trying to use them
within ICU results in a deadlock.
diff --git a/source/common/putilimp.h b/source/common/putilimp.h
index d2c1c66..a3e361f 100644
--- a/source/common/putilimp.h
+++ b/source/common/putilimp.h
@@ -105,7 +105,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZSET _tzset
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZSET tzset
@@ -140,7 +140,7 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
# define U_TZNAME _tzname
-#elif U_PLATFORM == U_PF_OS400
+#elif U_PLATFORM == U_PF_OS400 || defined(__HAIKU__)
/* not defined */
#else
# define U_TZNAME tzname
diff --git a/source/configure.ac b/source/configure.ac
index b30c8d0..89902b4 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -790,50 +790,26 @@ else
fi
AC_SUBST(U_HAVE_POPEN)
-AC_CHECK_FUNC(tzset)
+#AC_CHECK_FUNC(tzset)
U_HAVE_TZSET=0
-if test x$ac_cv_func_tzset = xyes
-then
- U_TZSET=tzset
- U_HAVE_TZSET=1
-else
- AC_CHECK_FUNC(_tzset)
- if test x$ac_cv_func__tzset = xyes
- then
- U_TZSET=_tzset
- U_HAVE_TZSET=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
- fi
-fi
+#if test x$ac_cv_func_tzset = xyes
+#then
+# U_TZSET=tzset
+# U_HAVE_TZSET=1
+#else
+# AC_CHECK_FUNC(_tzset)
+# if test x$ac_cv_func__tzset = xyes
+# then
+# U_TZSET=_tzset
+# U_HAVE_TZSET=1
+# else
+# CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZSET=0"
+# fi
+#fi
AC_SUBST(U_HAVE_TZSET)
AC_SUBST(U_TZSET)
U_HAVE_TZNAME=0
-AC_CACHE_CHECK(for tzname,ac_cv_var_tzname,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifndef __USE_POSIX
-#define __USE_POSIX
-#endif
-#include <stdlib.h>
-#include <time.h>
-#ifndef tzname /* For SGI. */
-extern char *tzname[]; /* RS6000 and others reject char **tzname. */
-#endif]], [atoi(*tzname);])],[ac_cv_var_tzname=yes],[ac_cv_var_tzname=no])])
-if test $ac_cv_var_tzname = yes; then
- U_TZNAME=tzname
- U_HAVE_TZNAME=1
-else
- AC_CACHE_CHECK(for _tzname,ac_cv_var__tzname,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
- #include <time.h>
- extern char *_tzname[];]], [atoi(*_tzname);])],[ac_cv_var__tzname=yes],[ac_cv_var__tzname=no])])
- if test $ac_cv_var__tzname = yes; then
- U_TZNAME=_tzname
- U_HAVE_TZNAME=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TZNAME=0"
- fi
-fi
AC_SUBST(U_HAVE_TZNAME)
AC_SUBST(U_TZNAME)
--
2.2.2
From 85cb05132c7caf7c17c786a816efb31a08a40319 Mon Sep 17 00:00:00 2001
From: Oliver Tappe <zooey@hirschkaefer.de>
Date: Fri, 14 Nov 2014 23:56:19 +0100
Subject: Restore missing parts for proper Haiku port.
* Actually set the platform to U_HAIKU for Haiku target.
* Use gcc to build icudt54l_dat.o for Haiku target.
diff --git a/source/configure.ac b/source/configure.ac
index 89902b4..9f3b893 100644
--- a/source/configure.ac
+++ b/source/configure.ac
@@ -626,7 +626,7 @@ AC_MSG_CHECKING([for genccode assembly])
# Check to see if genccode can generate simple assembly.
GENCCODE_ASSEMBLY=
case "${host}" in
-*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu)
+*-linux*|*-kfreebsd*-gnu*|i*86-*-*bsd*|i*86-pc-gnu|*-haiku*)
if test "$GCC" = yes; then
# We're using gcc, and the simple -a gcc command line works for genccode
GENCCODE_ASSEMBLY="-a gcc"
@@ -1227,6 +1227,7 @@ case "${host}" in
*-*-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 ;;
--
2.2.2
From 093540e0271aad6cc2aa23bfd8af1e37d04c5ef4 Mon Sep 17 00:00:00 2001
From: Michael Lotz <mmlr@mlotz.ch>
Date: Sat, 19 Dec 2015 14:44:35 +0000
Subject: [PATCH] Fix missing dependency of yearistype.sh to tzdata extraction.
This caused parallel builds to fail because the script file wasn't yet
extracted when it was copied. The regression was introduced in r26995
when the dependency was reused for TDATA which yearistype.sh isn't part
of.
---
source/tools/tzcode/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/tools/tzcode/Makefile.in b/source/tools/tzcode/Makefile.in
index b6ec447..d97e485 100644
--- a/source/tools/tzcode/Makefile.in
+++ b/source/tools/tzcode/Makefile.in
@@ -125,7 +125,7 @@ $(ICUZDUMPTARG): $(srcdir)/icuzdump.cpp
$(LINK.cc) -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/io -pedantic $(srcdir)/icuzdump.cpp $(LIBICUUC) $(LIBICUDT) $(LIBICUI18N) $(LIBICUIO) $(LIBICUTOOLUTIL) -o $@
-$(TDATA): tdatamarker
+$(TDATA) $(XDATA): tdatamarker
tdatamarker: $(TZDATA)
gunzip -d < $(TZDATA) | tar xf - --exclude=Makefile
--
2.2.2