Update icu x86_64 package with namespace renaming enabled.

"Renaming" means the icu namespace is suffixed with the version number,
atm icu_55. Using "renaming" allows to use two different versions of ICU,
thus easing upgrades. For instance haikuwebkit uses a current version of ICU,
while the system uses a newer one after an upgrade.

* Replace all uses of the icu namespace in our public headers, with a macro
defaulting to icu. As the namespace is only used for private fields pointers,
there should be no impact.
* Locale kit *.cpp have to import the macro from <unicode/uversion.h> *before*
including any locale headers. Ditto for a Time preferences cpp file. This way,
the correct current icu namespace is referenced.
* Fixes bug #12057.
This commit is contained in:
Jérôme Duval
2015-05-10 21:52:36 +02:00
parent 87af13952c
commit 73de58376a
27 changed files with 69 additions and 25 deletions
+5 -2
View File
@@ -10,7 +10,10 @@
#include <SupportDefs.h>
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class Collator;
};
@@ -73,7 +76,7 @@ public:
private:
status_t _SetStrength(int8 strength) const;
mutable icu::Collator* fICUCollator;
mutable U_ICU_NAMESPACE::Collator* fICUCollator;
int8 fDefaultStrength;
bool fIgnorePunctuation;
};
+5 -2
View File
@@ -16,7 +16,10 @@ class BBitmap;
class BLanguage;
class BMessage;
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class DateFormat;
class Locale;
}
@@ -45,7 +48,7 @@ public:
private:
friend class Private;
icu::Locale* fICULocale;
U_ICU_NAMESPACE::Locale* fICULocale;
};
+5 -2
View File
@@ -14,7 +14,10 @@
#include <Locker.h>
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class DateFormat;
}
@@ -76,7 +79,7 @@ public:
BDate& output);
private:
icu::DateFormat* _CreateDateFormatter(
U_ICU_NAMESPACE::DateFormat* _CreateDateFormatter(
const BDateFormatStyle style) const;
};
+1 -1
View File
@@ -53,7 +53,7 @@ public:
const BTimeZone* timeZone = NULL) const;
private:
icu::DateFormat* _CreateDateTimeFormatter(
U_ICU_NAMESPACE::DateFormat* _CreateDateTimeFormatter(
const BString& format) const;
};
+5 -2
View File
@@ -14,7 +14,10 @@
class BTimeZone;
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class GregorianCalendar;
}
@@ -43,7 +46,7 @@ public:
private:
BString fSeparator;
BTimeUnitFormat fTimeUnitFormat;
icu::GregorianCalendar* fCalendar;
U_ICU_NAMESPACE::GregorianCalendar* fCalendar;
};
+5 -2
View File
@@ -17,7 +17,10 @@ class BBitmap;
class BLanguage;
class BMessage;
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class DateFormat;
class Locale;
}
@@ -137,7 +140,7 @@ private:
bool fUseStringsFromPreferredLanguage;
icu::Locale* fICULocale;
U_ICU_NAMESPACE::Locale* fICULocale;
};
+5 -2
View File
@@ -15,7 +15,10 @@ class BBitmap;
// We must not include the icu headers in there as it could mess up binary
// compatibility.
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class Locale;
}
@@ -64,7 +67,7 @@ private:
friend class Private;
uint8 fDirection;
icu::Locale* fICULocale;
U_ICU_NAMESPACE::Locale* fICULocale;
};
+6 -3
View File
@@ -13,7 +13,10 @@
#include <Format.h>
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class MessageFormat;
class UnicodeString;
}
@@ -31,10 +34,10 @@ public:
status_t Format(BString& buffer, const int64 arg) const;
private:
status_t _Initialize(const icu::UnicodeString&);
status_t _Initialize(const U_ICU_NAMESPACE::UnicodeString&);
private:
icu::MessageFormat* fFormatter;
U_ICU_NAMESPACE::MessageFormat* fFormatter;
};
+1 -1
View File
@@ -48,7 +48,7 @@ public:
BPrivate::BTime& output);
private:
icu::DateFormat* _CreateTimeFormatter(
U_ICU_NAMESPACE::DateFormat* _CreateTimeFormatter(
const BTimeFormatStyle style) const;
};
+5 -2
View File
@@ -12,7 +12,10 @@
class BString;
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class TimeUnitFormat;
}
@@ -53,7 +56,7 @@ public:
) const;
private:
icu::TimeUnitFormat* fFormatter;
U_ICU_NAMESPACE::TimeUnitFormat* fFormatter;
};
+6 -3
View File
@@ -9,7 +9,10 @@
#include <String.h>
namespace icu {
#ifndef U_ICU_NAMESPACE
#define U_ICU_NAMESPACE icu
#endif
namespace U_ICU_NAMESPACE {
class Locale;
class TimeZone;
}
@@ -46,8 +49,8 @@ public:
private:
friend class Private;
icu::TimeZone* fICUTimeZone;
icu::Locale* fICULocale;
U_ICU_NAMESPACE::TimeZone* fICUTimeZone;
U_ICU_NAMESPACE::Locale* fICULocale;
status_t fInitStatus;
mutable uint32 fInitializedFields;