struct UMutex {
pthread_mutex_t fMutex;
- UMTX fUserMutex;
- UBool fInitialized;
};
-#define U_MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER, NULL, FALSE}
+typedef struct UMutex UMutex;
+#define U_MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER}
#else
-/* Unknow platform type. */
-struct UMutex {
- void *fMutex;
-};
-#define U_MUTEX_INITIALIZER {NULL}
+
+/*
+ * Unknow platform type.
+ * This is an error condition. ICU requires mutexes.
+ */
+
#error Unknown Platform.
#endif
-#if (U_PLATFORM != U_PF_CYGWIN && U_PLATFORM != U_PF_MINGW) || defined(CYGWINMSVC)
-typedef struct UMutex UMutex;
-#endif
-
+
+
+/**************************************************************************************
+ *
+ * Mutex Implementation function declaratations.
+ * Declarations are platform neutral.
+ * Implementations, in umutex.cpp, are platform specific.
+ *
+ ************************************************************************************/
+
/* Lock a mutex.
* @param mutex The given mutex to be locked. Pass NULL to specify
* the global ICU mutex. Recursive locks are an error
* and may cause a deadlock on some platforms.
*/
-U_CAPI void U_EXPORT2 umtx_lock(UMutex* mutex);
+U_INTERNAL void U_EXPORT2 umtx_lock(UMutex* mutex);
/* Unlock a mutex.
* @param mutex The given mutex to be unlocked. Pass NULL to specify
* the global ICU mutex.
*/
-U_CAPI void U_EXPORT2 umtx_unlock (UMutex* mutex);
+U_INTERNAL void U_EXPORT2 umtx_unlock (UMutex* mutex);
-/*
- * Atomic Increment and Decrement of an int32_t value.
- *
- * Return Values:
- * If the result of the operation is zero, the return zero.
- * If the result of the operation is not zero, the sign of returned value
- * is the same as the sign of the result, but the returned value itself may
- * be different from the result of the operation.
- */
-U_CAPI int32_t U_EXPORT2 umtx_atomic_inc(int32_t *);
-U_CAPI int32_t U_EXPORT2 umtx_atomic_dec(int32_t *);
-
-#endif /*_CMUTEX*/
+#endif /* UMUTEX_H */
/*eof*/
diff --git a/intl/icu/source/common/unames.cpp b/intl/icu/source/common/unames.cpp
--- a/intl/icu/source/common/unames.cpp
+++ b/intl/icu/source/common/unames.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -20,6 +20,7 @@
#include "unicode/udata.h"
#include "unicode/utf.h"
#include "unicode/utf16.h"
+#include "uassert.h"
#include "ustr_imp.h"
#include "umutex.h"
#include "cmemory.h"
@@ -28,6 +29,8 @@
#include "udataswp.h"
#include "uprops.h"
+U_NAMESPACE_BEGIN
+
/* prototypes ------------------------------------------------------------- */
#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
@@ -102,7 +105,7 @@ typedef struct {
static UDataMemory *uCharNamesData=NULL;
static UCharNames *uCharNames=NULL;
-static UErrorCode gLoadErrorCode=U_ZERO_ERROR;
+static icu::UInitOnce gCharNamesInitOnce = U_INITONCE_INITIALIZER;
/*
* Maximum length of character names (regular & 1.0).
@@ -168,6 +171,7 @@ static UBool U_CALLCONV unames_cleanup(v
if(uCharNames) {
uCharNames = NULL;
}
+ gCharNamesInitOnce.reset();
gMaxNameLength=0;
return TRUE;
}
@@ -187,52 +191,25 @@ isAcceptable(void * /*context*/,
pInfo->formatVersion[0]==1);
}
+static void U_CALLCONV
+loadCharNames(UErrorCode &status) {
+ U_ASSERT(uCharNamesData == NULL);
+ U_ASSERT(uCharNames == NULL);
+
+ uCharNamesData = udata_openChoice(NULL, DATA_TYPE, DATA_NAME, isAcceptable, NULL, &status);
+ if(U_FAILURE(status)) {
+ uCharNamesData = NULL;
+ } else {
+ uCharNames = (UCharNames *)udata_getMemory(uCharNamesData);
+ }
+ ucln_common_registerCleanup(UCLN_COMMON_UNAMES, unames_cleanup);
+}
+
+
static UBool
isDataLoaded(UErrorCode *pErrorCode) {
- /* load UCharNames from file if necessary */
- UBool isCached;
-
- /* do this because double-checked locking is broken */
- UMTX_CHECK(NULL, (uCharNames!=NULL), isCached);
-
- if(!isCached) {
- UCharNames *names;
- UDataMemory *data;
-
- /* check error code from previous attempt */
- if(U_FAILURE(gLoadErrorCode)) {
- *pErrorCode=gLoadErrorCode;
- return FALSE;
- }
-
- /* open the data outside the mutex block */
- data=udata_openChoice(NULL, DATA_TYPE, DATA_NAME, isAcceptable, NULL, pErrorCode);
- if(U_FAILURE(*pErrorCode)) {
- gLoadErrorCode=*pErrorCode;
- return FALSE;
- }
-
- names=(UCharNames *)udata_getMemory(data);
-
- /* in the mutex block, set the data for this process */
- {
- umtx_lock(NULL);
- if(uCharNames==NULL) {
- uCharNamesData=data;
- uCharNames=names;
- data=NULL;
- names=NULL;
- ucln_common_registerCleanup(UCLN_COMMON_UNAMES, unames_cleanup);
- }
- umtx_unlock(NULL);
- }
-
- /* if a different thread set it first, then close the extra data */
- if(data!=NULL) {
- udata_close(data); /* NULL if it was set correctly */
- }
- }
- return TRUE;
+ umtx_initOnce(gCharNamesInitOnce, &loadCharNames, *pErrorCode);
+ return U_SUCCESS(*pErrorCode);
}
#define WRITE_CHAR(buffer, bufferLength, bufferPos, c) { \
@@ -2109,6 +2086,8 @@ uchar_swapNames(const UDataSwapper *ds,
return headerSize+(int32_t)offset;
}
+U_NAMESPACE_END
+
/*
* Hey, Emacs, please set the following:
*
diff --git a/intl/icu/source/common/unicode/appendable.h b/intl/icu/source/common/unicode/appendable.h
--- a/intl/icu/source/common/unicode/appendable.h
+++ b/intl/icu/source/common/unicode/appendable.h
@@ -140,10 +140,6 @@ public:
int32_t desiredCapacityHint,
UChar *scratch, int32_t scratchCapacity,
int32_t *resultCapacity);
-
-private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
/**
diff --git a/intl/icu/source/common/unicode/brkiter.h b/intl/icu/source/common/unicode/brkiter.h
--- a/intl/icu/source/common/unicode/brkiter.h
+++ b/intl/icu/source/common/unicode/brkiter.h
@@ -1,6 +1,6 @@
/*
********************************************************************************
-* Copyright (C) 1997-2012, International Business Machines
+* Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@@ -182,6 +182,11 @@ public:
* Utext that was passed as a parameter, but that the underlying text itself
* must not be altered while being referenced by the break iterator.
*
+ * All index positions returned by break iterator functions are
+ * native indices from the UText. For example, when breaking UTF-8
+ * encoded text, the break positions returned by next(), previous(), etc.
+ * will be UTF-8 string indices, not UTF-16 positions.
+ *
* @param text The UText used to change the text.
* @param status receives any error codes.
* @stable ICU 3.4
@@ -285,6 +290,52 @@ public:
*/
virtual int32_t next(int32_t n) = 0;
+ /**
+ * For RuleBasedBreakIterators, return the status tag from the
+ * break rule that determined the most recently
+ * returned break position.
+ *
+ * For break iterator types that do not support a rule status,
+ * a default value of 0 is returned.
+ *
+ * @return the status from the break rule that determined the most recently
+ * returned break position.
+ * @see RuleBaseBreakIterator::getRuleStatus()
+ * @see UWordBreak
+ * @draft ICU 52
+ */
+ virtual int32_t getRuleStatus() const;
+
+ /**
+ * For RuleBasedBreakIterators, get the status (tag) values from the break rule(s)
+ * that determined the most recently returned break position.
+ *
+ * For break iterator types that do not support rule status,
+ * no values are returned.
+ *
+ * The returned status value(s) are stored into an array provided by the caller.
+ * The values are stored in sorted (ascending) order.
+ * If the capacity of the output array is insufficient to hold the data,
+ * the output will be truncated to the available length, and a
+ * U_BUFFER_OVERFLOW_ERROR will be signaled.
+ *
+ * @see RuleBaseBreakIterator::getRuleStatusVec
+ *
+ * @param fillInVec an array to be filled in with the status values.
+ * @param capacity the length of the supplied vector. A length of zero causes
+ * the function to return the number of status values, in the
+ * normal way, without attemtping to store any values.
+ * @param status receives error codes.
+ * @return The number of rule status values from rules that determined
+ * the most recent boundary returned by the break iterator.
+ * In the event of a U_BUFFER_OVERFLOW_ERROR, the return value
+ * is the total number of status values that were available,
+ * not the reduced number that were actually returned.
+ * @see getRuleStatus
+ * @draft ICU 52
+ */
+ virtual int32_t getRuleStatusVec(int32_t *fillInVec, int32_t capacity, UErrorCode &status);
+
/**
* Create BreakIterator for word-breaks using the given locale.
* Returns an instance of a BreakIterator implementing word breaks.
@@ -435,6 +486,8 @@ public:
UnicodeString& name);
/**
+ * Deprecated functionality. Use clone() instead.
+ *
* Thread safe client-buffer-based cloning operation
* Do NOT call delete on a safeclone, since 'new' is not used to create it.
* @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
@@ -449,20 +502,24 @@ public:
* necessary.
* @return pointer to the new clone
*
- * @stable ICU 2.0
+ * @deprecated ICU 52. Use clone() instead.
*/
virtual BreakIterator * createBufferClone(void *stackBuffer,
int32_t &BufferSize,
UErrorCode &status) = 0;
+#ifndef U_HIDE_DEPRECATED_API
+
/**
* Determine whether the BreakIterator was created in user memory by
* createBufferClone(), and thus should not be deleted. Such objects
* must be closed by an explicit call to the destructor (not delete).
- * @stable ICU 2.0
+ * @deprecated ICU 52. Always delete the BreakIterator.
*/
inline UBool isBufferClone(void);
+#endif /* U_HIDE_DEPRECATED_API */
+
#if !UCONFIG_NO_SERVICE
/**
* Register a new break iterator of the indicated kind, to use in the given locale.
@@ -541,7 +598,7 @@ public:
* @param status Receives errors detected by this function.
* @return *this
*
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual BreakIterator &refreshInputText(UText *input, UErrorCode &status) = 0;
@@ -559,9 +616,7 @@ protected:
/** @internal */
BreakIterator();
/** @internal */
- UBool fBufferClone;
- /** @internal */
- BreakIterator (const BreakIterator &other) : UObject(other), fBufferClone(FALSE) {}
+ BreakIterator (const BreakIterator &other) : UObject(other) {}
private:
@@ -576,15 +631,18 @@ private:
BreakIterator& operator=(const BreakIterator&);
};
+#ifndef U_HIDE_DEPRECATED_API
+
inline UBool BreakIterator::isBufferClone()
{
- return fBufferClone;
+ return FALSE;
}
+#endif /* U_HIDE_DEPRECATED_API */
+
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
#endif // _BRKITER
//eof
-
diff --git a/intl/icu/source/common/unicode/bytestriebuilder.h b/intl/icu/source/common/unicode/bytestriebuilder.h
--- a/intl/icu/source/common/unicode/bytestriebuilder.h
+++ b/intl/icu/source/common/unicode/bytestriebuilder.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2010-2012, International Business Machines
+* Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: bytestriebuilder.h
@@ -71,6 +71,9 @@ public:
* Builds a BytesTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called.
*
+ * A BytesTrie cannot be empty. At least one (byte sequence, value) pair
+ * must have been add()ed.
+ *
* This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well.
@@ -88,6 +91,9 @@ public:
* Builds a BytesTrie for the add()ed data and byte-serializes it.
* Once built, no further data can be add()ed until clear() is called.
*
+ * A BytesTrie cannot be empty. At least one (byte sequence, value) pair
+ * must have been add()ed.
+ *
* Multiple calls to buildStringPiece() return StringPieces referring to the
* builder's same byte array, without rebuilding.
* If buildStringPiece() is called after build(), the trie will be
diff --git a/intl/icu/source/common/unicode/dbbi.h b/intl/icu/source/common/unicode/dbbi.h
--- a/intl/icu/source/common/unicode/dbbi.h
+++ b/intl/icu/source/common/unicode/dbbi.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1999-2006 IBM Corp. All rights reserved.
+* Copyright (C) 1999-2006,2013 IBM Corp. All rights reserved.
**********************************************************************
* Date Name Description
* 12/1/99 rgillam Complete port from Java.
@@ -22,17 +22,16 @@
U_NAMESPACE_BEGIN
+#ifndef U_HIDE_DEPRECATED_API
/**
* An obsolete subclass of RuleBasedBreakIterator. Handling of dictionary-
* based break iteration has been folded into the base class. This class
* is deprecated as of ICU 3.6.
+ * @deprecated ICU 3.6
*/
-
-#ifndef U_HIDE_DEPRECATED_API
-
typedef RuleBasedBreakIterator DictionaryBasedBreakIterator;
-#endif
+#endif /* U_HIDE_DEPRECATED_API */
U_NAMESPACE_END
diff --git a/intl/icu/source/common/unicode/enumset.h b/intl/icu/source/common/unicode/enumset.h
--- a/intl/icu/source/common/unicode/enumset.h
+++ b/intl/icu/source/common/unicode/enumset.h
@@ -1,61 +1,61 @@
-/*
-******************************************************************************
-*
-* Copyright (C) 2012, International Business Machines
-* Corporation and others. All Rights Reserved.
-*
-******************************************************************************
-*/
-
-/**
- * \file
- * \brief C++: internal template EnumSet<>
- */
-
-#ifndef ENUMSET_H
-#define ENUMSET_H
-
-#include "unicode/utypes.h"
-
-#if U_SHOW_CPLUSPLUS_API
-
-U_NAMESPACE_BEGIN
-
-/**
- * enum bitset for boolean fields. Similar to Java EnumSet<>.
- * Needs to range check.
- * @internal
- */
-template
-class EnumSet {
-public:
- inline EnumSet() : fBools(0) {}
- inline EnumSet(const EnumSet& other) : fBools(other.fBools) {}
- inline ~EnumSet() {}
- inline void clear() { fBools=0; }
- inline void add(T toAdd) { set(toAdd, 1); }
- inline void remove(T toRemove) { set(toRemove, 0); }
- inline int32_t contains(T toCheck) const { return get(toCheck); }
- inline void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag(toSet)):0); }
- inline int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; }
- inline UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toCheck& operator=(const EnumSet& other) {
- fBools = other.fBools;
- return *this;
- }
-
- inline uint32_t getAll() const {
- return fBools;
- }
-
-private:
- inline uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); }
-private:
- uint32_t fBools;
-};
-
-U_NAMESPACE_END
-
-#endif /* U_SHOW_CPLUSPLUS_API */
-#endif /* ENUMSET_H */
+/*
+******************************************************************************
+*
+* Copyright (C) 2012, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+******************************************************************************
+*/
+
+/**
+ * \file
+ * \brief C++: internal template EnumSet<>
+ */
+
+#ifndef ENUMSET_H
+#define ENUMSET_H
+
+#include "unicode/utypes.h"
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+
+/**
+ * enum bitset for boolean fields. Similar to Java EnumSet<>.
+ * Needs to range check.
+ * @internal
+ */
+template
+class EnumSet {
+public:
+ inline EnumSet() : fBools(0) {}
+ inline EnumSet(const EnumSet& other) : fBools(other.fBools) {}
+ inline ~EnumSet() {}
+ inline void clear() { fBools=0; }
+ inline void add(T toAdd) { set(toAdd, 1); }
+ inline void remove(T toRemove) { set(toRemove, 0); }
+ inline int32_t contains(T toCheck) const { return get(toCheck); }
+ inline void set(T toSet, int32_t v) { fBools=(fBools&(~flag(toSet)))|(v?(flag(toSet)):0); }
+ inline int32_t get(T toCheck) const { return (fBools & flag(toCheck))?1:0; }
+ inline UBool isValidEnum(T toCheck) const { return (toCheck>=minValue&&toCheck& operator=(const EnumSet& other) {
+ fBools = other.fBools;
+ return *this;
+ }
+
+ inline uint32_t getAll() const {
+ return fBools;
+ }
+
+private:
+ inline uint32_t flag(T toCheck) const { return (1<<(toCheck-minValue)); }
+private:
+ uint32_t fBools;
+};
+
+U_NAMESPACE_END
+
+#endif /* U_SHOW_CPLUSPLUS_API */
+#endif /* ENUMSET_H */
diff --git a/intl/icu/source/common/unicode/icudataver.h b/intl/icu/source/common/unicode/icudataver.h
--- a/intl/icu/source/common/unicode/icudataver.h
+++ b/intl/icu/source/common/unicode/icudataver.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2009-2012, International Business Machines
+* Copyright (C) 2009-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -18,14 +18,13 @@
#include "unicode/utypes.h"
-#ifndef U_HIDE_DRAFT_API
/**
- * @draft ICU 49
+ * @stable ICU 49
*/
#define U_ICU_VERSION_BUNDLE "icuver"
/**
- * @draft ICU 49
+ * @stable ICU 49
*/
#define U_ICU_DATA_KEY "DataVersion"
@@ -35,9 +34,8 @@
* @param dataVersionFillin icuver data version information to be filled in if not-null
* @param status stores the error code from the calls to resource bundle
*
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status);
-#endif /* U_HIDE_DRAFT_API */
+U_STABLE void U_EXPORT2 u_getDataVersion(UVersionInfo dataVersionFillin, UErrorCode *status);
#endif
diff --git a/intl/icu/source/common/unicode/idna.h b/intl/icu/source/common/unicode/idna.h
--- a/intl/icu/source/common/unicode/idna.h
+++ b/intl/icu/source/common/unicode/idna.h
@@ -254,10 +254,6 @@ public:
virtual void
nameToUnicodeUTF8(const StringPiece &name, ByteSink &dest,
IDNAInfo &info, UErrorCode &errorCode) const;
-
-private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
class UTS46;
diff --git a/intl/icu/source/common/unicode/listformatter.h b/intl/icu/source/common/unicode/listformatter.h
--- a/intl/icu/source/common/unicode/listformatter.h
+++ b/intl/icu/source/common/unicode/listformatter.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2012, International Business Machines
+* Copyright (C) 2012-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -17,15 +17,19 @@
#ifndef __LISTFORMATTER_H__
#define __LISTFORMATTER_H__
+#include "unicode/utypes.h"
+
+#ifndef U_HIDE_DRAFT_API
+
#include "unicode/unistr.h"
#include "unicode/locid.h"
-
U_NAMESPACE_BEGIN
/** @internal */
class Hashtable;
+#ifndef U_HIDE_INTERNAL_API
/** @internal */
struct ListFormatData : public UMemory {
UnicodeString twoPattern;
@@ -36,6 +40,7 @@ struct ListFormatData : public UMemory {
ListFormatData(const UnicodeString& two, const UnicodeString& start, const UnicodeString& middle, const UnicodeString& end) :
twoPattern(two), startPattern(start), middlePattern(middle), endPattern(end) {}
};
+#endif /* U_HIDE_INTERNAL_API */
/**
@@ -52,10 +57,24 @@ struct ListFormatData : public UMemory {
* as "Alice, Bob, Charlie and Delta" in English.
*
* The ListFormatter class is not intended for public subclassing.
+ * @draft ICU 50
*/
class U_COMMON_API ListFormatter : public UObject{
public:
+
+ /**
+ * Copy constructor.
+ * @draft ICU 52
+ */
+ ListFormatter(const ListFormatter&);
+
+ /**
+ * Assignment operator.
+ * @draft ICU 52
+ */
+ ListFormatter& operator=(const ListFormatter& other);
+
/**
* Creates a ListFormatter appropriate for the default locale.
*
@@ -77,6 +96,19 @@ class U_COMMON_API ListFormatter : publi
*/
static ListFormatter* createInstance(const Locale& locale, UErrorCode& errorCode);
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * Creates a ListFormatter appropriate for a locale and style.
+ *
+ * @param locale The locale.
+ * @param style the style, either "standard", "duration", or "duration-short"
+ * @param errorCode ICU error code, set if no data available for the given locale.
+ * @return A ListFormatter object created from internal data derived from
+ * CLDR data.
+ * @internal
+ */
+ static ListFormatter* createInstance(const Locale& locale, const char* style, UErrorCode& errorCode);
+#endif /* U_HIDE_INTERNAL_API */
/**
* Destructor.
@@ -99,36 +131,25 @@ class U_COMMON_API ListFormatter : publi
UnicodeString& format(const UnicodeString items[], int32_t n_items,
UnicodeString& appendTo, UErrorCode& errorCode) const;
- /**
- * Gets the fallback locale for a given locale.
- * TODO: Consider moving this to the Locale class.
- * @param in The input locale.
- * @param out The output locale after fallback.
- * @internal For testing.
- */
- static void getFallbackLocale(const Locale& in, Locale& out, UErrorCode& errorCode);
-
+#ifndef U_HIDE_INTERNAL_API
/**
* @internal constructor made public for testing.
*/
- ListFormatter(const ListFormatData& listFormatterData);
+ ListFormatter(const ListFormatData* listFormatterData);
+#endif /* U_HIDE_INTERNAL_API */
private:
static void initializeHash(UErrorCode& errorCode);
- static void addDataToHash(const char* locale, const char* two, const char* start, const char* middle, const char* end, UErrorCode& errorCode);
- static const ListFormatData* getListFormatData(const Locale& locale, UErrorCode& errorCode);
+ static const ListFormatData* getListFormatData(const Locale& locale, const char *style, UErrorCode& errorCode);
ListFormatter();
- ListFormatter(const ListFormatter&);
-
- ListFormatter& operator = (const ListFormatter&);
void addNewString(const UnicodeString& pattern, UnicodeString& originalString,
const UnicodeString& newString, UErrorCode& errorCode) const;
- virtual UClassID getDynamicClassID() const;
- const ListFormatData& data;
+ const ListFormatData* data;
};
U_NAMESPACE_END
+#endif /* U_HIDE_DRAFT_API */
#endif
diff --git a/intl/icu/source/common/unicode/locid.h b/intl/icu/source/common/unicode/locid.h
--- a/intl/icu/source/common/unicode/locid.h
+++ b/intl/icu/source/common/unicode/locid.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 1996-2012, International Business Machines
+* Copyright (C) 1996-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -43,6 +43,9 @@
U_NAMESPACE_BEGIN
+// Forward Declarations
+void U_CALLCONV locale_available_init(); /**< @internal */
+
/**
* A Locale
object represents a specific geographical, political,
* or cultural region. An operation that requires a Locale
to perform
@@ -418,7 +421,7 @@ public:
inline const char * getName() const;
/**
- * Returns the programmatic name of the entire locale as getName would return,
+ * Returns the programmatic name of the entire locale as getName() would return,
* but without keywords.
* @return A pointer to "name".
* @see getName
@@ -450,9 +453,11 @@ public:
*/
int32_t getKeywordValue(const char* keywordName, char *buffer, int32_t bufferCapacity, UErrorCode &status) const;
-#ifndef U_HIDE_DRAFT_API
/**
- * Sets the value for a keyword.
+ * Sets or removes the value for a keyword.
+ *
+ * For removing all keywords, use getBaseName(),
+ * and construct a new Locale if it differs from getName().
*
* @param keywordName name of the keyword to be set. Case insensitive.
* @param keywordValue value of the keyword to be set. If 0-length or
@@ -460,10 +465,9 @@ public:
* that keyword does not exist.
* @param status Returns any error information while performing this operation.
*
- * @draft ICU 49
+ * @stable ICU 49
*/
void setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status);
-#endif /* U_HIDE_DRAFT_API */
/**
* returns the locale's three-letter language code, as specified
@@ -740,6 +744,11 @@ private:
* @internal
*/
friend Locale *locale_set_default_internal(const char *, UErrorCode& status);
+
+ /**
+ * @internal
+ */
+ friend void locale_available_init();
};
inline UBool
diff --git a/intl/icu/source/common/unicode/messagepattern.h b/intl/icu/source/common/unicode/messagepattern.h
--- a/intl/icu/source/common/unicode/messagepattern.h
+++ b/intl/icu/source/common/unicode/messagepattern.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2011-2012, International Business Machines
+* Copyright (C) 2011-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: messagepattern.h
@@ -250,7 +250,7 @@ enum UMessagePatternArgType {
/**
* The argument is an ordinal-number PluralFormat
* with the same style parts sequence and semantics as UMSGPAT_ARG_TYPE_PLURAL.
- * @draft ICU 50
+ * @stable ICU 50
*/
UMSGPAT_ARG_TYPE_SELECTORDINAL
};
@@ -260,9 +260,10 @@ enum UMessagePatternArgType {
typedef enum UMessagePatternArgType UMessagePatternArgType;
/**
+ * \def UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE
* Returns TRUE if the argument type has a plural style part sequence and semantics,
* for example UMSGPAT_ARG_TYPE_PLURAL and UMSGPAT_ARG_TYPE_SELECTORDINAL.
- * @draft ICU 50
+ * @stable ICU 50
*/
#define UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) \
((argType)==UMSGPAT_ARG_TYPE_PLURAL || (argType)==UMSGPAT_ARG_TYPE_SELECTORDINAL)
@@ -917,9 +918,6 @@ private:
void setParseError(UParseError *parseError, int32_t index);
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
-
UBool init(UErrorCode &errorCode);
UBool copyStorage(const MessagePattern &other, UErrorCode &errorCode);
diff --git a/intl/icu/source/common/unicode/normalizer2.h b/intl/icu/source/common/unicode/normalizer2.h
--- a/intl/icu/source/common/unicode/normalizer2.h
+++ b/intl/icu/source/common/unicode/normalizer2.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2009-2012, International Business Machines
+* Copyright (C) 2009-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -83,7 +83,6 @@ public:
*/
~Normalizer2();
-#ifndef U_HIDE_DRAFT_API
/**
* Returns a Normalizer2 instance for Unicode NFC normalization.
* Same as getInstance(NULL, "nfc", UNORM2_COMPOSE, errorCode).
@@ -93,7 +92,7 @@ public:
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
static const Normalizer2 *
getNFCInstance(UErrorCode &errorCode);
@@ -107,7 +106,7 @@ public:
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
static const Normalizer2 *
getNFDInstance(UErrorCode &errorCode);
@@ -121,7 +120,7 @@ public:
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
static const Normalizer2 *
getNFKCInstance(UErrorCode &errorCode);
@@ -135,7 +134,7 @@ public:
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
static const Normalizer2 *
getNFKDInstance(UErrorCode &errorCode);
@@ -149,11 +148,10 @@ public:
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
static const Normalizer2 *
getNFKCCasefoldInstance(UErrorCode &errorCode);
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns a Normalizer2 instance which uses the specified data file
@@ -290,7 +288,7 @@ public:
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
@@ -308,7 +306,7 @@ public:
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; otherwise a negative value.
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual UChar32
composePair(UChar32 a, UChar32 b) const;
@@ -319,7 +317,7 @@ public:
* but all standard implementations return the Unicode Canonical_Combining_Class value.
* @param c code point
* @return c's combining class
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual uint8_t
getCombiningClass(UChar32 c) const;
@@ -429,10 +427,6 @@ public:
* @stable ICU 4.4
*/
virtual UBool isInert(UChar32 c) const = 0;
-
-private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
/**
@@ -544,7 +538,7 @@ public:
* @param decomposition String object which will be set to c's
* raw decomposition mapping, if there is one.
* @return TRUE if c has a decomposition, otherwise FALSE
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual UBool
getRawDecomposition(UChar32 c, UnicodeString &decomposition) const;
@@ -557,7 +551,7 @@ public:
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; otherwise a negative value.
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual UChar32
composePair(UChar32 a, UChar32 b) const;
@@ -568,7 +562,7 @@ public:
* but all standard implementations return the Unicode Canonical_Combining_Class value.
* @param c code point
* @return c's combining class
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual uint8_t
getCombiningClass(UChar32 c) const;
diff --git a/intl/icu/source/common/unicode/platform.h b/intl/icu/source/common/unicode/platform.h
--- a/intl/icu/source/common/unicode/platform.h
+++ b/intl/icu/source/common/unicode/platform.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 1997-2012, International Business Machines
+* Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -144,6 +144,13 @@
# include
#elif defined(linux) || defined(__linux__) || defined(__linux)
# define U_PLATFORM U_PF_LINUX
+#elif defined(__APPLE__) && defined(__MACH__)
+# include
+# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */
+# define U_PLATFORM U_PF_IPHONE
+# else
+# define U_PLATFORM U_PF_DARWIN
+# endif
#elif defined(BSD) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)
# define U_PLATFORM U_PF_BSD
#elif defined(sun) || defined(__sun)
@@ -162,13 +169,6 @@
# define U_PLATFORM U_PF_HPUX
#elif defined(sgi) || defined(__sgi)
# define U_PLATFORM U_PF_IRIX
-#elif defined(__APPLE__) && defined(__MACH__)
-# include
-# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* variant of TARGET_OS_MAC */
-# define U_PLATFORM U_PF_IPHONE
-# else
-# define U_PLATFORM U_PF_DARWIN
-# endif
#elif defined(macintosh)
# define U_PLATFORM U_PF_CLASSIC_MACOS
#elif defined(__QNX__) || defined(__QNXNTO__)
@@ -272,7 +272,7 @@
#ifdef U_HAVE_STDINT_H
/* Use the predefined value. */
#elif U_PLATFORM_USES_ONLY_WIN32_API
-# if defined(__BORLANDC__) || (defined(_MSC_VER) && _MSC_VER>=1600)
+# if defined(__BORLANDC__) || U_PLATFORM == U_PF_MINGW || (defined(_MSC_VER) && _MSC_VER>=1600)
/* Windows Visual Studio 9 and below do not have stdint.h & inttypes.h, but VS 2010 adds them. */
# define U_HAVE_STDINT_H 1
# else
@@ -339,8 +339,6 @@
*/
#ifdef U_HAVE_STD_STRING
/* Use the predefined value. */
-#elif U_PLATFORM == U_PF_ANDROID
-# define U_HAVE_STD_STRING 0
#else
# define U_HAVE_STD_STRING 1
#endif
diff --git a/intl/icu/source/common/unicode/rbbi.h b/intl/icu/source/common/unicode/rbbi.h
--- a/intl/icu/source/common/unicode/rbbi.h
+++ b/intl/icu/source/common/unicode/rbbi.h
@@ -1,6 +1,6 @@
/*
***************************************************************************
-* Copyright (C) 1999-2012 International Business Machines Corporation *
+* Copyright (C) 1999-2013 International Business Machines Corporation *
* and others. All rights reserved. *
***************************************************************************
@@ -583,7 +583,9 @@ public:
*/
static UClassID U_EXPORT2 getStaticClassID(void);
- /*
+ /**
+ * Deprecated functionality. Use clone() instead.
+ *
* Create a clone (copy) of this break iterator in memory provided
* by the caller. The idea is to increase performance by avoiding
* a storage allocation. Use of this functoin is NOT RECOMMENDED.
@@ -605,7 +607,7 @@ public:
* @return Pointer to the clone object. This may differ from the stackBuffer
* address if the byte alignment of the stack buffer was not suitable
* or if the stackBuffer was too small to hold the clone.
- * @stable ICU 2.0
+ * @deprecated ICU 52. Use clone() instead.
*/
virtual BreakIterator * createBufferClone(void *stackBuffer,
int32_t &BufferSize,
@@ -654,7 +656,7 @@ public:
* @param status Receives errors detected by this function.
* @return *this
*
- * @draft ICU 49
+ * @stable ICU 49
*/
virtual RuleBasedBreakIterator &refreshInputText(UText *input, UErrorCode &status);
@@ -697,7 +699,6 @@ protected:
#ifndef U_HIDE_INTERNAL_API
/**
* Common initialization function, used by constructors and bufferClone.
- * (Also used by DictionaryBasedBreakIterator::createBufferClone().)
* @internal
*/
void init();
diff --git a/intl/icu/source/common/unicode/rep.h b/intl/icu/source/common/unicode/rep.h
--- a/intl/icu/source/common/unicode/rep.h
+++ b/intl/icu/source/common/unicode/rep.h
@@ -1,6 +1,6 @@
/*
**************************************************************************
-* Copyright (C) 1999-2005, International Business Machines Corporation and
+* Copyright (C) 1999-2012, International Business Machines Corporation and
* others. All Rights Reserved.
**************************************************************************
* Date Name Description
@@ -205,7 +205,7 @@ protected:
* Default constructor.
* @stable ICU 2.4
*/
- Replaceable();
+ inline Replaceable();
/*
* Assignment operator not declared. The compiler will provide one
@@ -237,6 +237,8 @@ protected:
virtual UChar32 getChar32At(int32_t offset) const = 0;
};
+inline Replaceable::Replaceable() {}
+
inline int32_t
Replaceable::length() const {
return getLength();
diff --git a/intl/icu/source/common/unicode/resbund.h b/intl/icu/source/common/unicode/resbund.h
--- a/intl/icu/source/common/unicode/resbund.h
+++ b/intl/icu/source/common/unicode/resbund.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 1996-2011, International Business Machines Corporation
+* Copyright (C) 1996-2013, International Business Machines Corporation
* and others. All Rights Reserved.
*
******************************************************************************
@@ -484,7 +484,6 @@ private:
UResourceBundle *fResource;
void constructForLocale(const UnicodeString& path, const Locale& locale, UErrorCode& error);
Locale *fLocale;
-
};
U_NAMESPACE_END
diff --git a/intl/icu/source/common/unicode/stringpiece.h b/intl/icu/source/common/unicode/stringpiece.h
--- a/intl/icu/source/common/unicode/stringpiece.h
+++ b/intl/icu/source/common/unicode/stringpiece.h
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2012, International Business Machines
+// Copyright (C) 2009-2013, International Business Machines
// Corporation and others. All Rights Reserved.
//
// Copyright 2001 and onwards Google Inc.
@@ -183,7 +183,7 @@ class U_COMMON_API StringPiece : public
* Maximum integer, used as a default value for substring methods.
* @stable ICU 4.2
*/
- static const int32_t npos = 0x7fffffff;
+ static const int32_t npos; // = 0x7fffffff;
/**
* Returns a substring of this StringPiece.
diff --git a/intl/icu/source/common/unicode/stringtriebuilder.h b/intl/icu/source/common/unicode/stringtriebuilder.h
--- a/intl/icu/source/common/unicode/stringtriebuilder.h
+++ b/intl/icu/source/common/unicode/stringtriebuilder.h
@@ -239,9 +239,6 @@ protected:
protected:
int32_t hash;
int32_t offset;
- private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
// This class should not be overridden because
@@ -396,10 +393,6 @@ protected:
virtual int32_t writeValueAndType(UBool hasValue, int32_t value, int32_t node) = 0;
/** @internal */
virtual int32_t writeDeltaTo(int32_t jumpTarget) = 0;
-
-private:
- // No ICU "poor man's RTTI" for this class nor its subclasses.
- virtual UClassID getDynamicClassID() const;
};
U_NAMESPACE_END
diff --git a/intl/icu/source/common/unicode/ubidi.h b/intl/icu/source/common/unicode/ubidi.h
--- a/intl/icu/source/common/unicode/ubidi.h
+++ b/intl/icu/source/common/unicode/ubidi.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 1999-2012, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -387,7 +387,7 @@ typedef uint8_t UBiDiLevel;
* (The maximum resolved level can be up to UBIDI_MAX_EXPLICIT_LEVEL+1
).
* @stable ICU 2.0
*/
-#define UBIDI_MAX_EXPLICIT_LEVEL 61
+#define UBIDI_MAX_EXPLICIT_LEVEL 125
/** Bit flag for level input.
* Overrides directional properties.
diff --git a/intl/icu/source/common/unicode/ubrk.h b/intl/icu/source/common/unicode/ubrk.h
--- a/intl/icu/source/common/unicode/ubrk.h
+++ b/intl/icu/source/common/unicode/ubrk.h
@@ -1,6 +1,6 @@
/*
******************************************************************************
-* Copyright (C) 1996-2012, International Business Machines Corporation and others.
+* Copyright (C) 1996-2013, International Business Machines Corporation and others.
* All Rights Reserved.
******************************************************************************
*/
@@ -243,10 +243,12 @@ ubrk_openRules(const UChar *rules,
/**
* Thread safe cloning operation
* @param bi iterator to be cloned
- * @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
+ * @param stackBuffer Deprecated functionality as of ICU 52, use NULL.
+ * user allocated space for the new clone. If NULL new memory will be allocated.
* If buffer is not large enough, new memory will be allocated.
- * Clients can use the U_BRK_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations.
- * @param pBufferSize pointer to size of allocated space.
+ * Clients can use the U_BRK_SAFECLONE_BUFFERSIZE.
+ * @param pBufferSize Deprecated functionality as of ICU 52, use NULL or 1.
+ * pointer to size of allocated space.
* If *pBufferSize == 0, a sufficient size for use in cloning will
* be returned ('pre-flighting')
* If *pBufferSize is not enough for a stack-based safe clone,
@@ -263,11 +265,15 @@ ubrk_safeClone(
int32_t *pBufferSize,
UErrorCode *status);
+#ifndef U_HIDE_DEPRECATED_API
+
/**
* A recommended size (in bytes) for the memory buffer to be passed to ubrk_saveClone().
- * @stable ICU 2.0
+ * @deprecated ICU 52. Do not rely on ubrk_safeClone() cloning into any provided buffer.
*/
-#define U_BRK_SAFECLONE_BUFFERSIZE 528
+#define U_BRK_SAFECLONE_BUFFERSIZE 1
+
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Close a UBreakIterator.
@@ -313,7 +319,13 @@ ubrk_setText(UBreakIterator* bi,
/**
- * Sets an existing iterator to point to a new piece of text
+ * Sets an existing iterator to point to a new piece of text.
+ *
+ * All index positions returned by break iterator functions are
+ * native indices from the UText. For example, when breaking UTF-8
+ * encoded text, the break positions returned by \ref ubrk_next, \ref ubrk_previous, etc.
+ * will be UTF-8 string indices, not UTF-16 positions.
+ *
* @param bi The iterator to use
* @param text The text to be set.
* This function makes a shallow clone of the supplied UText. This means
@@ -494,7 +506,6 @@ ubrk_getRuleStatusVec(UBreakIterator *bi
U_STABLE const char* U_EXPORT2
ubrk_getLocaleByType(const UBreakIterator *bi, ULocDataLocaleType type, UErrorCode* status);
-#ifndef U_HIDE_DRAFT_API
/**
* Set the subject text string upon which the break iterator is operating
* without changing any other aspect of the state.
@@ -518,13 +529,12 @@ ubrk_getLocaleByType(const UBreakIterato
* @param text The new (moved) text string.
* @param status Receives errors detected by this function.
*
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT void U_EXPORT2
+U_STABLE void U_EXPORT2
ubrk_refreshUText(UBreakIterator *bi,
UText *text,
UErrorCode *status);
-#endif /* U_HIDE_DRAFT_API */
#endif /* #if !UCONFIG_NO_BREAK_ITERATION */
diff --git a/intl/icu/source/common/unicode/uchar.h b/intl/icu/source/common/unicode/uchar.h
--- a/intl/icu/source/common/unicode/uchar.h
+++ b/intl/icu/source/common/unicode/uchar.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1997-2012, International Business Machines
+* Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@@ -39,7 +39,7 @@ U_CDECL_BEGIN
* @see u_getUnicodeVersion
* @stable ICU 2.0
*/
-#define U_UNICODE_VERSION "6.2"
+#define U_UNICODE_VERSION "6.3"
/**
* \file
@@ -480,8 +480,13 @@ typedef enum UProperty {
(http://www.unicode.org/reports/tr29/)
Returns UWordBreakValues values. @stable ICU 3.4 */
UCHAR_WORD_BREAK=0x1014,
+ /** Enumerated property Bidi_Paired_Bracket_Type (new in Unicode 6.3).
+ Used in UAX #9: Unicode Bidirectional Algorithm
+ (http://www.unicode.org/reports/tr9/)
+ Returns UBidiPairedBracketType values. @stable ICU 52 */
+ UCHAR_BIDI_PAIRED_BRACKET_TYPE=0x1015,
/** One more than the last constant for enumerated/integer Unicode properties. @stable ICU 2.2 */
- UCHAR_INT_LIMIT=0x1015,
+ UCHAR_INT_LIMIT=0x1016,
/** Bitmask property General_Category_Mask.
This is the General_Category property returned as a bit mask.
@@ -516,9 +521,11 @@ typedef enum UProperty {
/** String property Case_Folding.
Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */
UCHAR_CASE_FOLDING=0x4002,
+#ifndef U_HIDE_DEPRECATED_API
/** Deprecated string property ISO_Comment.
Corresponds to u_getISOComment. @deprecated ICU 49 */
UCHAR_ISO_COMMENT=0x4003,
+#endif /* U_HIDE_DEPRECATED_API */
/** String property Lowercase_Mapping.
Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */
UCHAR_LOWERCASE_MAPPING=0x4004,
@@ -540,19 +547,23 @@ typedef enum UProperty {
/** String property Titlecase_Mapping.
Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */
UCHAR_TITLECASE_MAPPING=0x400A,
+#ifndef U_HIDE_DEPRECATED_API
/** String property Unicode_1_Name.
This property is of little practical value.
Beginning with ICU 49, ICU APIs return an empty string for this property.
Corresponds to u_charName(U_UNICODE_10_CHAR_NAME). @deprecated ICU 49 */
UCHAR_UNICODE_1_NAME=0x400B,
+#endif /* U_HIDE_DEPRECATED_API */
/** String property Uppercase_Mapping.
Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */
UCHAR_UPPERCASE_MAPPING=0x400C,
+ /** String property Bidi_Paired_Bracket (new in Unicode 6.3).
+ Corresponds to u_getBidiPairedBracket. @stable ICU 52 */
+ UCHAR_BIDI_PAIRED_BRACKET=0x400D,
/** One more than the last constant for string Unicode properties. @stable ICU 2.4 */
- UCHAR_STRING_LIMIT=0x400D,
- /** Provisional property Script_Extensions (new in Unicode 6.0).
- As a provisional property, it may be modified or removed
- in future versions of the Unicode Standard, and thus in ICU.
+ UCHAR_STRING_LIMIT=0x400E,
+
+ /** Miscellaneous property Script_Extensions (new in Unicode 6.0).
Some characters are commonly used in multiple scripts.
For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h.
@@ -809,11 +820,42 @@ typedef enum UCharDirection {
U_DIR_NON_SPACING_MARK = 17,
/** BN @stable ICU 2.0 */
U_BOUNDARY_NEUTRAL = 18,
+ /** FSI @stable ICU 52 */
+ U_FIRST_STRONG_ISOLATE = 19,
+ /** LRI @stable ICU 52 */
+ U_LEFT_TO_RIGHT_ISOLATE = 20,
+ /** RLI @stable ICU 52 */
+ U_RIGHT_TO_LEFT_ISOLATE = 21,
+ /** PDI @stable ICU 52 */
+ U_POP_DIRECTIONAL_ISOLATE = 22,
/** @stable ICU 2.0 */
U_CHAR_DIRECTION_COUNT
} UCharDirection;
/**
+ * Bidi Paired Bracket Type constants.
+ *
+ * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
+ * @stable ICU 52
+ */
+typedef enum UBidiPairedBracketType {
+ /*
+ * Note: UBidiPairedBracketType constants are parsed by preparseucd.py.
+ * It matches lines like
+ * U_BPT_
+ */
+
+ /** Not a paired bracket. @stable ICU 52 */
+ U_BPT_NONE,
+ /** Open paired bracket. @stable ICU 52 */
+ U_BPT_OPEN,
+ /** Close paired bracket. @stable ICU 52 */
+ U_BPT_CLOSE,
+ /** @stable ICU 52 */
+ U_BPT_COUNT /* 3 */
+} UBidiPairedBracketType;
+
+/**
* Constants for Unicode blocks, see the Unicode Data file Blocks.txt
* @stable ICU 2.0
*/
@@ -1457,14 +1499,16 @@ typedef enum UEastAsianWidth {
typedef enum UCharNameChoice {
/** Unicode character name (Name property). @stable ICU 2.0 */
U_UNICODE_CHAR_NAME,
+#ifndef U_HIDE_DEPRECATED_API
/**
* The Unicode_1_Name property value which is of little practical value.
* Beginning with ICU 49, ICU APIs return an empty string for this name choice.
* @deprecated ICU 49
*/
U_UNICODE_10_CHAR_NAME,
+#endif /* U_HIDE_DEPRECATED_API */
/** Standard or synthetic character name. @stable ICU 2.0 */
- U_EXTENDED_CHAR_NAME,
+ U_EXTENDED_CHAR_NAME = U_UNICODE_CHAR_NAME+2,
/** Corrected name from NameAliases.txt. @stable ICU 4.4 */
U_CHAR_NAME_ALIAS,
/** @stable ICU 2.0 */
@@ -1678,7 +1722,10 @@ typedef enum UWordBreakValues {
U_WB_MIDNUMLET =11, /*[MB]*/
U_WB_NEWLINE =12, /*[NL]*/
U_WB_REGIONAL_INDICATOR = 13, /*[RI]*/ /* new in Unicode 6.2/ICU 50 */
- U_WB_COUNT = 14
+ U_WB_HEBREW_LETTER = 14, /*[HL]*/ /* from here on: new in Unicode 6.3/ICU 52 */
+ U_WB_SINGLE_QUOTE = 15, /*[SQ]*/
+ U_WB_DOUBLE_QUOTE = 16, /*[DQ]*/
+ U_WB_COUNT = 17
} UWordBreakValues;
/**
@@ -2481,7 +2528,7 @@ u_isMirrored(UChar32 c);
* as the mirror-image of the default glyph of the specified
* character. This is useful for text conversion to and from
* codepages with visual order, and for displays without glyph
- * selecetion capabilities.
+ * selection capabilities.
*
* @param c the code point to be mapped
* @return another Unicode code point that may serve as a mirror-image
@@ -2496,6 +2543,25 @@ U_STABLE UChar32 U_EXPORT2
u_charMirror(UChar32 c);
/**
+ * Maps the specified character to its paired bracket character.
+ * For Bidi_Paired_Bracket_Type!=None, this is the same as u_charMirror().
+ * Otherwise c itself is returned.
+ * See http://www.unicode.org/reports/tr9/
+ *
+ * @param c the code point to be mapped
+ * @return the paired bracket code point,
+ * or c itself if there is no such mapping
+ * (Bidi_Paired_Bracket_Type=None)
+ *
+ * @see UCHAR_BIDI_PAIRED_BRACKET
+ * @see UCHAR_BIDI_PAIRED_BRACKET_TYPE
+ * @see u_charMirror
+ * @stable ICU 52
+ */
+U_STABLE UChar32 U_EXPORT2
+u_getBidiPairedBracket(UChar32 c);
+
+/**
* Returns the general category value for the code point.
*
* Same as java.lang.Character.getType().
@@ -2655,6 +2721,7 @@ u_charName(UChar32 code, UCharNameChoice
char *buffer, int32_t bufferLength,
UErrorCode *pErrorCode);
+#ifndef U_HIDE_DEPRECATED_API
/**
* Returns an empty string.
* Used to return the ISO 10646 comment for a character.
@@ -2677,6 +2744,7 @@ U_STABLE int32_t U_EXPORT2
u_getISOComment(UChar32 c,
char *dest, int32_t destCapacity,
UErrorCode *pErrorCode);
+#endif /* U_HIDE_DEPRECATED_API */
/**
* Find a Unicode character by its name and return its code point value.
diff --git a/intl/icu/source/common/unicode/ucharstriebuilder.h b/intl/icu/source/common/unicode/ucharstriebuilder.h
--- a/intl/icu/source/common/unicode/ucharstriebuilder.h
+++ b/intl/icu/source/common/unicode/ucharstriebuilder.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2010-2012, International Business Machines
+* Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: ucharstriebuilder.h
@@ -70,6 +70,9 @@ public:
* Builds a UCharsTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called.
*
+ * A UCharsTrie cannot be empty. At least one (string, value) pair
+ * must have been add()ed.
+ *
* This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well.
@@ -87,6 +90,9 @@ public:
* Builds a UCharsTrie for the add()ed data and UChar-serializes it.
* Once built, no further data can be add()ed until clear() is called.
*
+ * A UCharsTrie cannot be empty. At least one (string, value) pair
+ * must have been add()ed.
+ *
* Multiple calls to buildUnicodeString() set the UnicodeStrings to the
* builder's same UChar array, without rebuilding.
* If buildUnicodeString() is called after build(), the trie will be
diff --git a/intl/icu/source/common/unicode/uclean.h b/intl/icu/source/common/unicode/uclean.h
--- a/intl/icu/source/common/unicode/uclean.h
+++ b/intl/icu/source/common/unicode/uclean.h
@@ -1,6 +1,6 @@
/*
******************************************************************************
-* Copyright (C) 2001-2012, International Business Machines
+* Copyright (C) 2001-2013, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* file name: uclean.h
@@ -100,101 +100,6 @@ U_STABLE void U_EXPORT2
u_cleanup(void);
-
-
-/**
- * An opaque pointer type that represents an ICU mutex.
- * For user-implemented mutexes, the value will typically point to a
- * struct or object that implements the mutex.
- * @stable ICU 2.8
- * @system
- */
-typedef void *UMTX;
-
-/**
- * Function Pointer type for a user supplied mutex initialization function.
- * The user-supplied function will be called by ICU whenever ICU needs to create a
- * new mutex. The function implementation should create a mutex, and store a pointer
- * to something that uniquely identifies the mutex into the UMTX that is supplied
- * as a paramter.
- * @param context user supplied value, obtained from from u_setMutexFunctions().
- * @param mutex Receives a pointer that identifies the new mutex.
- * The mutex init function must set the UMTX to a non-null value.
- * Subsequent calls by ICU to lock, unlock, or destroy a mutex will
- * identify the mutex by the UMTX value.
- * @param status Error status. Report errors back to ICU by setting this variable
- * with an error code.
- * @stable ICU 2.8
- * @system
- */
-typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
-
-
-/**
- * Function Pointer type for a user supplied mutex functions.
- * One of the user-supplied functions with this signature will be called by ICU
- * whenever ICU needs to lock, unlock, or destroy a mutex.
- * @param context user supplied value, obtained from from u_setMutexFunctions().
- * @param mutex specify the mutex on which to operate.
- * @stable ICU 2.8
- * @system
- */
-typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
-
-
-/**
- * Set the functions that ICU will use for mutex operations
- * Use of this function is optional; by default (without this function), ICU will
- * directly access system functions for mutex operations
- * This function can only be used when ICU is in an initial, unused state, before
- * u_init() has been called.
- * @param context This pointer value will be saved, and then (later) passed as
- * a parameter to the user-supplied mutex functions each time they
- * are called.
- * @param init Pointer to a mutex initialization function. Must be non-null.
- * @param destroy Pointer to the mutex destroy function. Must be non-null.
- * @param lock pointer to the mutex lock function. Must be non-null.
- * @param unlock Pointer to the mutex unlock function. Must be non-null.
- * @param status Receives error values.
- * @stable ICU 2.8
- * @system
- */
-U_STABLE void U_EXPORT2
-u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
- UErrorCode *status);
-
-
-/**
- * Pointer type for a user supplied atomic increment or decrement function.
- * @param context user supplied value, obtained from from u_setAtomicIncDecFunctions().
- * @param p Pointer to a 32 bit int to be incremented or decremented
- * @return The value of the variable after the inc or dec operation.
- * @stable ICU 2.8
- * @system
- */
-typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
-
-/**
- * Set the functions that ICU will use for atomic increment and decrement of int32_t values.
- * Use of this function is optional; by default (without this function), ICU will
- * use its own internal implementation of atomic increment/decrement.
- * This function can only be used when ICU is in an initial, unused state, before
- * u_init() has been called.
- * @param context This pointer value will be saved, and then (later) passed as
- * a parameter to the increment and decrement functions each time they
- * are called. This function can only be called
- * @param inc Pointer to a function to do an atomic increment operation. Must be non-null.
- * @param dec Pointer to a function to do an atomic decrement operation. Must be non-null.
- * @param status Receives error values.
- * @stable ICU 2.8
- * @system
- */
-U_STABLE void U_EXPORT2
-u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec,
- UErrorCode *status);
-
-
-
/**
* Pointer type for a user supplied memory allocation function.
* @param context user supplied value, obtained from from u_setMemoryFunctions().
@@ -244,6 +149,108 @@ typedef void U_CALLCONV UMemFreeFn (con
U_STABLE void U_EXPORT2
u_setMemoryFunctions(const void *context, UMemAllocFn *a, UMemReallocFn *r, UMemFreeFn *f,
UErrorCode *status);
+
+
+/*********************************************************************************
+ *
+ * Deprecated Functions
+ *
+ * The following functions for user supplied mutexes are no longer supported.
+ * Any attempt to use them will return a U_UNSUPPORTED_ERROR.
+ *
+ **********************************************************************************/
+
+/**
+ * An opaque pointer type that represents an ICU mutex.
+ * For user-implemented mutexes, the value will typically point to a
+ * struct or object that implements the mutex.
+ * @deprecated ICU 52. This type is no longer supported.
+ * @system
+ */
+typedef void *UMTX;
+
+/**
+ * Function Pointer type for a user supplied mutex initialization function.
+ * The user-supplied function will be called by ICU whenever ICU needs to create a
+ * new mutex. The function implementation should create a mutex, and store a pointer
+ * to something that uniquely identifies the mutex into the UMTX that is supplied
+ * as a paramter.
+ * @param context user supplied value, obtained from from u_setMutexFunctions().
+ * @param mutex Receives a pointer that identifies the new mutex.
+ * The mutex init function must set the UMTX to a non-null value.
+ * Subsequent calls by ICU to lock, unlock, or destroy a mutex will
+ * identify the mutex by the UMTX value.
+ * @param status Error status. Report errors back to ICU by setting this variable
+ * with an error code.
+ * @deprecated ICU 52. This function is no longer supported.
+ * @system
+ */
+typedef void U_CALLCONV UMtxInitFn (const void *context, UMTX *mutex, UErrorCode* status);
+
+
+/**
+ * Function Pointer type for a user supplied mutex functions.
+ * One of the user-supplied functions with this signature will be called by ICU
+ * whenever ICU needs to lock, unlock, or destroy a mutex.
+ * @param context user supplied value, obtained from from u_setMutexFunctions().
+ * @param mutex specify the mutex on which to operate.
+ * @deprecated ICU 52. This function is no longer supported.
+ * @system
+ */
+typedef void U_CALLCONV UMtxFn (const void *context, UMTX *mutex);
+
+
+/**
+ * Set the functions that ICU will use for mutex operations
+ * Use of this function is optional; by default (without this function), ICU will
+ * directly access system functions for mutex operations
+ * This function can only be used when ICU is in an initial, unused state, before
+ * u_init() has been called.
+ * @param context This pointer value will be saved, and then (later) passed as
+ * a parameter to the user-supplied mutex functions each time they
+ * are called.
+ * @param init Pointer to a mutex initialization function. Must be non-null.
+ * @param destroy Pointer to the mutex destroy function. Must be non-null.
+ * @param lock pointer to the mutex lock function. Must be non-null.
+ * @param unlock Pointer to the mutex unlock function. Must be non-null.
+ * @param status Receives error values.
+ * @deprecated ICU 52. This function is no longer supported.
+ * @system
+ */
+U_DEPRECATED void U_EXPORT2
+u_setMutexFunctions(const void *context, UMtxInitFn *init, UMtxFn *destroy, UMtxFn *lock, UMtxFn *unlock,
+ UErrorCode *status);
+
+
+/**
+ * Pointer type for a user supplied atomic increment or decrement function.
+ * @param context user supplied value, obtained from from u_setAtomicIncDecFunctions().
+ * @param p Pointer to a 32 bit int to be incremented or decremented
+ * @return The value of the variable after the inc or dec operation.
+ * @deprecated ICU 52. This function is no longer supported.
+ * @system
+ */
+typedef int32_t U_CALLCONV UMtxAtomicFn(const void *context, int32_t *p);
+
+/**
+ * Set the functions that ICU will use for atomic increment and decrement of int32_t values.
+ * Use of this function is optional; by default (without this function), ICU will
+ * use its own internal implementation of atomic increment/decrement.
+ * This function can only be used when ICU is in an initial, unused state, before
+ * u_init() has been called.
+ * @param context This pointer value will be saved, and then (later) passed as
+ * a parameter to the increment and decrement functions each time they
+ * are called. This function can only be called
+ * @param inc Pointer to a function to do an atomic increment operation. Must be non-null.
+ * @param dec Pointer to a function to do an atomic decrement operation. Must be non-null.
+ * @param status Receives error values.
+ * @deprecated ICU 52. This function is no longer supported.
+ * @system
+ */
+U_DEPRECATED void U_EXPORT2
+u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *inc, UMtxAtomicFn *dec,
+ UErrorCode *status);
+
#endif /* U_HIDE_SYSTEM_API */
#endif
diff --git a/intl/icu/source/common/unicode/ucnv.h b/intl/icu/source/common/unicode/ucnv.h
--- a/intl/icu/source/common/unicode/ucnv.h
+++ b/intl/icu/source/common/unicode/ucnv.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1999-2012, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* ucnv.h:
@@ -521,10 +521,12 @@ ucnv_openPackage(const char *packageName
* adjusted pointer and use an accordingly smaller buffer size.
*
* @param cnv converter to be cloned
- * @param stackBuffer user allocated space for the new clone. If NULL new memory will be allocated.
+ * @param stackBuffer Deprecated functionality as of ICU 52, use NULL.
+ * user allocated space for the new clone. If NULL new memory will be allocated.
* If buffer is not large enough, new memory will be allocated.
* Clients can use the U_CNV_SAFECLONE_BUFFERSIZE. This will probably be enough to avoid memory allocations.
- * @param pBufferSize pointer to size of allocated space. pBufferSize must not be NULL.
+ * @param pBufferSize Deprecated functionality as of ICU 52, use NULL or 1.
+ * pointer to size of allocated space.
* @param status to indicate whether the operation went on smoothly or there were errors
* An informational status value, U_SAFECLONE_ALLOCATED_WARNING,
* is used if any allocations were necessary.
@@ -540,14 +542,18 @@ ucnv_safeClone(const UConverter *cnv,
int32_t *pBufferSize,
UErrorCode *status);
+#ifndef U_HIDE_DEPRECATED_API
+
/**
* \def U_CNV_SAFECLONE_BUFFERSIZE
* Definition of a buffer size that is designed to be large enough for
* converters to be cloned with ucnv_safeClone().
- * @stable ICU 2.0
+ * @deprecated ICU 52. Do not rely on ucnv_safeClone() cloning into any provided buffer.
*/
#define U_CNV_SAFECLONE_BUFFERSIZE 1024
+#endif /* U_HIDE_DEPRECATED_API */
+
/**
* Deletes the unicode converter and releases resources associated
* with just this instance.
diff --git a/intl/icu/source/common/unicode/uconfig.h b/intl/icu/source/common/unicode/uconfig.h
--- a/intl/icu/source/common/unicode/uconfig.h
+++ b/intl/icu/source/common/unicode/uconfig.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 2002-2012, International Business Machines
+* Copyright (C) 2002-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: uconfig.h
@@ -96,7 +96,7 @@
* utypes.h includes those headers if this macro is defined to 0.
* Otherwise, each those headers must be included explicitly when using one of their macros.
* Defaults to 0 for backward compatibility, except inside ICU.
- * @draft ICU 49
+ * @stable ICU 49
*/
#ifdef U_NO_DEFAULT_INCLUDE_UTF_HEADERS
/* Use the predefined value. */
diff --git a/intl/icu/source/common/unicode/uenum.h b/intl/icu/source/common/unicode/uenum.h
--- a/intl/icu/source/common/unicode/uenum.h
+++ b/intl/icu/source/common/unicode/uenum.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2002-2012, International Business Machines
+* Copyright (C) 2002-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -171,7 +171,6 @@ uenum_openFromStringEnumeration(icu::Str
#endif
-#ifndef U_HIDE_DRAFT_API
/**
* Given an array of const UChar* strings, return a UEnumeration. String pointers from 0..count-1 must not be null.
* Do not free or modify either the string array or the characters it points to until this object has been destroyed with uenum_close.
@@ -181,12 +180,11 @@ uenum_openFromStringEnumeration(icu::Str
* @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory.
* @see uenum_close
- * @draft ICU 50
+ * @stable ICU 50
*/
-U_DRAFT UEnumeration* U_EXPORT2
+U_STABLE UEnumeration* U_EXPORT2
uenum_openUCharStringsEnumeration(const UChar* const strings[], int32_t count,
UErrorCode* ec);
-#endif
/* Note: next function is not hidden as draft, as it is used internally (it was formerly an internal function). */
@@ -199,11 +197,10 @@ uenum_openUCharStringsEnumeration(const
* @param ec error code
* @return the new UEnumeration object. Caller is responsible for calling uenum_close to free memory
* @see uenum_close
- * @draft ICU 50
+ * @stable ICU 50
*/
-U_DRAFT UEnumeration* U_EXPORT2
+U_STABLE UEnumeration* U_EXPORT2
uenum_openCharStringsEnumeration(const char* const strings[], int32_t count,
UErrorCode* ec);
-
#endif
diff --git a/intl/icu/source/common/unicode/uidna.h b/intl/icu/source/common/unicode/uidna.h
--- a/intl/icu/source/common/unicode/uidna.h
+++ b/intl/icu/source/common/unicode/uidna.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
- * Copyright (C) 2003-2012, International Business Machines
+ * Copyright (C) 2003-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -96,7 +96,6 @@ enum {
* @stable ICU 4.6
*/
UIDNA_NONTRANSITIONAL_TO_UNICODE=0x20,
-#ifndef U_HIDE_DRAFT_API
/**
* IDNA option to check for whether the input conforms to the CONTEXTO rules.
* For use in static worker and factory methods.
@@ -104,10 +103,9 @@ enum {
* (The CONTEXTO check is new in IDNA2008.)
* This is for use by registries for IDNA2008 conformance.
* UTS #46 does not require the CONTEXTO check.
- * @draft ICU 49
+ * @stable ICU 49
*/
UIDNA_CHECK_CONTEXTO=0x40
-#endif /* U_HIDE_DRAFT_API */
};
/**
@@ -490,21 +488,19 @@ enum {
* @stable ICU 4.6
*/
UIDNA_ERROR_CONTEXTJ=0x1000,
-#ifndef U_HIDE_DRAFT_API
/**
* A label does not meet the IDNA CONTEXTO requirements for punctuation characters.
* Some punctuation characters "Would otherwise have been DISALLOWED"
* but are allowed in certain contexts. (RFC 5892)
- * @draft ICU 49
+ * @stable ICU 49
*/
UIDNA_ERROR_CONTEXTO_PUNCTUATION=0x2000,
/**
* A label does not meet the IDNA CONTEXTO requirements for digits.
* Arabic-Indic Digits (U+066x) must not be mixed with Extended Arabic-Indic Digits (U+06Fx).
- * @draft ICU 49
+ * @stable ICU 49
*/
UIDNA_ERROR_CONTEXTO_DIGITS=0x4000
-#endif /* U_HIDE_DRAFT_API */
};
/* IDNA2003 API ------------------------------------------------------------- */
diff --git a/intl/icu/source/common/unicode/uloc.h b/intl/icu/source/common/unicode/uloc.h
--- a/intl/icu/source/common/unicode/uloc.h
+++ b/intl/icu/source/common/unicode/uloc.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1997-2012, International Business Machines
+* Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@@ -753,7 +753,9 @@ U_STABLE int32_t U_EXPORT2 uloc_countAva
/**
*
- * Gets a list of all available language codes defined in ISO 639. This is a pointer
+ * Gets a list of all available 2-letter language codes defined in ISO 639,
+ * plus additional 3-letter codes determined to be useful for locale generation as
+ * defined by Unicode CLDR. This is a pointer
* to an array of pointers to arrays of char. All of these pointers are owned
* by ICU-- do not delete them, and do not write through them. The array is
* terminated with a null pointer.
@@ -798,12 +800,15 @@ uloc_getParent(const char* localeID,
/**
- * Gets the full name for the specified locale.
+ * Gets the full name for the specified locale, like uloc_getName(),
+ * but without keywords.
+ *
* Note: This has the effect of 'canonicalizing' the string to
* a certain extent. Upper and lower case are set as needed,
* and if the components were in 'POSIX' format they are changed to
* ICU format. It does NOT map aliased names in any way.
* See the top of this header file.
+ *
* This API strips off the keyword part, so "de_DE\@collation=phonebook"
* will become "de_DE".
* This API supports preflighting.
@@ -854,13 +859,16 @@ uloc_getKeywordValue(const char* localeI
/**
- * Set the value of the specified keyword.
+ * Sets or removes the value of the specified keyword.
+ *
+ * For removing all keywords, use uloc_getBaseName().
+ *
* NOTE: Unlike almost every other ICU function which takes a
* buffer, this function will NOT truncate the output text. If a
* BUFFER_OVERFLOW_ERROR is received, it means that the original
* buffer is untouched. This is done to prevent incorrect or possibly
* even malformed locales from being generated and used.
- *
+ *
* @param keywordName name of the keyword to be set. Case insensitive.
* @param keywordValue value of the keyword to be set. If 0-length or
* NULL, will result in the keyword being removed. No error is given if
diff --git a/intl/icu/source/common/unicode/uniset.h b/intl/icu/source/common/unicode/uniset.h
--- a/intl/icu/source/common/unicode/uniset.h
+++ b/intl/icu/source/common/unicode/uniset.h
@@ -1,6 +1,6 @@
/*
***************************************************************************
-* Copyright (C) 1999-2011, International Business Machines Corporation
+* Copyright (C) 1999-2013, International Business Machines Corporation
* and others. All Rights Reserved.
***************************************************************************
* Date Name Description
@@ -22,6 +22,9 @@
U_NAMESPACE_BEGIN
+// Forward Declarations.
+void UnicodeSet_initInclusion(int32_t src, UErrorCode &status); /**< @internal */
+
class BMPSet;
class ParsePosition;
class RBBIRuleScanner;
@@ -1586,6 +1589,7 @@ private:
UnicodeString& rebuiltPat,
UErrorCode& ec);
+ friend void UnicodeSet_initInclusion(int32_t src, UErrorCode &status);
static const UnicodeSet* getInclusions(int32_t src, UErrorCode &status);
/**
diff --git a/intl/icu/source/common/unicode/unistr.h b/intl/icu/source/common/unicode/unistr.h
--- a/intl/icu/source/common/unicode/unistr.h
+++ b/intl/icu/source/common/unicode/unistr.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1998-2012, International Business Machines
+* Copyright (C) 1998-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@@ -58,7 +58,6 @@ u_strlen(const UChar *s);
* \def U_STRING_CASE_MAPPER_DEFINED
* @internal
*/
-
#ifndef U_STRING_CASE_MAPPER_DEFINED
#define U_STRING_CASE_MAPPER_DEFINED
@@ -142,7 +141,7 @@ class UnicodeStringAppendable; // unico
* This can be defined to be empty or "explicit".
* If explicit, then the UnicodeString(UChar) and UnicodeString(UChar32)
* constructors are marked as explicit, preventing their inadvertent use.
- * @draft ICU 49
+ * @stable ICU 49
*/
#ifndef UNISTR_FROM_CHAR_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
@@ -162,7 +161,7 @@ class UnicodeStringAppendable; // unico
*
* In particular, this helps prevent accidentally depending on ICU conversion code
* by passing a string literal into an API with a const UnicodeString & parameter.
- * @draft ICU 49
+ * @stable ICU 49
*/
#ifndef UNISTR_FROM_STRING_EXPLICIT
# if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION)
@@ -339,7 +338,8 @@ public:
/**
* Compare the characters bitwise in the range
* [start, start + length) with the characters
- * in text
+ * in the entire string text.
+ * (The parameters "start" and "length" are not applied to the other text "text".)
* @param start the offset at which the compare operation begins
* @param length the number of characters of text to compare.
* @param text the other text to be compared against this string.
@@ -1794,7 +1794,7 @@ public:
* For a bogus string, getBuffer() and getTerminatedBuffer() return NULL, and
* length() returns 0.
*
- * @return TRUE if the string is valid, FALSE otherwise
+ * @return TRUE if the string is bogus/invalid, FALSE otherwise
* @see setToBogus()
* @stable ICU 2.0
*/
@@ -2843,7 +2843,7 @@ public:
* @see getBuffer()
* @stable ICU 2.2
*/
- inline const UChar *getTerminatedBuffer();
+ const UChar *getTerminatedBuffer();
//========================================
// Constructors
@@ -2852,7 +2852,7 @@ public:
/** Construct an empty UnicodeString.
* @stable ICU 2.0
*/
- UnicodeString();
+ inline UnicodeString();
/**
* Construct a UnicodeString with capacity to hold capacity UChars
@@ -3205,7 +3205,7 @@ public:
* character. See unescape() for a listing of the recognized escape
* sequences. The character at offset-1 is assumed (without
* checking) to be a backslash. If the escape sequence is
- * ill-formed, or the offset is out of range, (UChar32)0xFFFFFFFF is
+ * ill-formed, or the offset is out of range, U_SENTINEL=-1 is
* returned.
*
* @param offset an input output parameter. On input, it is the
@@ -3213,7 +3213,7 @@ public:
* after the initial backslash. On output, it is advanced after the
* last character parsed. On error, it is not advanced at all.
* @return the character represented by the escape sequence at
- * offset, or (UChar32)0xFFFFFFFF on error.
+ * offset, or U_SENTINEL=-1 on error.
* @see UnicodeString#unescape()
* @see u_unescape()
* @see u_unescapeAt()
@@ -3604,6 +3604,16 @@ UnicodeString::getArrayStart() const
{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; }
//========================================
+// Default constructor
+//========================================
+
+inline
+UnicodeString::UnicodeString()
+ : fShortLength(0),
+ fFlags(kShortString)
+{}
+
+//========================================
// Read-only implementation methods
//========================================
inline int32_t
@@ -4269,48 +4279,6 @@ UnicodeString::setArray(UChar *array, in
fUnion.fFields.fCapacity = capacity;
}
-inline const UChar *
-UnicodeString::getTerminatedBuffer() {
- if(!isWritable()) {
- return 0;
- } else {
- UChar *array = getArrayStart();
- int32_t len = length();
- if(len < getCapacity() && ((fFlags&kRefCounted) == 0 || refCount() == 1)) {
- /*
- * kRefCounted: Do not write the NUL if the buffer is shared.
- * That is mostly safe, except when the length of one copy was modified
- * without copy-on-write, e.g., via truncate(newLength) or remove(void).
- * Then the NUL would be written into the middle of another copy's string.
- */
- if(!(fFlags&kBufferIsReadonly)) {
- /*
- * We must not write to a readonly buffer, but it is known to be
- * NUL-terminated if len1) must not have its contents
- * modified, but the NUL at [len] is beyond the string contents,
- * and multiple string objects and threads writing the same NUL into the
- * same location is harmless.
- * In all other cases, the buffer is fully writable and it is anyway safe
- * to write the NUL.
- *
- * Note: An earlier version of this code tested whether there is a NUL
- * at [len] already, but, while safe, it generated lots of warnings from
- * tools like valgrind and Purify.
- */
- array[len] = 0;
- }
- return array;
- } else if(cloneArrayIfNeeded(len+1)) {
- array = getArrayStart();
- array[len] = 0;
- return array;
- } else {
- return 0;
- }
- }
-}
-
inline UnicodeString&
UnicodeString::operator= (UChar ch)
{ return doReplace(0, length(), &ch, 0, 1); }
@@ -4443,9 +4411,7 @@ inline UnicodeString&
UnicodeString::remove()
{
// remove() of a bogus string makes the string empty and non-bogus
- // we also un-alias a read-only alias to deal with NUL-termination
- // issues with getTerminatedBuffer()
- if(fFlags & (kIsBogus|kBufferIsReadonly)) {
+ if(isBogus()) {
setToEmpty();
} else {
fShortLength = 0;
@@ -4484,9 +4450,6 @@ UnicodeString::truncate(int32_t targetLe
return FALSE;
} else if((uint32_t)targetLength < (uint32_t)length()) {
setLength(targetLength);
- if(fFlags&kBufferIsReadonly) {
- fUnion.fFields.fCapacity = targetLength; // not NUL-terminated any more
- }
return TRUE;
} else {
return FALSE;
diff --git a/intl/icu/source/common/unicode/unorm2.h b/intl/icu/source/common/unicode/unorm2.h
--- a/intl/icu/source/common/unicode/unorm2.h
+++ b/intl/icu/source/common/unicode/unorm2.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 2009-2012, International Business Machines
+* Copyright (C) 2009-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -118,7 +118,6 @@ typedef struct UNormalizer2 UNormalizer2
#if !UCONFIG_NO_NORMALIZATION
-#ifndef U_HIDE_DRAFT_API
/**
* Returns a UNormalizer2 instance for Unicode NFC normalization.
* Same as unorm2_getInstance(NULL, "nfc", UNORM2_COMPOSE, pErrorCode).
@@ -128,9 +127,9 @@ typedef struct UNormalizer2 UNormalizer2
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT const UNormalizer2 * U_EXPORT2
+U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode);
/**
@@ -142,9 +141,9 @@ unorm2_getNFCInstance(UErrorCode *pError
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT const UNormalizer2 * U_EXPORT2
+U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode);
/**
@@ -156,9 +155,9 @@ unorm2_getNFDInstance(UErrorCode *pError
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT const UNormalizer2 * U_EXPORT2
+U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKCInstance(UErrorCode *pErrorCode);
/**
@@ -170,9 +169,9 @@ unorm2_getNFKCInstance(UErrorCode *pErro
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT const UNormalizer2 * U_EXPORT2
+U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKDInstance(UErrorCode *pErrorCode);
/**
@@ -184,11 +183,10 @@ unorm2_getNFKDInstance(UErrorCode *pErro
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the requested Normalizer2, if successful
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT const UNormalizer2 * U_EXPORT2
+U_STABLE const UNormalizer2 * U_EXPORT2
unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode);
-#endif /* U_HIDE_DRAFT_API */
/**
* Returns a UNormalizer2 instance which uses the specified data file
@@ -355,7 +353,6 @@ unorm2_getDecomposition(const UNormalize
UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode);
-#ifndef U_HIDE_DRAFT_API
/**
* Gets the raw decomposition mapping of c.
*
@@ -383,9 +380,9 @@ unorm2_getDecomposition(const UNormalize
* immediately. Check for U_FAILURE() on output or use with
* function chaining. (See User Guide for details.)
* @return the non-negative length of c's raw decomposition, if there is one; otherwise a negative value
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2,
UChar32 c, UChar *decomposition, int32_t capacity,
UErrorCode *pErrorCode);
@@ -403,9 +400,9 @@ unorm2_getRawDecomposition(const UNormal
* @param a A (normalization starter) code point.
* @param b Another code point.
* @return The non-negative composite code point if there is one; otherwise a negative value.
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT UChar32 U_EXPORT2
+U_STABLE UChar32 U_EXPORT2
unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b);
/**
@@ -415,11 +412,10 @@ unorm2_composePair(const UNormalizer2 *n
* @param norm2 UNormalizer2 instance
* @param c code point
* @return c's combining class
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT uint8_t U_EXPORT2
+U_STABLE uint8_t U_EXPORT2
unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c);
-#endif /* U_HIDE_DRAFT_API */
/**
* Tests if the string is normalized.
diff --git a/intl/icu/source/common/unicode/uobject.h b/intl/icu/source/common/unicode/uobject.h
--- a/intl/icu/source/common/unicode/uobject.h
+++ b/intl/icu/source/common/unicode/uobject.h
@@ -59,15 +59,10 @@
* operator==(). Nothing else should be done with them.
*
* \par
- * getDynamicClassID() is declared in the base class of the hierarchy as
- * a pure virtual. Each concrete subclass implements it in the same way:
+ * In class hierarchies that implement "poor man's RTTI",
+ * each concrete subclass implements getDynamicClassID() in the same way:
*
* \code
- * class Base {
- * public:
- * virtual UClassID getDynamicClassID() const = 0;
- * }
- *
* class Derived {
* public:
* virtual UClassID getDynamicClassID() const
@@ -210,10 +205,7 @@ public:
* and all other public ICU C++ classes
* are derived from UObject (starting with ICU 2.2).
*
- * UObject contains common virtual functions like for ICU's "poor man's RTTI".
- * It does not contain default implementations of virtual methods
- * like getDynamicClassID to allow derived classes such as Format
- * to declare these as pure virtual.
+ * UObject contains common virtual functions, in particular a virtual destructor.
*
* The clone() function is not available in UObject because it is not
* implemented by all ICU classes.
@@ -237,21 +229,23 @@ public:
/**
* ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
+ * The base class implementation returns a dummy value.
+ *
+ * Use compiler RTTI rather than ICU's "poor man's RTTI".
+ * Since ICU 4.6, new ICU C++ class hierarchies do not implement "poor man's RTTI".
*
* @stable ICU 2.2
*/
- virtual UClassID getDynamicClassID() const = 0;
+ virtual UClassID getDynamicClassID() const;
protected:
// the following functions are protected to prevent instantiation and
// direct use of UObject itself
// default constructor
- // commented out because UObject is abstract (see getDynamicClassID)
// inline UObject() {}
// copy constructor
- // commented out because UObject is abstract (see getDynamicClassID)
// inline UObject(const UObject &other) {}
#if 0
@@ -286,19 +280,6 @@ protected:
* here would be to declare and empty-implement a protected or public one.
UObject &UObject::operator=(const UObject &);
*/
-
-// Future implementation for RTTI that support subtyping. [alan]
-//
-// public:
-// /**
-// * @internal
-// */
-// static UClassID getStaticClassID();
-//
-// /**
-// * @internal
-// */
-// UBool instanceOf(UClassID type) const;
};
#ifndef U_HIDE_INTERNAL_API
@@ -332,34 +313,6 @@ protected:
return (UClassID)&classID; \
}
-/**
- * This is a simple macro to express that a class and its subclasses do not offer
- * ICU's "poor man's RTTI".
- * Beginning with ICU 4.6, ICU requires C++ compiler RTTI.
- * This does not go into the header. This should only be used in *.cpp files.
- * Use this with a private getDynamicClassID() in an immediate subclass of UObject.
- *
- * @param myClass The name of the class that needs RTTI defined.
- * @internal
- */
-#define UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION(myClass) \
- UClassID myClass::getDynamicClassID() const { return NULL; }
-
-// /**
-// * This macro adds ICU RTTI to an ICU concrete class implementation.
-// * This macro should be invoked in *.cpp files. The corresponding
-// * header should declare getDynamicClassID and getStaticClassID.
-// *
-// * @param myClass The name of the class that needs RTTI defined.
-// * @param myParent The name of the myClass's parent.
-// * @internal
-// */
-/*#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass, myParent) \
- UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass, myParent) \
- UClassID myClass::getDynamicClassID() const { \
- return myClass::getStaticClassID(); \
- }
-*/
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END
diff --git a/intl/icu/source/common/unicode/urename.h b/intl/icu/source/common/unicode/urename.h
--- a/intl/icu/source/common/unicode/urename.h
+++ b/intl/icu/source/common/unicode/urename.h
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2002-2012, International Business Machines
+* Copyright (C) 2002-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*
@@ -103,12 +103,6 @@
#define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData)
#define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data)
#define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data)
-#define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close)
-#define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty)
-#define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData)
-#define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open)
-#define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search)
-#define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString)
#define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup)
#define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse)
#define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone)
@@ -231,6 +225,7 @@
#define u_feof U_ICU_ENTRY_POINT_RENAME(u_feof)
#define u_fflush U_ICU_ENTRY_POINT_RENAME(u_fflush)
#define u_fgetConverter U_ICU_ENTRY_POINT_RENAME(u_fgetConverter)
+#define u_fgetNumberFormat U_ICU_ENTRY_POINT_RENAME(u_fgetNumberFormat)
#define u_fgetc U_ICU_ENTRY_POINT_RENAME(u_fgetc)
#define u_fgetcodepage U_ICU_ENTRY_POINT_RENAME(u_fgetcodepage)
#define u_fgetcx U_ICU_ENTRY_POINT_RENAME(u_fgetcx)
@@ -259,6 +254,7 @@
#define u_fsettransliterator U_ICU_ENTRY_POINT_RENAME(u_fsettransliterator)
#define u_fstropen U_ICU_ENTRY_POINT_RENAME(u_fstropen)
#define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc)
+#define u_getBidiPairedBracket U_ICU_ENTRY_POINT_RENAME(u_getBidiPairedBracket)
#define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass)
#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory)
#define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion)
@@ -440,7 +436,10 @@
#define ubidi_getMaxValue U_ICU_ENTRY_POINT_RENAME(ubidi_getMaxValue)
#define ubidi_getMemory U_ICU_ENTRY_POINT_RENAME(ubidi_getMemory)
#define ubidi_getMirror U_ICU_ENTRY_POINT_RENAME(ubidi_getMirror)
+#define ubidi_getPairedBracket U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracket)
+#define ubidi_getPairedBracketType U_ICU_ENTRY_POINT_RENAME(ubidi_getPairedBracketType)
#define ubidi_getParaLevel U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel)
+#define ubidi_getParaLevelAtIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevelAtIndex)
#define ubidi_getParagraph U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph)
#define ubidi_getParagraphByIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex)
#define ubidi_getProcessedLength U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength)
@@ -518,9 +517,12 @@
#define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow)
#define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersion)
#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneDisplayName)
+#define ucal_getTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneID)
+#define ucal_getTimeZoneIDForWindowsID U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneIDForWindowsID)
#define ucal_getTimeZoneTransitionDate U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneTransitionDate)
#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType)
#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendTransition)
+#define ucal_getWindowsTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getWindowsTimeZoneID)
#define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime)
#define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet)
#define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend)
@@ -570,11 +572,6 @@
#define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower)
#define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle)
#define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper)
-#define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close)
-#define ucd_flushCache U_ICU_ENTRY_POINT_RENAME(ucd_flushCache)
-#define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache)
-#define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator)
-#define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open)
#define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyStarts)
#define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames)
#define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne)
@@ -582,7 +579,6 @@
#define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_registerCleanup)
#define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCleanup)
#define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup)
-#define ucln_mutexedInit U_ICU_ENTRY_POINT_RENAME(ucln_mutexedInit)
#define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup)
#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32)
#define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUnicodeWithOffsets)
@@ -700,7 +696,6 @@
#define ucol_calcSortKey U_ICU_ENTRY_POINT_RENAME(ucol_calcSortKey)
#define ucol_calcSortKeySimpleTertiary U_ICU_ENTRY_POINT_RENAME(ucol_calcSortKeySimpleTertiary)
#define ucol_cloneBinary U_ICU_ENTRY_POINT_RENAME(ucol_cloneBinary)
-#define ucol_cloneRuleData U_ICU_ENTRY_POINT_RENAME(ucol_cloneRuleData)
#define ucol_close U_ICU_ENTRY_POINT_RENAME(ucol_close)
#define ucol_closeElements U_ICU_ENTRY_POINT_RENAME(ucol_closeElements)
#define ucol_countAvailable U_ICU_ENTRY_POINT_RENAME(ucol_countAvailable)
@@ -809,12 +804,14 @@
#define ucsdet_enableInputFilter U_ICU_ENTRY_POINT_RENAME(ucsdet_enableInputFilter)
#define ucsdet_getAllDetectableCharsets U_ICU_ENTRY_POINT_RENAME(ucsdet_getAllDetectableCharsets)
#define ucsdet_getConfidence U_ICU_ENTRY_POINT_RENAME(ucsdet_getConfidence)
+#define ucsdet_getDetectableCharsets U_ICU_ENTRY_POINT_RENAME(ucsdet_getDetectableCharsets)
#define ucsdet_getLanguage U_ICU_ENTRY_POINT_RENAME(ucsdet_getLanguage)
#define ucsdet_getName U_ICU_ENTRY_POINT_RENAME(ucsdet_getName)
#define ucsdet_getUChars U_ICU_ENTRY_POINT_RENAME(ucsdet_getUChars)
#define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInputFilterEnabled)
#define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open)
#define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDeclaredEncoding)
+#define ucsdet_setDetectableCharset U_ICU_ENTRY_POINT_RENAME(ucsdet_setDetectableCharset)
#define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText)
#define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencies)
#define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale)
@@ -923,9 +920,22 @@
#define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch)
#define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32)
#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou)
+#define ufmt_close U_ICU_ENTRY_POINT_RENAME(ufmt_close)
#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUnicode)
#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue)
+#define ufmt_getArrayItemByIndex U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayItemByIndex)
+#define ufmt_getArrayLength U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayLength)
+#define ufmt_getDate U_ICU_ENTRY_POINT_RENAME(ufmt_getDate)
+#define ufmt_getDecNumChars U_ICU_ENTRY_POINT_RENAME(ufmt_getDecNumChars)
+#define ufmt_getDouble U_ICU_ENTRY_POINT_RENAME(ufmt_getDouble)
+#define ufmt_getInt64 U_ICU_ENTRY_POINT_RENAME(ufmt_getInt64)
+#define ufmt_getLong U_ICU_ENTRY_POINT_RENAME(ufmt_getLong)
+#define ufmt_getObject U_ICU_ENTRY_POINT_RENAME(ufmt_getObject)
+#define ufmt_getType U_ICU_ENTRY_POINT_RENAME(ufmt_getType)
+#define ufmt_getUChars U_ICU_ENTRY_POINT_RENAME(ufmt_getUChars)
+#define ufmt_isNumeric U_ICU_ENTRY_POINT_RENAME(ufmt_isNumeric)
#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit)
+#define ufmt_open U_ICU_ENTRY_POINT_RENAME(ufmt_open)
#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou)
#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64)
#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop)
@@ -936,11 +946,14 @@
#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars)
#define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars)
#define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong)
+#define uhash_compareScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_compareScriptSet)
#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars)
#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUnicodeString)
#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count)
#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtable)
+#define uhash_deleteScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_deleteScriptSet)
#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals)
+#define uhash_equalsScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_equalsScriptSet)
#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find)
#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get)
#define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti)
@@ -948,6 +961,7 @@
#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars)
#define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars)
#define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong)
+#define uhash_hashScriptSet U_ICU_ENTRY_POINT_RENAME(uhash_hashScriptSet)
#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars)
#define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeString)
#define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget)
@@ -1091,9 +1105,6 @@
#define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern)
#define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat)
#define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse)
-#define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec)
-#define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc)
-#define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup)
#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock)
#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock)
#define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnicode32Instance)
@@ -1142,6 +1153,7 @@
#define unum_formatDouble U_ICU_ENTRY_POINT_RENAME(unum_formatDouble)
#define unum_formatDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_formatDoubleCurrency)
#define unum_formatInt64 U_ICU_ENTRY_POINT_RENAME(unum_formatInt64)
+#define unum_formatUFormattable U_ICU_ENTRY_POINT_RENAME(unum_formatUFormattable)
#define unum_getAttribute U_ICU_ENTRY_POINT_RENAME(unum_getAttribute)
#define unum_getAvailable U_ICU_ENTRY_POINT_RENAME(unum_getAvailable)
#define unum_getDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_getDoubleAttribute)
@@ -1154,11 +1166,20 @@
#define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble)
#define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleCurrency)
#define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64)
+#define unum_parseToUFormattable U_ICU_ENTRY_POINT_RENAME(unum_parseToUFormattable)
#define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute)
#define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttribute)
#define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol)
#define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribute)
#define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern)
+#define unumsys_close U_ICU_ENTRY_POINT_RENAME(unumsys_close)
+#define unumsys_getDescription U_ICU_ENTRY_POINT_RENAME(unumsys_getDescription)
+#define unumsys_getName U_ICU_ENTRY_POINT_RENAME(unumsys_getName)
+#define unumsys_getRadix U_ICU_ENTRY_POINT_RENAME(unumsys_getRadix)
+#define unumsys_isAlgorithmic U_ICU_ENTRY_POINT_RENAME(unumsys_isAlgorithmic)
+#define unumsys_open U_ICU_ENTRY_POINT_RENAME(unumsys_open)
+#define unumsys_openAvailableNames U_ICU_ENTRY_POINT_RENAME(unumsys_openAvailableNames)
+#define unumsys_openByName U_ICU_ENTRY_POINT_RENAME(unumsys_openByName)
#define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close)
#define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open)
#define uplrules_openForType U_ICU_ENTRY_POINT_RENAME(uplrules_openForType)
@@ -1346,6 +1367,7 @@
#define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc)
#define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round)
#define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray)
+#define uprv_stableBinarySearch U_ICU_ENTRY_POINT_RENAME(uprv_stableBinarySearch)
#define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare)
#define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup)
#define uprv_stricmp U_ICU_ENTRY_POINT_RENAME(uprv_stricmp)
@@ -1443,6 +1465,19 @@
#define uregex_useAnchoringBounds U_ICU_ENTRY_POINT_RENAME(uregex_useAnchoringBounds)
#define uregex_useTransparentBounds U_ICU_ENTRY_POINT_RENAME(uregex_useTransparentBounds)
#define uregex_utext_unescape_charAt U_ICU_ENTRY_POINT_RENAME(uregex_utext_unescape_charAt)
+#define uregion_areEqual U_ICU_ENTRY_POINT_RENAME(uregion_areEqual)
+#define uregion_contains U_ICU_ENTRY_POINT_RENAME(uregion_contains)
+#define uregion_getAvailable U_ICU_ENTRY_POINT_RENAME(uregion_getAvailable)
+#define uregion_getContainedRegions U_ICU_ENTRY_POINT_RENAME(uregion_getContainedRegions)
+#define uregion_getContainedRegionsOfType U_ICU_ENTRY_POINT_RENAME(uregion_getContainedRegionsOfType)
+#define uregion_getContainingRegion U_ICU_ENTRY_POINT_RENAME(uregion_getContainingRegion)
+#define uregion_getContainingRegionOfType U_ICU_ENTRY_POINT_RENAME(uregion_getContainingRegionOfType)
+#define uregion_getNumericCode U_ICU_ENTRY_POINT_RENAME(uregion_getNumericCode)
+#define uregion_getPreferredValues U_ICU_ENTRY_POINT_RENAME(uregion_getPreferredValues)
+#define uregion_getRegionCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionCode)
+#define uregion_getRegionFromCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionFromCode)
+#define uregion_getRegionFromNumericCode U_ICU_ENTRY_POINT_RENAME(uregion_getRegionFromNumericCode)
+#define uregion_getType U_ICU_ENTRY_POINT_RENAME(uregion_getType)
#define ures_close U_ICU_ENTRY_POINT_RENAME(ures_close)
#define ures_copyResb U_ICU_ENTRY_POINT_RENAME(ures_copyResb)
#define ures_countArrayItems U_ICU_ENTRY_POINT_RENAME(ures_countArrayItems)
@@ -1486,13 +1521,19 @@
#define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU)
#define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator)
#define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap)
+#define uscript_breaksBetweenLetters U_ICU_ENTRY_POINT_RENAME(uscript_breaksBetweenLetters)
#define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun)
#define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode)
#define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName)
+#define uscript_getSampleString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleString)
+#define uscript_getSampleUnicodeString U_ICU_ENTRY_POINT_RENAME(uscript_getSampleUnicodeString)
#define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript)
#define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions)
#define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName)
+#define uscript_getUsage U_ICU_ENTRY_POINT_RENAME(uscript_getUsage)
#define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript)
+#define uscript_isCased U_ICU_ENTRY_POINT_RENAME(uscript_isCased)
+#define uscript_isRightToLeft U_ICU_ENTRY_POINT_RENAME(uscript_isRightToLeft)
#define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun)
#define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun)
#define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun)
@@ -1596,6 +1637,11 @@
#define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedLocales)
#define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedUnicodeSet)
#define uspoof_getChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getChecks)
+#define uspoof_getInclusionSet U_ICU_ENTRY_POINT_RENAME(uspoof_getInclusionSet)
+#define uspoof_getInclusionUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getInclusionUnicodeSet)
+#define uspoof_getRecommendedSet U_ICU_ENTRY_POINT_RENAME(uspoof_getRecommendedSet)
+#define uspoof_getRecommendedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getRecommendedUnicodeSet)
+#define uspoof_getRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getRestrictionLevel)
#define uspoof_getSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeleton)
#define uspoof_getSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUTF8)
#define uspoof_getSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUnicodeString)
@@ -1607,6 +1653,7 @@
#define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedLocales)
#define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedUnicodeSet)
#define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks)
+#define uspoof_setRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_setRestrictionLevel)
#define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap)
#define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close)
#define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open)
diff --git a/intl/icu/source/common/unicode/uscript.h b/intl/icu/source/common/unicode/uscript.h
--- a/intl/icu/source/common/unicode/uscript.h
+++ b/intl/icu/source/common/unicode/uscript.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
- * Copyright (C) 1997-2012, International Business Machines
+ * Copyright (C) 1997-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*
@@ -251,8 +251,10 @@ typedef enum UScriptCode {
USCRIPT_PHAGS_PA = 90, /* Phag */
/** @stable ICU 3.6 */
USCRIPT_PHOENICIAN = 91, /* Phnx */
+ /** @stable ICU 52 */
+ USCRIPT_MIAO = 92, /* Plrd */
/** @stable ICU 3.6 */
- USCRIPT_PHONETIC_POLLARD = 92, /* Plrd */
+ USCRIPT_PHONETIC_POLLARD = USCRIPT_MIAO,
/** @stable ICU 3.6 */
USCRIPT_RONGORONGO = 93, /* Roro */
/** @stable ICU 3.6 */
@@ -396,10 +398,15 @@ typedef enum UScriptCode {
/** @stable ICU 49 */
USCRIPT_TIRHUTA = 158,/* Tirh */
+ /** @stable ICU 52 */
+ USCRIPT_CAUCASIAN_ALBANIAN = 159,/* Aghb */
+ /** @stable ICU 52 */
+ USCRIPT_MAHAJANI = 160,/* Mahj */
+
/* Private use codes from Qaaa - Qabx are not supported */
/** @stable ICU 2.2 */
- USCRIPT_CODE_LIMIT = 159
+ USCRIPT_CODE_LIMIT = 161
} UScriptCode;
/**
@@ -456,7 +463,6 @@ uscript_getShortName(UScriptCode scriptC
U_STABLE UScriptCode U_EXPORT2
uscript_getScript(UChar32 codepoint, UErrorCode *err);
-#ifndef U_HIDE_DRAFT_API
/**
* Do the Script_Extensions of code point c contain script sc?
* If c does not have explicit Script_Extensions, then this tests whether
@@ -470,9 +476,9 @@ uscript_getScript(UChar32 codepoint, UEr
* @param c code point
* @param sc script code
* @return TRUE if sc is in Script_Extensions(c)
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT UBool U_EXPORT2
+U_STABLE UBool U_EXPORT2
uscript_hasScript(UChar32 c, UScriptCode sc);
/**
@@ -504,12 +510,118 @@ uscript_hasScript(UChar32 c, UScriptCode
* function chaining. (See User Guide for details.)
* @return number of script codes in c's Script_Extensions, or 1 for the single Script value,
* written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
- * @draft ICU 49
+ * @stable ICU 49
*/
-U_DRAFT int32_t U_EXPORT2
+U_STABLE int32_t U_EXPORT2
uscript_getScriptExtensions(UChar32 c,
UScriptCode *scripts, int32_t capacity,
UErrorCode *errorCode);
+
+#ifndef U_HIDE_DRAFT_API
+
+/**
+ * Script usage constants.
+ * See UAX #31 Unicode Identifier and Pattern Syntax.
+ * http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers
+ *
+ * @draft ICU 51
+ */
+typedef enum UScriptUsage {
+ /** Not encoded in Unicode. @draft ICU 51 */
+ USCRIPT_USAGE_NOT_ENCODED,
+ /** Unknown script usage. @draft ICU 51 */
+ USCRIPT_USAGE_UNKNOWN,
+ /** Candidate for Exclusion from Identifiers. @draft ICU 51 */
+ USCRIPT_USAGE_EXCLUDED,
+ /** Limited Use script. @draft ICU 51 */
+ USCRIPT_USAGE_LIMITED_USE,
+ /** Aspirational Use script. @draft ICU 51 */
+ USCRIPT_USAGE_ASPIRATIONAL,
+ /** Recommended script. @draft ICU 51 */
+ USCRIPT_USAGE_RECOMMENDED
+} UScriptUsage;
+
+/**
+ * Writes the script sample character string.
+ * This string normally consists of one code point but might be longer.
+ * The string is empty if the script is not encoded.
+ *
+ * @param script script code
+ * @param dest output string array
+ * @param capacity number of UChars in the dest array
+ * @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input
+ * @return the string length, even if U_BUFFER_OVERFLOW_ERROR
+ * @draft ICU 51
+ */
+U_DRAFT int32_t U_EXPORT2
+uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode);
+
+#if U_SHOW_CPLUSPLUS_API
+
+U_NAMESPACE_BEGIN
+class UnicodeString;
+U_NAMESPACE_END
+
+/**
+ * Returns the script sample character string.
+ * This string normally consists of one code point but might be longer.
+ * The string is empty if the script is not encoded.
+ *
+ * @param script script code
+ * @return the sample character string
+ * @draft ICU 51
+ */
+U_COMMON_API icu::UnicodeString U_EXPORT2
+uscript_getSampleUnicodeString(UScriptCode script);
+
+#endif
+
+/**
+ * Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax.
+ * Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicode.
+ *
+ * @param script script code
+ * @return script usage
+ * @see UScriptUsage
+ * @draft ICU 51
+ */
+U_DRAFT UScriptUsage U_EXPORT2
+uscript_getUsage(UScriptCode script);
+
+/**
+ * Returns TRUE if the script is written right-to-left.
+ * For example, Arab and Hebr.
+ *
+ * @param script script code
+ * @return TRUE if the script is right-to-left
+ * @draft ICU 51
+ */
+U_DRAFT UBool U_EXPORT2
+uscript_isRightToLeft(UScriptCode script);
+
+/**
+ * Returns TRUE if the script allows line breaks between letters (excluding hyphenation).
+ * Such a script typically requires dictionary-based line breaking.
+ * For example, Hani and Thai.
+ *
+ * @param script script code
+ * @return TRUE if the script allows line breaks between letters
+ * @draft ICU 51
+ */
+U_DRAFT UBool U_EXPORT2
+uscript_breaksBetweenLetters(UScriptCode script);
+
+/**
+ * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary.
+ * For example, Latn and Cyrl.
+ *
+ * @param script script code
+ * @return TRUE if the script is cased
+ * @draft ICU 51
+ */
+U_DRAFT UBool U_EXPORT2
+uscript_isCased(UScriptCode script);
+
#endif /* U_HIDE_DRAFT_API */
#endif
diff --git a/intl/icu/source/common/unicode/utf16.h b/intl/icu/source/common/unicode/utf16.h
--- a/intl/icu/source/common/unicode/utf16.h
+++ b/intl/icu/source/common/unicode/utf16.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -180,6 +180,9 @@
* The offset may point to either the lead or trail surrogate unit
* for a supplementary code point, in which case the macro will read
* the adjacent matching surrogate as well.
+ *
+ * The length can be negative for a NUL-terminated string.
+ *
* If the offset points to a single, unpaired surrogate, then that itself
* will be returned as the code point.
* Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT.
@@ -197,7 +200,7 @@
if(U16_IS_SURROGATE(c)) { \
uint16_t __c2; \
if(U16_IS_SURROGATE_LEAD(c)) { \
- if((i)+1<(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \
+ if((i)+1!=(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { \
(c)=U16_GET_SUPPLEMENTARY((c), __c2); \
} \
} else { \
@@ -242,6 +245,8 @@
* (Post-incrementing forward iteration.)
* "Safe" macro, handles unpaired surrogates and checks for string boundaries.
*
+ * The length can be negative for a NUL-terminated string.
+ *
* The offset may point to the lead surrogate unit
* for a supplementary code point, in which case the macro will read
* the following trail surrogate as well.
@@ -260,7 +265,7 @@
(c)=(s)[(i)++]; \
if(U16_IS_LEAD(c)) { \
uint16_t __c2; \
- if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
+ if((i)!=(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
++(i); \
(c)=U16_GET_SUPPLEMENTARY((c), __c2); \
} \
@@ -338,6 +343,8 @@
* (Post-incrementing iteration.)
* "Safe" macro, handles unpaired surrogates and checks for string boundaries.
*
+ * The length can be negative for a NUL-terminated string.
+ *
* @param s const UChar * string
* @param i string offset, must be i0 && (i)<(length)) { \
+ while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
U16_FWD_1(s, i, length); \
--__N; \
} \
@@ -596,15 +605,17 @@
* The input offset may be the same as the string length.
* "Safe" macro, handles unpaired surrogates and checks for string boundaries.
*
+ * The length can be negative for a NUL-terminated string.
+ *
* @param s const UChar * string
- * @param start starting string offset (usually 0)
- * @param i string offset, start<=i<=length
- * @param length string length
+ * @param start int32_t starting string offset (usually 0)
+ * @param i int32_t string offset, start<=i<=length
+ * @param length int32_t string length
* @see U16_SET_CP_LIMIT_UNSAFE
* @stable ICU 2.4
*/
#define U16_SET_CP_LIMIT(s, start, i, length) { \
- if((start)<(i) && (i)<(length) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \
+ if((start)<(i) && ((i)<(length) || (length)<0) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \
++(i); \
} \
}
diff --git a/intl/icu/source/common/unicode/utf8.h b/intl/icu/source/common/unicode/utf8.h
--- a/intl/icu/source/common/unicode/utf8.h
+++ b/intl/icu/source/common/unicode/utf8.h
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1999-2012, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -232,24 +232,60 @@ utf8_back1SafeBody(const uint8_t *s, int
* The offset may point to either the lead byte or one of the trail bytes
* for a code point, in which case the macro will read all of the bytes
* for the code point.
+ *
+ * The length can be negative for a NUL-terminated string.
+ *
* If the offset points to an illegal UTF-8 byte sequence, then
* c is set to a negative value.
* Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT.
*
* @param s const uint8_t * string
- * @param start starting string offset
- * @param i string offset, must be start<=i=0xc2) && \
- ((i)<(length)) && \
+ ((i)!=(length)) && \
(__t1=(uint8_t)((s)[i]-0x80))<=0x3f \
) { \
- (c)=(UChar)((((c)&0x1f)<<6)|__t1); \
+ (c)=(((c)&0x1f)<<6)|__t1; \
++(i); \
- } else if(U8_IS_LEAD(c)) { \
+ } else { \
/* function call for "complicated" and error cases */ \
- (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (int32_t)(length), c, -1); \
- } else { \
- (c)=U_SENTINEL; \
+ (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c, -1); \
} \
} \
}
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Get a code point from a string at a code point boundary offset,
+ * and advance the offset to the next code point boundary.
+ * (Post-incrementing forward iteration.)
+ * "Safe" macro, checks for illegal sequences and for string boundaries.
+ *
+ * The length can be negative for a NUL-terminated string.
+ *
+ * The offset may point to the lead byte of a multi-byte sequence,
+ * in which case the macro will read the whole sequence.
+ * If the offset points to a trail byte or an illegal UTF-8 sequence, then
+ * c is set to U+FFFD.
+ *
+ * This macro does not distinguish between a real U+FFFD in the text
+ * and U+FFFD returned for an ill-formed sequence.
+ * Use U8_NEXT() if that distinction is important.
+ *
+ * @param s const uint8_t * string
+ * @param i int32_t string offset, must be i=0x80) { \
+ uint8_t __t1, __t2; \
+ if( /* handle U+1000..U+CFFF inline */ \
+ (0xe0<(c) && (c)<=0xec) && \
+ (((i)+1)<(length) || (length)<0) && \
+ (__t1=(uint8_t)((s)[i]-0x80))<=0x3f && \
+ (__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f \
+ ) { \
+ /* no need for (c&0xf) because the upper bits are truncated after <<12 in the cast to (UChar) */ \
+ (c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); \
+ (i)+=2; \
+ } else if( /* handle U+0080..U+07FF inline */ \
+ ((c)<0xe0 && (c)>=0xc2) && \
+ ((i)!=(length)) && \
+ (__t1=(uint8_t)((s)[i]-0x80))<=0x3f \
+ ) { \
+ (c)=(((c)&0x1f)<<6)|__t1; \
+ ++(i); \
+ } else { \
+ /* function call for "complicated" and error cases */ \
+ (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (length), c, -3); \
+ } \
+ } \
+}
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Append a code point to a string, overwriting 1 to 4 bytes.
* The offset points to the current end of the string contents
@@ -374,9 +463,9 @@ utf8_back1SafeBody(const uint8_t *s, int
* then isError is set to TRUE.
*
* @param s const uint8_t * string buffer
- * @param i string offset, must be i>6)&0x3f)|0x80); \
(s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); \
} else { \
- (i)=utf8_appendCharSafeBody(s, (int32_t)(i), (int32_t)(capacity), c, &(isError)); \
+ (i)=utf8_appendCharSafeBody(s, (i), (capacity), c, &(isError)); \
} \
}
@@ -415,9 +504,11 @@ utf8_back1SafeBody(const uint8_t *s, int
* (Post-incrementing iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
+ * The length can be negative for a NUL-terminated string.
+ *
* @param s const uint8_t * string
- * @param i string offset, must be i(length)) { \
+ if((i)+__count>(length) && (length)>=0) { \
__count=(uint8_t)((length)-(i)); \
} \
while(__count>0 && U8_IS_TRAIL((s)[i])) { \
@@ -461,16 +552,18 @@ utf8_back1SafeBody(const uint8_t *s, int
* (Post-incrementing iteration.)
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
+ * The length can be negative for a NUL-terminated string.
+ *
* @param s const uint8_t * string
- * @param i string offset, must be i0 && (i)<(length)) { \
+ while(__N>0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \
U8_FWD_1(s, i, length); \
--__N; \
} \
@@ -502,14 +595,14 @@ utf8_back1SafeBody(const uint8_t *s, int
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
* @param s const uint8_t * string
- * @param start starting string offset (usually 0)
- * @param i string offset, must be start<=i
+ * @param start int32_t starting string offset (usually 0)
+ * @param i int32_t string offset, must be start<=i
* @see U8_SET_CP_START_UNSAFE
* @stable ICU 2.4
*/
#define U8_SET_CP_START(s, start, i) { \
if(U8_IS_TRAIL((s)[(i)])) { \
- (i)=utf8_back1SafeBody(s, start, (int32_t)(i)); \
+ (i)=utf8_back1SafeBody(s, start, (i)); \
} \
}
@@ -570,8 +663,8 @@ utf8_back1SafeBody(const uint8_t *s, int
* If the offset is behind an illegal UTF-8 sequence, then c is set to a negative value.
*
* @param s const uint8_t * string
- * @param start starting string offset (usually 0)
- * @param i string offset, must be start=0x80) { \
- if((c)<=0xbf) { \
- (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1); \
- } else { \
- (c)=U_SENTINEL; \
- } \
+ (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1); \
} \
}
+#ifndef U_HIDE_DRAFT_API
+/**
+ * Move the string offset from one code point boundary to the previous one
+ * and get the code point between them.
+ * (Pre-decrementing backward iteration.)
+ * "Safe" macro, checks for illegal sequences and for string boundaries.
+ *
+ * The input offset may be the same as the string length.
+ * If the offset is behind a multi-byte sequence, then the macro will read
+ * the whole sequence.
+ * If the offset is behind a lead byte, then that itself
+ * will be returned as the code point.
+ * If the offset is behind an illegal UTF-8 sequence, then c is set to U+FFFD.
+ *
+ * This macro does not distinguish between a real U+FFFD in the text
+ * and U+FFFD returned for an ill-formed sequence.
+ * Use U8_PREV() if that distinction is important.
+ *
+ * @param s const uint8_t * string
+ * @param start int32_t starting string offset (usually 0)
+ * @param i int32_t string offset, must be start=0x80) { \
+ (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -3); \
+ } \
+}
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Move the string offset from one code point boundary to the previous one.
* (Pre-decrementing backward iteration.)
@@ -609,14 +731,14 @@ utf8_back1SafeBody(const uint8_t *s, int
* "Safe" macro, checks for illegal sequences and for string boundaries.
*
* @param s const uint8_t * string
- * @param start starting string offset (usually 0)
- * @param i string offset, must be start {
-public:
- UnicodeSetSingleton(SimpleSingleton &s, const char *pattern) :
- SimpleSingletonWrapper(s), fPattern(pattern) {}
- UnicodeSet *getInstance(UErrorCode &errorCode) {
- return SimpleSingletonWrapper::getInstance(createInstance, fPattern, errorCode);
- }
-private:
- static void *createInstance(const void *context, UErrorCode &errorCode) {
- UnicodeString pattern((const char *)context, -1, US_INV);
- UnicodeSet *set=new UnicodeSet(pattern, errorCode);
- if(set==NULL) {
- errorCode=U_MEMORY_ALLOCATION_ERROR;
- return NULL;
- }
- set->freeze();
- ucln_common_registerCleanup(UCLN_COMMON_USET, uset_cleanup);
- return set;
- }
+struct Inclusion {
+ UnicodeSet *fSet;
+ UInitOnce fInitOnce;
+};
+static Inclusion gInclusions[UPROPS_SRC_COUNT]; // cached getInclusions()
- const char *fPattern;
-};
-
-U_CDECL_BEGIN
-
-static UnicodeSet *INCLUSIONS[UPROPS_SRC_COUNT] = { NULL }; // cached getInclusions()
-
-STATIC_SIMPLE_SINGLETON(uni32Singleton);
+static UnicodeSet *uni32Singleton;
+static icu::UInitOnce uni32InitOnce = U_INITONCE_INITIALIZER;
//----------------------------------------------------------------
// Inclusions list
@@ -156,15 +132,16 @@ static void U_CALLCONV
* Cleanup function for UnicodeSet
*/
static UBool U_CALLCONV uset_cleanup(void) {
- int32_t i;
+ for(int32_t i = UPROPS_SRC_NONE; i < UPROPS_SRC_COUNT; ++i) {
+ Inclusion &in = gInclusions[i];
+ delete in.fSet;
+ in.fSet = NULL;
+ in.fInitOnce.reset();
+ }
- for(i = UPROPS_SRC_NONE; i < UPROPS_SRC_COUNT; ++i) {
- if (INCLUSIONS[i] != NULL) {
- delete INCLUSIONS[i];
- INCLUSIONS[i] = NULL;
- }
- }
- UnicodeSetSingleton(uni32Singleton, NULL).deleteInstance();
+ delete uni32Singleton;
+ uni32Singleton = NULL;
+ uni32InitOnce.reset();
return TRUE;
}
@@ -173,110 +150,131 @@ U_CDECL_END
U_NAMESPACE_BEGIN
/*
-Reduce excessive reallocation, and make it easier to detect initialization
-problems.
+Reduce excessive reallocation, and make it easier to detect initialization problems.
Usually you don't see smaller sets than this for Unicode 5.0.
*/
#define DEFAULT_INCLUSION_CAPACITY 3072
-const UnicodeSet* UnicodeSet::getInclusions(int32_t src, UErrorCode &status) {
- UBool needInit;
- UMTX_CHECK(NULL, (INCLUSIONS[src] == NULL), needInit);
- if (needInit) {
- UnicodeSet* incl = new UnicodeSet();
- USetAdder sa = {
- (USet *)incl,
- _set_add,
- _set_addRange,
- _set_addString,
- NULL, // don't need remove()
- NULL // don't need removeRange()
- };
- if (incl != NULL) {
- incl->ensureCapacity(DEFAULT_INCLUSION_CAPACITY, status);
- switch(src) {
- case UPROPS_SRC_CHAR:
- uchar_addPropertyStarts(&sa, &status);
- break;
- case UPROPS_SRC_PROPSVEC:
- upropsvec_addPropertyStarts(&sa, &status);
- break;
- case UPROPS_SRC_CHAR_AND_PROPSVEC:
- uchar_addPropertyStarts(&sa, &status);
- upropsvec_addPropertyStarts(&sa, &status);
- break;
+void U_CALLCONV UnicodeSet_initInclusion(int32_t src, UErrorCode &status) {
+ // This function is invoked only via umtx_initOnce().
+ // This function is a friend of class UnicodeSet.
+
+ U_ASSERT(src >=0 && srcensureCapacity(DEFAULT_INCLUSION_CAPACITY, status);
+ switch(src) {
+ case UPROPS_SRC_CHAR:
+ uchar_addPropertyStarts(&sa, &status);
+ break;
+ case UPROPS_SRC_PROPSVEC:
+ upropsvec_addPropertyStarts(&sa, &status);
+ break;
+ case UPROPS_SRC_CHAR_AND_PROPSVEC:
+ uchar_addPropertyStarts(&sa, &status);
+ upropsvec_addPropertyStarts(&sa, &status);
+ break;
#if !UCONFIG_NO_NORMALIZATION
- case UPROPS_SRC_CASE_AND_NORM: {
- const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
- if(U_SUCCESS(status)) {
- impl->addPropertyStarts(&sa, status);
- }
- ucase_addPropertyStarts(ucase_getSingleton(), &sa, &status);
- break;
- }
- case UPROPS_SRC_NFC: {
- const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
- if(U_SUCCESS(status)) {
- impl->addPropertyStarts(&sa, status);
- }
- break;
- }
- case UPROPS_SRC_NFKC: {
- const Normalizer2Impl *impl=Normalizer2Factory::getNFKCImpl(status);
- if(U_SUCCESS(status)) {
- impl->addPropertyStarts(&sa, status);
- }
- break;
- }
- case UPROPS_SRC_NFKC_CF: {
- const Normalizer2Impl *impl=Normalizer2Factory::getNFKC_CFImpl(status);
- if(U_SUCCESS(status)) {
- impl->addPropertyStarts(&sa, status);
- }
- break;
- }
- case UPROPS_SRC_NFC_CANON_ITER: {
- const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
- if(U_SUCCESS(status)) {
- impl->addCanonIterPropertyStarts(&sa, status);
- }
- break;
- }
+ case UPROPS_SRC_CASE_AND_NORM: {
+ const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
+ if(U_SUCCESS(status)) {
+ impl->addPropertyStarts(&sa, status);
+ }
+ ucase_addPropertyStarts(ucase_getSingleton(), &sa, &status);
+ break;
+ }
+ case UPROPS_SRC_NFC: {
+ const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
+ if(U_SUCCESS(status)) {
+ impl->addPropertyStarts(&sa, status);
+ }
+ break;
+ }
+ case UPROPS_SRC_NFKC: {
+ const Normalizer2Impl *impl=Normalizer2Factory::getNFKCImpl(status);
+ if(U_SUCCESS(status)) {
+ impl->addPropertyStarts(&sa, status);
+ }
+ break;
+ }
+ case UPROPS_SRC_NFKC_CF: {
+ const Normalizer2Impl *impl=Normalizer2Factory::getNFKC_CFImpl(status);
+ if(U_SUCCESS(status)) {
+ impl->addPropertyStarts(&sa, status);
+ }
+ break;
+ }
+ case UPROPS_SRC_NFC_CANON_ITER: {
+ const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(status);
+ if(U_SUCCESS(status)) {
+ impl->addCanonIterPropertyStarts(&sa, status);
+ }
+ break;
+ }
#endif
- case UPROPS_SRC_CASE:
- ucase_addPropertyStarts(ucase_getSingleton(), &sa, &status);
- break;
- case UPROPS_SRC_BIDI:
- ubidi_addPropertyStarts(ubidi_getSingleton(), &sa, &status);
- break;
- default:
- status = U_INTERNAL_PROGRAM_ERROR;
- break;
- }
- if (U_SUCCESS(status)) {
- // Compact for caching
- incl->compact();
- umtx_lock(NULL);
- if (INCLUSIONS[src] == NULL) {
- INCLUSIONS[src] = incl;
- incl = NULL;
- ucln_common_registerCleanup(UCLN_COMMON_USET, uset_cleanup);
- }
- umtx_unlock(NULL);
- }
- delete incl;
- } else {
- status = U_MEMORY_ALLOCATION_ERROR;
- }
+ case UPROPS_SRC_CASE:
+ ucase_addPropertyStarts(ucase_getSingleton(), &sa, &status);
+ break;
+ case UPROPS_SRC_BIDI:
+ ubidi_addPropertyStarts(ubidi_getSingleton(), &sa, &status);
+ break;
+ default:
+ status = U_INTERNAL_PROGRAM_ERROR;
+ break;
}
- return INCLUSIONS[src];
+
+ if (U_FAILURE(status)) {
+ delete incl;
+ incl = NULL;
+ return;
+ }
+ // Compact for caching
+ incl->compact();
+ ucln_common_registerCleanup(UCLN_COMMON_USET, uset_cleanup);
}
+
+
+const UnicodeSet* UnicodeSet::getInclusions(int32_t src, UErrorCode &status) {
+ U_ASSERT(src >=0 && srcfreeze();
+ }
+ ucln_common_registerCleanup(UCLN_COMMON_USET, uset_cleanup);
+}
+
U_CFUNC UnicodeSet *
uniset_getUnicode32Instance(UErrorCode &errorCode) {
- return UnicodeSetSingleton(uni32Singleton, "[:age=3.2:]").getInstance(errorCode);
+ umtx_initOnce(uni32InitOnce, &createUni32Set, errorCode);
+ return uni32Singleton;
}
// helper functions for matching of pattern syntax pieces ------------------ ***
diff --git a/intl/icu/source/common/unisetspan.cpp b/intl/icu/source/common/unisetspan.cpp
--- a/intl/icu/source/common/unisetspan.cpp
+++ b/intl/icu/source/common/unisetspan.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2007-2011, International Business Machines
+* Copyright (C) 2007-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -503,9 +503,9 @@ spanOneUTF8(const UnicodeSet &set, const
if((int8_t)c>=0) {
return set.contains(c) ? 1 : -1;
}
- // Take advantage of non-ASCII fastpaths in U8_NEXT().
+ // Take advantage of non-ASCII fastpaths in U8_NEXT_OR_FFFD().
int32_t i=0;
- U8_NEXT(s, i, length, c);
+ U8_NEXT_OR_FFFD(s, i, length, c);
return set.contains(c) ? i : -i;
}
@@ -516,7 +516,7 @@ spanOneBackUTF8(const UnicodeSet &set, c
return set.contains(c) ? 1 : -1;
}
int32_t i=length-1;
- c=utf8_prevCharSafeBody(s, 0, &i, c, -1);
+ c=utf8_prevCharSafeBody(s, 0, &i, c, -3);
length-=i;
return set.contains(c) ? length : -length;
}
diff --git a/intl/icu/source/common/unistr.cpp b/intl/icu/source/common/unistr.cpp
--- a/intl/icu/source/common/unistr.cpp
+++ b/intl/icu/source/common/unistr.cpp
@@ -1,6 +1,6 @@
/*
******************************************************************************
-* Copyright (C) 1999-2012, International Business Machines Corporation and
+* Copyright (C) 1999-2013, International Business Machines Corporation and
* others. All Rights Reserved.
******************************************************************************
*
@@ -100,7 +100,7 @@ U_NAMESPACE_BEGIN
due to how AIX works with multiple definitions of virtual functions.
*/
Replaceable::~Replaceable() {}
-Replaceable::Replaceable() {}
+
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeString)
UnicodeString U_EXPORT2
@@ -117,23 +117,19 @@ operator+ (const UnicodeString &s1, cons
//========================================
void
-UnicodeString::addRef()
-{ umtx_atomic_inc((int32_t *)fUnion.fFields.fArray - 1);}
+UnicodeString::addRef() {
+ umtx_atomic_inc((u_atomic_int32_t *)fUnion.fFields.fArray - 1);
+}
int32_t
-UnicodeString::removeRef()
-{ return umtx_atomic_dec((int32_t *)fUnion.fFields.fArray - 1);}
+UnicodeString::removeRef() {
+ return umtx_atomic_dec((u_atomic_int32_t *)fUnion.fFields.fArray - 1);
+}
int32_t
-UnicodeString::refCount() const
-{
- umtx_lock(NULL);
- // Note: without the lock to force a memory barrier, we might see a very
- // stale value on some multi-processor systems.
- int32_t count = *((int32_t *)fUnion.fFields.fArray - 1);
- umtx_unlock(NULL);
- return count;
- }
+UnicodeString::refCount() const {
+ return umtx_loadAcquire(*((u_atomic_int32_t *)fUnion.fFields.fArray - 1));
+}
void
UnicodeString::releaseArray() {
@@ -147,10 +143,8 @@ UnicodeString::releaseArray() {
//========================================
// Constructors
//========================================
-UnicodeString::UnicodeString()
- : fShortLength(0),
- fFlags(kShortString)
-{}
+
+// The default constructor is inline in unistr.h.
UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count)
: fShortLength(0),
@@ -1131,6 +1125,44 @@ UnicodeString::unBogus() {
}
}
+const UChar *
+UnicodeString::getTerminatedBuffer() {
+ if(!isWritable()) {
+ return 0;
+ }
+ UChar *array = getArrayStart();
+ int32_t len = length();
+ if(len < getCapacity()) {
+ if(fFlags & kBufferIsReadonly) {
+ // If lenfRes);
if(URES_IS_TABLE(type)) {
- int32_t t;
- res = res_getTableItemByKey(&(resB->fResData), resB->fRes, &t, &key);
+ res = getTableItemByKeyPath(&(resB->fResData), resB->fRes, inKey);
+ const char* key = inKey;
if(res == RES_BOGUS) {
UResourceDataEntry *dataEntry = resB->fData;
char path[256];
char* myPath = path;
const char* resPath = resB->fResPath;
int32_t len = resB->fResPathLen;
-
while(res == RES_BOGUS && dataEntry->fParent != NULL) { /* Otherwise, we'll look in parents */
dataEntry = dataEntry->fParent;
rootRes = dataEntry->fData.rootRes;
diff --git a/intl/icu/source/common/uscript_props.cpp b/intl/icu/source/common/uscript_props.cpp
new file mode 100644
--- /dev/null
+++ b/intl/icu/source/common/uscript_props.cpp
@@ -0,0 +1,269 @@
+/*
+*******************************************************************************
+* Copyright (C) 2013, International Business Machines
+* Corporation and others. All Rights Reserved.
+*******************************************************************************
+* file name: uscript_props.cpp
+* encoding: US-ASCII
+* tab size: 8 (not used)
+* indentation:4
+*
+* created on: 2013feb16
+* created by: Markus W. Scherer
+*/
+
+#include "unicode/utypes.h"
+#include "unicode/unistr.h"
+#include "unicode/uscript.h"
+#include "unicode/utf16.h"
+#include "ustr_imp.h"
+
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
+namespace {
+
+// Script metadata (script properties).
+// See http://unicode.org/cldr/trac/browser/trunk/common/properties/scriptMetadata.txt
+
+// 0 = NOT_ENCODED, no sample character, default false script properties.
+// Bits 20.. 0: sample character
+
+// Bits 23..21: usage
+const int32_t UNKNOWN = 1 << 21;
+const int32_t EXCLUSION = 2 << 21;
+const int32_t LIMITED_USE = 3 << 21;
+const int32_t ASPIRATIONAL = 4 << 21;
+const int32_t RECOMMENDED = 5 << 21;
+
+// Bits 31..24: Single-bit flags
+const int32_t RTL = 1 << 24;
+const int32_t LB_LETTERS = 1 << 25;
+const int32_t CASED = 1 << 26;
+
+const int32_t SCRIPT_PROPS[] = {
+ // Begin copy-paste output from
+ // tools/trunk/unicode/py/parsescriptmetadata.py
+ 0x0040 | UNKNOWN, // Zyyy
+ 0x0308 | UNKNOWN, // Zinh
+ 0x0628 | RECOMMENDED | RTL, // Arab
+ 0x0531 | RECOMMENDED | CASED, // Armn
+ 0x0995 | RECOMMENDED, // Beng
+ 0x3105 | RECOMMENDED | LB_LETTERS, // Bopo
+ 0x13C4 | LIMITED_USE, // Cher
+ 0x03E2 | EXCLUSION | CASED, // Copt
+ 0x042F | RECOMMENDED | CASED, // Cyrl
+ 0x10414 | EXCLUSION | CASED, // Dsrt
+ 0x0905 | RECOMMENDED, // Deva
+ 0x12A0 | RECOMMENDED, // Ethi
+ 0x10D3 | RECOMMENDED, // Geor
+ 0x10330 | EXCLUSION, // Goth
+ 0x03A9 | RECOMMENDED | CASED, // Grek
+ 0x0A95 | RECOMMENDED, // Gujr
+ 0x0A15 | RECOMMENDED, // Guru
+ 0x5B57 | RECOMMENDED | LB_LETTERS, // Hani
+ 0xAC00 | RECOMMENDED, // Hang
+ 0x05D0 | RECOMMENDED | RTL, // Hebr
+ 0x304B | RECOMMENDED | LB_LETTERS, // Hira
+ 0x0C95 | RECOMMENDED, // Knda
+ 0x30AB | RECOMMENDED | LB_LETTERS, // Kana
+ 0x1780 | RECOMMENDED | LB_LETTERS, // Khmr
+ 0x0EA5 | RECOMMENDED | LB_LETTERS, // Laoo
+ 0x004C | RECOMMENDED | CASED, // Latn
+ 0x0D15 | RECOMMENDED, // Mlym
+ 0x1826 | ASPIRATIONAL, // Mong
+ 0x1000 | RECOMMENDED | LB_LETTERS, // Mymr
+ 0x168F | EXCLUSION, // Ogam
+ 0x10300 | EXCLUSION, // Ital
+ 0x0B15 | RECOMMENDED, // Orya
+ 0x16A0 | EXCLUSION, // Runr
+ 0x0D85 | RECOMMENDED, // Sinh
+ 0x0710 | LIMITED_USE | RTL, // Syrc
+ 0x0B95 | RECOMMENDED, // Taml
+ 0x0C15 | RECOMMENDED, // Telu
+ 0x078C | RECOMMENDED | RTL, // Thaa
+ 0x0E17 | RECOMMENDED | LB_LETTERS, // Thai
+ 0x0F40 | RECOMMENDED, // Tibt
+ 0x14C0 | ASPIRATIONAL, // Cans
+ 0xA288 | ASPIRATIONAL | LB_LETTERS, // Yiii
+ 0x1703 | EXCLUSION, // Tglg
+ 0x1723 | EXCLUSION, // Hano
+ 0x1743 | EXCLUSION, // Buhd
+ 0x1763 | EXCLUSION, // Tagb
+ 0x2800 | UNKNOWN, // Brai
+ 0x10800 | EXCLUSION | RTL, // Cprt
+ 0x1900 | LIMITED_USE, // Limb
+ 0x10000 | EXCLUSION, // Linb
+ 0x10480 | EXCLUSION, // Osma
+ 0x10450 | EXCLUSION, // Shaw
+ 0x1950 | LIMITED_USE | LB_LETTERS, // Tale
+ 0x10380 | EXCLUSION, // Ugar
+ 0,
+ 0x1A00 | EXCLUSION, // Bugi
+ 0x2C00 | EXCLUSION | CASED, // Glag
+ 0x10A00 | EXCLUSION | RTL, // Khar
+ 0xA800 | LIMITED_USE, // Sylo
+ 0x1980 | LIMITED_USE | LB_LETTERS, // Talu
+ 0x2D30 | ASPIRATIONAL, // Tfng
+ 0x103A0 | EXCLUSION, // Xpeo
+ 0x1B05 | LIMITED_USE | LB_LETTERS, // Bali
+ 0x1BC0 | LIMITED_USE, // Batk
+ 0,
+ 0x11005 | EXCLUSION, // Brah
+ 0xAA00 | LIMITED_USE, // Cham
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x13153 | EXCLUSION, // Egyp
+ 0,
+ 0x5B57 | RECOMMENDED | LB_LETTERS, // Hans
+ 0x5B57 | RECOMMENDED | LB_LETTERS, // Hant
+ 0,
+ 0,
+ 0,
+ 0xA984 | LIMITED_USE | LB_LETTERS, // Java
+ 0xA90A | LIMITED_USE, // Kali
+ 0,
+ 0,
+ 0x1C00 | LIMITED_USE, // Lepc
+ 0,
+ 0x0840 | LIMITED_USE | RTL, // Mand
+ 0,
+ 0x10980 | EXCLUSION | RTL, // Mero
+ 0x07CA | LIMITED_USE | RTL, // Nkoo
+ 0x10C00 | EXCLUSION | RTL, // Orkh
+ 0,
+ 0xA840 | EXCLUSION, // Phag
+ 0x10900 | EXCLUSION | RTL, // Phnx
+ 0x16F00 | ASPIRATIONAL, // Plrd
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0xA549 | LIMITED_USE, // Vaii
+ 0,
+ 0x12000 | EXCLUSION, // Xsux
+ 0,
+ 0xFDD0 | UNKNOWN, // Zzzz
+ 0x102A0 | EXCLUSION, // Cari
+ 0x304B | RECOMMENDED | LB_LETTERS, // Jpan
+ 0x1A20 | LIMITED_USE | LB_LETTERS, // Lana
+ 0x10280 | EXCLUSION, // Lyci
+ 0x10920 | EXCLUSION | RTL, // Lydi
+ 0x1C5A | LIMITED_USE, // Olck
+ 0xA930 | EXCLUSION, // Rjng
+ 0xA882 | LIMITED_USE, // Saur
+ 0,
+ 0x1B83 | LIMITED_USE, // Sund
+ 0,
+ 0xABC0 | LIMITED_USE, // Mtei
+ 0x10840 | EXCLUSION | RTL, // Armi
+ 0x10B00 | EXCLUSION | RTL, // Avst
+ 0x11103 | LIMITED_USE, // Cakm
+ 0xAC00 | RECOMMENDED, // Kore
+ 0x11083 | EXCLUSION, // Kthi
+ 0,
+ 0x10B60 | EXCLUSION | RTL, // Phli
+ 0,
+ 0,
+ 0x10B40 | EXCLUSION | RTL, // Prti
+ 0x0800 | EXCLUSION | RTL, // Samr
+ 0xAA80 | LIMITED_USE | LB_LETTERS, // Tavt
+ 0,
+ 0,
+ 0xA6A0 | LIMITED_USE, // Bamu
+ 0xA4D0 | LIMITED_USE, // Lisu
+ 0,
+ 0x10A60 | EXCLUSION | RTL, // Sarb
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x109A0 | EXCLUSION | RTL, // Merc
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x11183 | EXCLUSION, // Shrd
+ 0x110D0 | EXCLUSION, // Sora
+ 0x11680 | EXCLUSION, // Takr
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ // End copy-paste from parsescriptmetadata.py
+};
+
+int32_t getScriptProps(UScriptCode script) {
+ if (0 <= script && script < LENGTHOF(SCRIPT_PROPS)) {
+ return SCRIPT_PROPS[script];
+ } else {
+ return 0;
+ }
+}
+
+} // namespace
+
+U_CAPI int32_t U_EXPORT2
+uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode) {
+ if(U_FAILURE(*pErrorCode)) { return 0; }
+ if(capacity < 0 || (capacity > 0 && dest == NULL)) {
+ *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR;
+ return 0;
+ }
+ int32_t sampleChar = getScriptProps(script) & 0x1fffff;
+ int32_t length;
+ if(sampleChar == 0) {
+ length = 0;
+ } else {
+ length = U16_LENGTH(sampleChar);
+ if(length <= capacity) {
+ int32_t i = 0;
+ U16_APPEND_UNSAFE(dest, i, sampleChar);
+ }
+ }
+ return u_terminateUChars(dest, capacity, length, pErrorCode);
+}
+
+U_COMMON_API icu::UnicodeString U_EXPORT2
+uscript_getSampleUnicodeString(UScriptCode script) {
+ icu::UnicodeString sample;
+ int32_t sampleChar = getScriptProps(script) & 0x1fffff;
+ if(sampleChar != 0) {
+ sample.append(sampleChar);
+ }
+ return sample;
+}
+
+U_CAPI UScriptUsage U_EXPORT2
+uscript_getUsage(UScriptCode script) {
+ return (UScriptUsage)((getScriptProps(script) >> 21) & 7);
+}
+
+U_CAPI UBool U_EXPORT2
+uscript_isRightToLeft(UScriptCode script) {
+ return (getScriptProps(script) & RTL) != 0;
+}
+
+U_CAPI UBool U_EXPORT2
+uscript_breaksBetweenLetters(UScriptCode script) {
+ return (getScriptProps(script) & LB_LETTERS) != 0;
+}
+
+U_CAPI UBool U_EXPORT2
+uscript_isCased(UScriptCode script) {
+ return (getScriptProps(script) & CASED) != 0;
+}
diff --git a/intl/icu/source/common/ushape.cpp b/intl/icu/source/common/ushape.cpp
--- a/intl/icu/source/common/ushape.cpp
+++ b/intl/icu/source/common/ushape.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
- * Copyright (C) 2000-2012, International Business Machines
+ * Copyright (C) 2000-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -44,6 +44,7 @@
* as a glyph fragment of wide-glyph letters
* + IBM Unicode conversion tables map it to U+200B (ZWSP)
* + IBM Egypt has proposed to encode the tail in Unicode among Arabic Presentation Forms
+ * + Unicode 3.2 added U+FE73 ARABIC TAIL FRAGMENT
*/
/* definitions for Arabic letter shaping ------------------------------------ */
@@ -272,7 +273,7 @@ static const uint8_t presBLink[]=
static const UChar convertFBto06[] =
{
/***********0******1******2******3******4******5******6******7******8******9******A******B******C******D******E******F***/
-/*FB5*/ 0x671, 0x671, 0, 0, 0, 0, 0x07E, 0x07E, 0x07E, 0x07E, 0, 0, 0, 0, 0, 0,
+/*FB5*/ 0x671, 0x671, 0, 0, 0, 0, 0x67E, 0x67E, 0x67E, 0x67E, 0, 0, 0, 0, 0, 0,
/*FB6*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*FB7*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x686, 0x686, 0x686, 0x686, 0, 0,
/*FB8*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x698, 0x698, 0, 0, 0x6A9, 0x6A9,
diff --git a/intl/icu/source/common/usprep.cpp b/intl/icu/source/common/usprep.cpp
--- a/intl/icu/source/common/usprep.cpp
+++ b/intl/icu/source/common/usprep.cpp
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
- * Copyright (C) 2003-2012, International Business Machines
+ * Copyright (C) 2003-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -42,6 +42,7 @@ U_CDECL_BEGIN
Static cache for already opened StringPrep profiles
*/
static UHashtable *SHARED_DATA_HASHTABLE = NULL;
+static icu::UInitOnce gSharedDataInitOnce;
static UMutex usprepMutex = U_MUTEX_INITIALIZER;
@@ -195,32 +196,25 @@ static UBool U_CALLCONV usprep_cleanup(v
SHARED_DATA_HASHTABLE = NULL;
}
}
-
+ gSharedDataInitOnce.reset();
return (SHARED_DATA_HASHTABLE == NULL);
}
U_CDECL_END
/** Initializes the cache for resources */
+static void U_CALLCONV
+createCache(UErrorCode &status) {
+ SHARED_DATA_HASHTABLE = uhash_open(hashEntry, compareEntries, NULL, &status);
+ if (U_FAILURE(status)) {
+ SHARED_DATA_HASHTABLE = NULL;
+ }
+ ucln_common_registerCleanup(UCLN_COMMON_USPREP, usprep_cleanup);
+}
+
static void
initCache(UErrorCode *status) {
- UBool makeCache;
- UMTX_CHECK(&usprepMutex, (SHARED_DATA_HASHTABLE == NULL), makeCache);
- if(makeCache) {
- UHashtable *newCache = uhash_open(hashEntry, compareEntries, NULL, status);
- if (U_SUCCESS(*status)) {
- umtx_lock(&usprepMutex);
- if(SHARED_DATA_HASHTABLE == NULL) {
- SHARED_DATA_HASHTABLE = newCache;
- ucln_common_registerCleanup(UCLN_COMMON_USPREP, usprep_cleanup);
- newCache = NULL;
- }
- umtx_unlock(&usprepMutex);
- }
- if(newCache != NULL) {
- uhash_close(newCache);
- }
- }
+ umtx_initOnce(gSharedDataInitOnce, &createCache, *status);
}
static UBool U_CALLCONV
diff --git a/intl/icu/source/common/ustr_cnv.c b/intl/icu/source/common/ustr_cnv.c
--- a/intl/icu/source/common/ustr_cnv.c
+++ b/intl/icu/source/common/ustr_cnv.c
@@ -1,7 +1,7 @@
/*
*******************************************************************************
*
-* Copyright (C) 1998-2010, International Business Machines
+* Copyright (C) 1998-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@@ -24,7 +24,7 @@
#include "unicode/ucnv.h"
#include "cstring.h"
#include "cmemory.h"
-#include "umutex.h"
+#include "cmutex.h"
#include "ustr_cnv.h"
/* mutexed access to a shared default converter ----------------------------- */
diff --git a/intl/icu/source/common/ustrtrns.cpp b/intl/icu/source/common/ustrtrns.cpp
--- a/intl/icu/source/common/ustrtrns.cpp
+++ b/intl/icu/source/common/ustrtrns.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2001-2012, International Business Machines
+* Copyright (C) 2001-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -34,6 +34,8 @@
#include "ustr_imp.h"
#include "uassert.h"
+#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+
U_CAPI UChar* U_EXPORT2
u_strFromUTF32WithSub(UChar *dest,
int32_t destCapacity,
@@ -381,7 +383,7 @@ utf8_nextCharSafeBodyPointer(const uint8
/* correct sequence - all trail bytes have (b7..b6)==(10)? */
/* illegal is also set if count>=4 */
- U_ASSERT(count=0) {
+ return utf8_errorValue[count];
+ } else if(strict==-3) {
+ return 0xfffd;
+ } else {
+ return U_SENTINEL;
+ }
+}
+
/*
- * Handle the non-inline part of the U8_NEXT() macro and its obsolete sibling
- * UTF8_NEXT_CHAR_SAFE().
+ * Handle the non-inline part of the U8_NEXT() and U8_NEXT_FFFD() macros
+ * and their obsolete sibling UTF8_NEXT_CHAR_SAFE().
+ *
+ * U8_NEXT() supports NUL-terminated strings indicated via length<0.
*
* The "strict" parameter controls the error behavior:
- * <0 "Safe" behavior of U8_NEXT(): All illegal byte sequences yield a negative
- * code point result.
+ * <0 "Safe" behavior of U8_NEXT():
+ * -1: All illegal byte sequences yield U_SENTINEL=-1.
+ * -2: Same as -1, except for lenient treatment of surrogate code points as legal.
+ * Some implementations use this for roundtripping of
+ * Unicode 16-bit strings that are not well-formed UTF-16, that is, they
+ * contain unpaired surrogates.
+ * -3: All illegal byte sequences yield U+FFFD.
* 0 Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., FALSE):
* All illegal byte sequences yield a positive code point such that this
* result code point would be encoded with the same number of bytes as
@@ -101,11 +119,6 @@ utf8_errorValue[6]={
* Same as the obsolete "safe" behavior, but non-characters are also treated
* like illegal sequences.
*
- * The special negative (<0) value -2 is used for lenient treatment of surrogate
- * code points as legal. Some implementations use this for roundtripping of
- * Unicode 16-bit strings that are not well-formed UTF-16, that is, they
- * contain unpaired surrogates.
- *
* Note that a UBool is the same as an int8_t.
*/
U_CAPI UChar32 U_EXPORT2
@@ -113,90 +126,57 @@ utf8_nextCharSafeBody(const uint8_t *s,
int32_t i=*pi;
uint8_t count=U8_COUNT_TRAIL_BYTES(c);
U_ASSERT(count <= 5); /* U8_COUNT_TRAIL_BYTES returns value 0...5 */
- if((i)+count<=(length)) {
- uint8_t trail, illegal=0;
+ if(i+count<=length || length<0) {
+ uint8_t trail;
- U8_MASK_LEAD_BYTE((c), count);
- /* count==0 for illegally leading trail bytes and the illegal bytes 0xfe and 0xff */
+ U8_MASK_LEAD_BYTE(c, count);
+ /* support NUL-terminated strings: do not read beyond the first non-trail byte */
switch(count) {
/* each branch falls through to the next one */
+ case 0:
+ /* count==0 for illegally leading trail bytes and the illegal bytes 0xfe and 0xff */
case 5:
case 4:
/* count>=4 is always illegal: no more than 3 trail bytes in Unicode's UTF-8 */
- illegal=1;
break;
case 3:
- trail=s[(i)++];
- (c)=((c)<<6)|(trail&0x3f);
- if(c<0x110) {
- illegal|=(trail&0xc0)^0x80;
- } else {
- /* code point>0x10ffff, outside Unicode */
- illegal=1;
- break;
- }
+ trail=s[i++]-0x80;
+ c=(c<<6)|trail;
+ /* c>=0x110 would result in code point>0x10ffff, outside Unicode */
+ if(c>=0x110 || trail>0x3f) { break; }
case 2:
- trail=s[(i)++];
- (c)=((c)<<6)|(trail&0x3f);
- illegal|=(trail&0xc0)^0x80;
+ trail=s[i++]-0x80;
+ c=(c<<6)|trail;
+ /*
+ * test for a surrogate d800..dfff unless we are lenient:
+ * before the last (c<<6), a surrogate is c=360..37f
+ */
+ if(((c&0xffe0)==0x360 && strict!=-2) || trail>0x3f) { break; }
case 1:
- trail=s[(i)++];
- (c)=((c)<<6)|(trail&0x3f);
- illegal|=(trail&0xc0)^0x80;
- break;
- case 0:
- if(strict>=0) {
- return UTF8_ERROR_VALUE_1;
- } else {
- return U_SENTINEL;
+ trail=s[i++]-0x80;
+ c=(c<<6)|trail;
+ if(trail>0x3f) { break; }
+ /* correct sequence - all trail bytes have (b7..b6)==(10) */
+ if(c>=utf8_minLegal[count] &&
+ /* strict: forbid non-characters like U+fffe */
+ (strict<=0 || !U_IS_UNICODE_NONCHAR(c))) {
+ *pi=i;
+ return c;
}
/* no default branch to optimize switch() - all values are covered */
}
+ } else {
+ /* too few bytes left */
+ count=length-i;
+ }
- /*
- * All the error handling should return a value
- * that needs count bytes so that UTF8_GET_CHAR_SAFE() works right.
- *
- * Starting with Unicode 3.0.1, non-shortest forms are illegal.
- * Starting with Unicode 3.2, surrogate code points must not be
- * encoded in UTF-8, and there are no irregular sequences any more.
- *
- * U8_ macros (new in ICU 2.4) return negative values for error conditions.
- */
-
- /* correct sequence - all trail bytes have (b7..b6)==(10)? */
- /* illegal is also set if count>=4 */
- if(illegal || (c)0 && U8_IS_TRAIL(s[i])) {
- ++(i);
- --count;
- }
- if(strict>=0) {
- c=utf8_errorValue[errorCount-count];
- } else {
- c=U_SENTINEL;
- }
- } else if((strict)>0 && U_IS_UNICODE_NONCHAR(c)) {
- /* strict: forbid non-characters like U+fffe */
- c=utf8_errorValue[count];
- }
- } else /* too few bytes left */ {
- /* error handling */
- int32_t i0=i;
- /* don't just set (i)=(length) in case there is an illegal sequence */
- while((i)<(length) && U8_IS_TRAIL(s[i])) {
- ++(i);
- }
- if(strict>=0) {
- c=utf8_errorValue[i-i0];
- } else {
- c=U_SENTINEL;
- }
+ /* error handling */
+ i=*pi;
+ while(count>0 && U8_IS_TRAIL(s[i])) {
+ ++i;
+ --count;
}
+ c=errorValue(i-*pi, strict);
*pi=i;
return c;
}
@@ -251,18 +231,15 @@ utf8_prevCharSafeBody(const uint8_t *s,
int32_t i=*pi;
uint8_t b, count=1, shift=6;
+ if(!U8_IS_TRAIL(c)) { return errorValue(0, strict); }
+
/* extract value bits from the last trail byte */
c&=0x3f;
for(;;) {
if(i<=start) {
/* no lead byte at all */
- if(strict>=0) {
- return UTF8_ERROR_VALUE_1;
- } else {
- return U_SENTINEL;
- }
- /*break;*/
+ return errorValue(0, strict);
}
/* read another previous byte */
@@ -282,11 +259,7 @@ utf8_prevCharSafeBody(const uint8_t *s,
if(count>=4) {
count=3;
}
- if(strict>=0) {
- c=utf8_errorValue[count];
- } else {
- c=U_SENTINEL;
- }
+ c=errorValue(count, strict);
} else {
/* exit with correct c */
}
@@ -296,17 +269,9 @@ utf8_prevCharSafeBody(const uint8_t *s,
include the trail byte that we started with */
if(count=0) {
- c=utf8_errorValue[count];
- } else {
- c=U_SENTINEL;
- }
+ c=errorValue(count, strict);
} else {
- if(strict>=0) {
- c=UTF8_ERROR_VALUE_1;
- } else {
- c=U_SENTINEL;
- }
+ c=errorValue(0, strict);
}
}
break;
@@ -317,20 +282,12 @@ utf8_prevCharSafeBody(const uint8_t *s,
shift+=6;
} else {
/* more than 5 trail bytes is illegal */
- if(strict>=0) {
- c=UTF8_ERROR_VALUE_1;
- } else {
- c=U_SENTINEL;
- }
+ c=errorValue(0, strict);
break;
}
} else {
/* single-byte character precedes trailing bytes */
- if(strict>=0) {
- c=UTF8_ERROR_VALUE_1;
- } else {
- c=U_SENTINEL;
- }
+ c=errorValue(0, strict);
break;
}
}
diff --git a/intl/icu/source/common/utrie2.cpp b/intl/icu/source/common/utrie2.cpp
--- a/intl/icu/source/common/utrie2.cpp
+++ b/intl/icu/source/common/utrie2.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -733,12 +733,4 @@ uint16_t ForwardUTrie2StringIterator::ne
return result;
}
-UTrie2 *UTrie2Singleton::getInstance(InstantiatorFn *instantiator, const void *context,
- UErrorCode &errorCode) {
- void *duplicate;
- UTrie2 *instance=(UTrie2 *)singleton.getInstance(instantiator, context, duplicate, errorCode);
- utrie2_close((UTrie2 *)duplicate);
- return instance;
-}
-
U_NAMESPACE_END
diff --git a/intl/icu/source/common/utrie2.h b/intl/icu/source/common/utrie2.h
--- a/intl/icu/source/common/utrie2.h
+++ b/intl/icu/source/common/utrie2.h
@@ -1,7 +1,7 @@
/*
******************************************************************************
*
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@@ -659,19 +659,6 @@ public:
const UChar *limit;
};
-class UTrie2Singleton {
-public:
- UTrie2Singleton(SimpleSingleton &s) : singleton(s) {}
- void deleteInstance() {
- utrie2_close((UTrie2 *)singleton.fInstance);
- singleton.reset();
- }
- UTrie2 *getInstance(InstantiatorFn *instantiator, const void *context,
- UErrorCode &errorCode);
-private:
- SimpleSingleton &singleton;
-};
-
U_NAMESPACE_END
#endif
diff --git a/intl/icu/source/common/uts46.cpp b/intl/icu/source/common/uts46.cpp
--- a/intl/icu/source/common/uts46.cpp
+++ b/intl/icu/source/common/uts46.cpp
@@ -109,8 +109,6 @@ IDNA::nameToUnicodeUTF8(const StringPiec
}
}
-UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION(IDNA)
-
// UTS46 class declaration ------------------------------------------------- ***
class UTS46 : public IDNA {
diff --git a/intl/icu/source/common/uvector.cpp b/intl/icu/source/common/uvector.cpp
--- a/intl/icu/source/common/uvector.cpp
+++ b/intl/icu/source/common/uvector.cpp
@@ -1,7 +1,7 @@
/*
******************************************************************************
-* Copyright (C) 1999-2011, International Business Machines Corporation and *
-* others. All Rights Reserved. *
+* Copyright (C) 1999-2013, International Business Machines Corporation and
+* others. All Rights Reserved.
******************************************************************************
* Date Name Description
* 10/22/99 alan Creation.
@@ -552,12 +552,12 @@ void UVector::sort(UElementComparator *c
/**
- * Sort with a user supplied comparator of type UComparator.
+ * Stable sort with a user supplied comparator of type UComparator.
*/
void UVector::sortWithUComparator(UComparator *compare, const void *context, UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
- compare, context, FALSE, &ec);
+ compare, context, TRUE, &ec);
}
}
diff --git a/intl/icu/source/common/uvector.h b/intl/icu/source/common/uvector.h
--- a/intl/icu/source/common/uvector.h
+++ b/intl/icu/source/common/uvector.h
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 1999-2011, International Business Machines
+* Copyright (C) 1999-2013, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
@@ -243,9 +243,9 @@ public:
void sort(UElementComparator *compare, UErrorCode &ec);
/**
- * Sort the contents of this vector using a caller-supplied function
+ * Stable sort the contents of this vector using a caller-supplied function
* of type UComparator to do the comparison. Provides more flexibility
- * than uvector::sort() because an additional user-parameter can be passed to
+ * than UVector::sort() because an additional user parameter can be passed to
* the comparison function.
*/
void sortWithUComparator(UComparator *compare, const void *context, UErrorCode &ec);
diff --git a/intl/icu/source/common/wintz.c b/intl/icu/source/common/wintz.c
--- a/intl/icu/source/common/wintz.c
+++ b/intl/icu/source/common/wintz.c
@@ -1,6 +1,6 @@
/*
********************************************************************************
-* Copyright (C) 2005-2012, International Business Machines
+* Copyright (C) 2005-2013, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@@ -254,7 +254,6 @@ uprv_detectWindowsTimeZone() {
char apiStdName[MAX_LENGTH_ID];
char regStdName[MAX_LENGTH_ID];
char tmpid[MAX_LENGTH_ID];
- int32_t apiStdLength = 0;
int32_t len;
int id;
int errorCode;
@@ -280,8 +279,8 @@ uprv_detectWindowsTimeZone() {
/* Convert the wchar_t* standard name to char* */
uprv_memset(apiStdName, 0, sizeof(apiStdName));
- u_strFromWCS(apiStd, MAX_LENGTH_ID, &apiStdLength, apiTZI.StandardName, -1, &status);
- u_austrncpy(apiStdName, apiStd, apiStdLength);
+ u_strFromWCS(apiStd, MAX_LENGTH_ID, NULL, apiTZI.StandardName, -1, &status);
+ u_austrncpy(apiStdName, apiStd, sizeof(apiStdName) - 1);
tmpid[0] = 0;
diff --git a/intl/icu/source/config.guess b/intl/icu/source/config.guess
--- a/intl/icu/source/config.guess
+++ b/intl/icu/source/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-02-10'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -801,6 +820,9 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -852,21 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -950,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1201,6 +1227,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1227,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1256,7 +1287,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1361,6 @@ EOF
exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <.
@@ -26,11 +20,12 @@ timestamp='2012-02-10'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to . Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to Print commands to invoke an ICU program named (ex: genrb)"
+ echo " --invoke= Print commands to invoke an ICU program named (ex: genrb)"
echo " --ldflags Print -L search path and -l libraries to link with ICU [LDFLAGS]. This is for the data, uc (common), and i18n libraries only. "
echo " --ldflags-layout Print ICU layout engine link directive. Use in addition to --ldflags"
echo " --ldflags-libsonly Same as --ldflags, but only the -l directives"
@@ -85,10 +85,13 @@ usage()
echo "Usage:"
allflags
- echo
+ echo
echo " [Brackets] show MAKE variable equivalents, (parenthesis) show example output"
echo
- echo "Copyright (c) 2002, International Business Machines Corporation and others. All Rights Reserved."
+ echo "Copyright (c) 2002-2013, International Business Machines Corporation and others. All Rights Reserved."
+ echo
+ echo "NOTE: Please consider using the pkg-config (.pc) files instead of icu-config."
+ echo " See: "
}
## Check the sanity of current variables
@@ -125,7 +128,7 @@ case "$1" in
;;
esac
-case "$1" in
+case "$1" in
*prefix*)
IGNORE_ICUUC_FILE_CHECK="yes"
;;
@@ -139,7 +142,7 @@ loaddefs
if [ $# -gt 0 -a $1 = "--selfcheck" ];
then
echo "passed"
- exit
+ exit
# EXIT for self check
fi
@@ -156,12 +159,12 @@ do
--debug)
set -x
;;
-
+
--noverify)
echo "### $ME: Error: --noverify must be the first argument." 1>&2
exit 1
;;
-
+
--so)
echo $SO
;;
@@ -194,8 +197,8 @@ do
QUOT="\""
CMD="${var}"
- # If it's not a locally executable command (1st choice) then
- # search for it in the ICU directories.
+ # If it's not a locally executable command (1st choice) then
+ # search for it in the ICU directories.
if [ ! -x ${CMD} ]; then
if [ -x ${bindir}/${var} ]; then
CMD="${bindir}/${var}"
@@ -216,11 +219,11 @@ do
--cflags)
echo $ECHO_N "${CFLAGS} ${ECHO_C}"
;;
-
+
--cc)
echo $ECHO_N "${CC} ${ECHO_C}"
;;
-
+
--cxx)
echo $ECHO_N "${CXX} ${ECHO_C}"
;;
@@ -338,7 +341,7 @@ do
--icudata-install-dir)
echo $ECHO_N "${ICUPKGDATA_DIR} ${ECHO_C}"
;;
-
+
--icudatadir)
echo $ECHO_N "${ICUDATA_DIR} ${ECHO_C}"
;;
@@ -358,7 +361,7 @@ do
--unicode-version)
echo $ECHO_N $UNICODE_VERSION
;;
-
+
--host)
echo $host
exit 0
@@ -393,7 +396,7 @@ do
;;
esac
shift
-
+
# Reset the ignore icuuc file check flag
if [ $IGNORE_ICUUC_FILE_CHECK = "yes" ]; then
IGNORE_ICUUC_FILE_CHECK="no"
@@ -406,4 +409,3 @@ sanity
## END of icu-config-bottom
exit 0
-
diff --git a/intl/icu/source/config/icu-config-top b/intl/icu/source/config/icu-config-top
--- a/intl/icu/source/config/icu-config-top
+++ b/intl/icu/source/config/icu-config-top
@@ -3,12 +3,14 @@
#set -x
# BEGIN of icu-config-top
#******************************************************************************
-# Copyright (C) 1999-2004, International Business Machines
+# Copyright (C) 1999-2013, International Business Machines
# Corporation and others. All Rights Reserved.
#******************************************************************************
# This script is designed to aid configuration of ICU.
# rpath links a library search path right into the binaries.
-
+#
+# Note: it's preferred to use the .pc files rather than icu-config.
+#
### END of icu-config-top
diff --git a/intl/icu/source/config/icu.pc.in b/intl/icu/source/config/icu.pc.in
--- a/intl/icu/source/config/icu.pc.in
+++ b/intl/icu/source/config/icu.pc.in
@@ -1,5 +1,11 @@
-# Copyright (C) 2010, International Business Machines Corporation. All Rights Reserved.
+# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
+# CFLAGS contains only anything end users should set
+CFLAGS = @UCONFIG_CFLAGS@
+# CXXFLAGS contains only anything end users should set
+CXXFLAGS = @UCONFIG_CXXFLAGS@
+# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
+DEFS = @UCONFIG_CPPFLAGS@
prefix = @prefix@
exec_prefix = @exec_prefix@
#bindir = @bindir@
@@ -11,9 +17,6 @@ baselibs = @LIBS@
#sbindir = @sbindir@
#mandir = @mandir@
#sysconfdir = @sysconfdir@
-CFLAGS = @CFLAGS@
-#CXXFLAGS = @CXXFLAGS@
-DEFS = @DEFS@
UNICODE_VERSION=@UNICODE_VERSION@
ICUPREFIX=icu
ICULIBSUFFIX=@ICULIBSUFFIX@
diff --git a/intl/icu/source/config/mh-bsd-gcc b/intl/icu/source/config/mh-bsd-gcc
--- a/intl/icu/source/config/mh-bsd-gcc
+++ b/intl/icu/source/config/mh-bsd-gcc
@@ -1,6 +1,6 @@
## -*-makefile-*-
## BSD-specific setup (FreeBSD, OpenBSD, NetBSD, *BSD)
-## Copyright (c) 1999-2009, International Business Machines Corporation and
+## Copyright (c) 1999-2013, International Business Machines Corporation and
## others. All Rights Reserved.
## Commands to generate dependency files
@@ -64,7 +64,7 @@ STATIC_O = ao
$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
## Bind internal references
-
+
# LDflags that pkgdata will use
BIR_LDFLAGS= -Wl,-Bsymbolic
@@ -77,3 +77,4 @@ STATIC_PREFIX =
## End BSD-specific setup
+
diff --git a/intl/icu/source/config/mh-cygwin-msvc b/intl/icu/source/config/mh-cygwin-msvc
--- a/intl/icu/source/config/mh-cygwin-msvc
+++ b/intl/icu/source/config/mh-cygwin-msvc
@@ -1,5 +1,5 @@
## Cygwin with Microsoft Visual C++ compiler specific setup
-## Copyright (c) 2001-2012, International Business Machines Corporation and
+## Copyright (c) 2001-2013, International Business Machines Corporation and
## others. All Rights Reserved.
# We install sbin tools into the same bin directory because
@@ -125,7 +125,7 @@ LDFLAGSICUTOOLUTIL= /base:"0x4ac00000"#
# The #M# is used to delete lines for icu-config
# Current full path directory.
-CURR_FULL_DIR=$(subst \,/,$(shell cygpath -da .))#M# -m isn't used because it doesn't work on Win98
+CURR_FULL_DIR?=$(subst \,/,$(shell cygpath -da .))#M# -m isn't used because it doesn't work on Win98
# Current full path directory for use in source code in a -D compiler option.
CURR_SRCCODE_FULL_DIR=$(subst \,\\,$(shell cygpath -da .))#M#
diff --git a/intl/icu/source/config/mh-darwin b/intl/icu/source/config/mh-darwin
--- a/intl/icu/source/config/mh-darwin
+++ b/intl/icu/source/config/mh-darwin
@@ -28,7 +28,11 @@ SHLIB.c= $(CC) -dynamiclib -dynamic $(CF
SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
## Compiler switches to embed a library name and version information
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET))
+ifeq ($(ENABLE_RPATH),YES)
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
+else
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
+endif
## Compiler switch to embed a runtime search path
LD_RPATH=
diff --git a/intl/icu/source/config/mh-linux b/intl/icu/source/config/mh-linux
--- a/intl/icu/source/config/mh-linux
+++ b/intl/icu/source/config/mh-linux
@@ -1,11 +1,11 @@
## -*-makefile-*-
## Linux-specific setup
-## Copyright (c) 1999-2012, International Business Machines Corporation and
+## Copyright (c) 1999-2013, International Business Machines Corporation and
## others. All Rights Reserved.
## Commands to generate dependency files
GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
-GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
+GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
## Flags for position independent code
SHAREDLIBCFLAGS = -fPIC
diff --git a/intl/icu/source/config/mh-mingw b/intl/icu/source/config/mh-mingw
--- a/intl/icu/source/config/mh-mingw
+++ b/intl/icu/source/config/mh-mingw
@@ -1,10 +1,13 @@
## -*-makefile-*-
## Cygwin/MinGW specific setup
-## Copyright (c) 2001-2012, International Business Machines Corporation and
+## Copyright (c) 2001-2013, International Business Machines Corporation and
## others. All Rights Reserved.
# TODO: Finish the rest of this port. This platform port is incomplete.
+# This file is similar to mh-mingw64
+# Any changes made here may also need to be made in mh-mingw64
+
# We install sbin tools into the same bin directory because
# pkgdata needs some of the tools in sbin, and we can't always depend on
# icu-config working on Windows.
@@ -63,11 +66,11 @@ SO_TARGET_VERSION_SUFFIX =
endif
# Static library prefix and file extension
-LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
A = a
## An import library is needed for z/OS and MSVC
-IMPORT_LIB_EXT = .lib
+IMPORT_LIB_EXT = .dll.a
LIBPREFIX=
@@ -80,7 +83,7 @@ LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICU
# The #M# is used to delete lines for icu-config
# Current full path directory.
#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS
-CURR_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
+CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
# Current full path directory for use in source code in a -D compiler option.
#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS
CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
diff --git a/intl/icu/source/config/mh-mingw64 b/intl/icu/source/config/mh-mingw64
new file mode 100644
--- /dev/null
+++ b/intl/icu/source/config/mh-mingw64
@@ -0,0 +1,146 @@
+## -*-makefile-*-
+## Cygwin64/MinGW64 specific setup
+## Copyright (c) 2012-2013, International Business Machines Corporation and
+## others. All Rights Reserved.
+
+# TODO: Finish the rest of this port. This platform port is incomplete.
+
+# This file is similar to mh-mingw
+# Any changes made here may also need to be made in mh-mingw
+
+# We install sbin tools into the same bin directory because
+# pkgdata needs some of the tools in sbin, and we can't always depend on
+# icu-config working on Windows.
+sbindir=$(bindir)
+
+## Commands to generate dependency files
+GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
+GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
+
+## Flags to create/use a static library
+ifneq ($(ENABLE_SHARED),YES)
+## Make sure that the static libraries can be built and used
+CPPFLAGS += -DU_STATIC_IMPLEMENTATION
+else
+## Make sure that the static libraries can be built
+STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
+endif
+
+## Flags for position independent code
+SHAREDLIBCFLAGS =
+SHAREDLIBCXXFLAGS =
+SHAREDLIBCPPFLAGS = -DPIC
+
+## Additional flags when building libraries and with threads
+THREADSCFLAGS = -mthreads
+THREADSCXXFLAGS = -mthreads
+LIBCPPFLAGS =
+
+# Commands to link. Link with C++ in case static libraries are used.
+LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
+#LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
+
+## Shared library options
+LD_SOOPTIONS= -Wl,-Bsymbolic
+
+## Commands to make a shared library
+SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#
+SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) -Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir $(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#
+
+## Compiler switch to embed a runtime search path
+LD_RPATH=
+LD_RPATH_PRE= -Wl,-rpath,
+
+## Compiler switch to embed a library name
+LD_SONAME =
+
+## Shared object suffix
+SO = dll
+## Non-shared intermediate object suffix
+STATIC_O = ao
+
+ifeq ($(ENABLE_SHARED),YES)
+SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
+else
+SO_TARGET_VERSION_SUFFIX =
+endif
+
+# Static library prefix and file extension
+LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+A = a
+
+## An import library is needed for z/OS and MSVC
+IMPORT_LIB_EXT = .dll.a
+
+LIBPREFIX=
+
+# Change the stubnames so that poorly working FAT disks and installation programs can work.
+# This is also for backwards compatibility.
+DATA_STUBNAME = dt
+I18N_STUBNAME = in
+LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+
+# The #M# is used to delete lines for icu-config
+# Current full path directory.
+#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS
+CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
+# Current full path directory for use in source code in a -D compiler option.
+#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS
+CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
+
+## Compilation rules
+%.$(STATIC_O): $(srcdir)/%.c
+ $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
+%.o: $(srcdir)/%.c
+ $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -o $@ $<
+
+%.$(STATIC_O): $(srcdir)/%.cpp
+ $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -o $@ $<
+%.o: $(srcdir)/%.cpp
+ $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -o $@ $<
+
+
+## Dependency rules
+%.d: $(srcdir)/%.c
+ @echo "generating dependency information for $<"
+ @echo -n "$@ " > $@
+ @$(GEN_DEPS.c) $< >> $@ || (rm -f $@ && FALSE)
+
+%.d: $(srcdir)/%.cpp
+ @echo "generating dependency information for $<"
+ @echo -n "$@ " > $@
+ @$(GEN_DEPS.cc) $< >> $@ || (rm -f $@ && FALSE)
+
+## Versioned target for a shared library.
+## Since symbolic links don't work the same way on Windows,
+## we only use the version major number.
+#FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
+FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
+MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
+
+FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename $(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
+IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#
+MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#
+
+## Special pkgdata information that is needed
+PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
+#ICUPKGDATA_INSTALL_DIR = $(shell cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
+#ICUPKGDATA_INSTALL_LIBDIR = $(shell cygpath -dma $(DESTDIR)$(libdir))#M#
+
+## Versioned libraries rules
+#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
+# $(RM) $@ && cp ${ $@
-# @echo -n "generating dependency information for "
-# @echo -n "$@ $(basename $<).o : " > $@
-# @$(SHELL) -ec '$(GEN_DEPS.c) $< \
-# | grep "#line 1 " | grep -v \\\\ | cut -d " " -f 3 \
-# | /usr/bin/sort -u | sed s/\"$$/\\\\/ | sed s/^\"/\ / >> $@ \
-# || (rm -f $@ && echo $@ && false)'
-
-%.d : $(srcdir)/%.cpp
- @echo "generating dependency information for $<"
- @$(GEN_DEPS.cc) $< > $@
-# @echo -n "generating dependency information for "
-# @echo -n "$@ $(basename $<).o : " > $@
-# @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
-# | grep "#line 1 " | grep -v \\\\ | cut -d " " -f 3 \
-# | /usr/bin/sort -u | sed s/\"$$/\\\\/ | sed s/^\"/\ / >> $@ \
-# || (rm -f $@ && echo $@ && false)'
-
-## Compile a Windows resource file
-%.res : $(srcdir)/%.rc
- rc.exe -fo$@ $(CPPFLAGS) $<
-
-## Versioned target for a shared library.
-FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
-MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
-
-## Starting in MSVC 2005, manifest files are required. This reduces the obnoxiousness of this feature.
- POST_SO_BUILD_STEP = @([ -e $<.manifest ] && \
- ( echo Embedding manifest into $< && mt.exe -nologo -manifest $<.manifest -outputresource:"$<;2" && rm -rf $<.manifest )) \
- || true
- POST_BUILD_STEP = @([ -e $@.manifest ] && \
- ( echo Embedding manifest into $@ && mt.exe -nologo -manifest $@.manifest -outputresource:"$@;1" && rm -rf $@.manifest )) \
- || true
-
-## Special pkgdata information that is needed
-PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
-ICUPKGDATA_INSTALL_DIR = $(shell mkdir -p $(DESTDIR)$(ICUPKGDATA_DIR) ; echo $(DESTDIR)$(ICUPKGDATA_DIR))#M#
-ICUPKGDATA_INSTALL_LIBDIR = $(shell mkdir -p $(DESTDIR)$(libdir) ; echo $(DESTDIR)$(libdir))#M#
-
-## Versioned import library names. The library names are versioned,
-## but the import libraries do not need versioning.
-IMPORT_LIB = $(basename $(SO_TARGET))$(IMPORT_LIB_EXT)#M#
-MIDDLE_IMPORT_LIB = $(IMPORT_LIB)#M#
-FINAL_IMPORT_LIB = $(MIDDLE_IMPORT_LIB)#M#
-
-# The following is for Makefile.inc's use.
-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
-
-## Versioned libraries rules
-#%$(SO_TARGET_VERSION_MAJOR).$(SO): %$(SO_TARGET_VERSION).$(SO)
-# $(RM) $@ && cp ${&5
@@ -4064,18 +4082,25 @@ fi
then
if test "$GCC" = yes
then
- # 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
- CFLAGS="$CFLAGS -Wall -std=c99 -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+ case "${host}" in
+ *-*-solaris*)
+ # Don't use -std=c99 option on Solaris/GCC
+ ;;
+ *)
+ # 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
+ CFLAGS="$CFLAGS -std=c99"
+ ;;
+ esac
+
+ CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
else
case "${host}" in
*-*-cygwin)
if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
then
CFLAGS="$CFLAGS /W4"
- fi ;;
- *-*-mingw32)
- CFLAGS="$CFLAGS -W4" ;;
+ fi
esac
fi
if test "$GXX" = yes
@@ -4087,9 +4112,7 @@ fi
if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
then
CXXFLAGS="$CXXFLAGS /W4"
- fi ;;
- *-*-mingw32)
- CXXFLAGS="$CXXFLAGS -W4" ;;
+ fi
esac
fi
fi
@@ -4850,7 +4873,7 @@ powerpc*-*-linux*)
icu_cv_host_frag=mh-linux-va
fi ;;
*-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-linux ;;
-*-*-cygwin|*-*-mingw32)
+*-*-cygwin|*-*-mingw32|*-*-mingw64)
if test "$GCC" = yes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4867,16 +4890,32 @@ main ()
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef __MINGW64__
+#error This is not MinGW64
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ icu_cv_host_frag=mh-mingw64
+else
icu_cv_host_frag=mh-mingw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
icu_cv_host_frag=mh-cygwin
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- case "${host}" in
- *-*-mingw32) icu_cv_host_frag=mh-msys-msvc ;;
- *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;;
- esac
+ icu_cv_host_frag=mh-cygwin-msvc
fi ;;
*-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;;
*-*-aix*)
@@ -5118,7 +5157,7 @@ fi
MSVC_RELEASE_FLAG=""
if test $enabled = yes
then
- if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc
+ if test $icu_cv_host_frag = mh-cygwin-msvc
then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5396,6 +5435,22 @@ fi
$as_echo "$enabled" >&6; }
+# check if elf.h is present.
+for ac_header in elf.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
+if test "x$ac_cv_header_elf_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ELF_H 1
+_ACEOF
+
+fi
+
+done
+
+if test "x$ac_cv_header_elf_h" = "xyes"; then
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
+fi
U_ENABLE_DYLOAD=1
enable=yes
@@ -5576,6 +5631,43 @@ else
as_fn_error $? "C++ compiler $CXX does not work or no compiler found" "$LINENO" 5
fi
+if [ "$GXX" = yes ]; then
+ # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
+ # and check that the compiler still works.
+ if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS="$CXXFLAGS --std=c++0x"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++11 compiler" >&5
+$as_echo_n "checking if we have a C++11 compiler... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ cxx11_okay=yes
+else
+ cxx11_okay=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx11_okay" >&5
+$as_echo "$cxx11_okay" >&6; }
+ if [ $cxx11_okay = yes ]; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CXXFLAGS option --std=c++0x" >&5
+$as_echo "$as_me: Adding CXXFLAGS option --std=c++0x" >&6;}
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x"
+ else
+ CXXFLAGS="$OLD_CXXFLAGS"
+ fi
+ fi
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include works" >&5
$as_echo_n "checking if #include works... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5605,6 +5697,39 @@ else
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if #include works" >&5
+$as_echo_n "checking if #include works... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ac_cv_header_atomic=yes
+else
+ ac_cv_header_atomic=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_atomic" >&5
+$as_echo "$ac_cv_header_atomic" >&6; }
+if test $ac_cv_header_atomic = yes
+then
+ U_HAVE_ATOMIC=1
+else
+ U_HAVE_ATOMIC=0
+fi
+# Make this available via CPPFLAGS
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5828,7 +5953,9 @@ fi
CXXFLAGS="${CXXFLAGS} -mt"
if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then
CXXFLAGS="${OLD_CXXFLAGS}"
- fi
+ else
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt"
+ fi
;;
esac
;;
@@ -6922,6 +7049,7 @@ rm -f core conftest.err conftest.$ac_obj
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
else
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -qutf"
CHECK_UTF16_STRING_RESULT="-qutf"
fi
fi
@@ -6954,7 +7082,8 @@ rm -f core conftest.err conftest.$ac_obj
CXXFLAGS="${OLD_CXXFLAGS}"
else
CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort"
-
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -xustr=ascii_utf16_ushort"
+ UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -xustr=ascii_utf16_ushort"
# Since we can't detect the availability of this UTF-16 syntax at compile time,
# we depend on configure telling us that we can use it.
# Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
@@ -7004,15 +7133,14 @@ else
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$CC_UTF16_STRING" = 1; then
+ UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99"
CHECK_UTF16_STRING_RESULT="C only";
else
CFLAGS="${OLD_CFLAGS}"
fi
fi
if test "$GXX" = yes; then
- OLD_CXXFLAGS="${CXXFLAGS}"
# -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
- CXXFLAGS="${CXXFLAGS} -std=c++11"
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7050,8 +7178,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
else
CHECK_UTF16_STRING_RESULT="C++ only";
fi
- else
- CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
fi
@@ -7113,6 +7239,25 @@ else
LAYOUT_TRUE='#'
fi
+# Enable/disable tools
+# Check whether --enable-tools was given.
+if test "${enable_tools+set}" = set; then :
+ enableval=$enable_tools; case "${enableval}" in
+ yes) tools=true ;;
+ no) tools=false ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-tools" "$LINENO" 5 ;;
+ esac
+else
+ tools=true
+fi
+
+
+if test "$tools" = true; then
+ TOOLS_TRUE=
+else
+ TOOLS_TRUE='#'
+fi
+
# Check whether --with-data-packaging was given.
if test "${with_data_packaging+set}" = set; then :
@@ -7297,9 +7442,21 @@ fi
# Now that we're done using CPPFLAGS etc. for tests, we can change it
# for build.
+if test "${CC}" == "clang"; then
+ CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+else
+ CLANGCFLAGS=""
+fi
+
+if test "${CXX}" == "clang++"; then
+ CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+else
+ CLANGCXXFLAGS=""
+fi
+
CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
-CFLAGS="$CFLAGS \$(THREADSCFLAGS)"
-CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)"
+CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS"
+CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS"
@@ -7313,7 +7470,7 @@ echo "CXXFLAGS=$CXXFLAGS"
# output the Makefiles
-ac_config_files="$ac_config_files icudefs.mk Makefile data/pkgdataMakefile config/Makefile.inc config/icu.pc config/pkgdataMakefile data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layout/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/uconv/pkgdataMakefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/gendict/Makefile tools/gentest/Makefile tools/gennorm2/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icuinfo/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile tools/gencfu/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdataMakefile test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/collperf/Makefile test/perf/dicttrieperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/DateFmtPerf/Makefile test/perf/howExpensiveIs/Makefile test/perf/strsrchperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile test/perf/utrie2perf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile"
+ac_config_files="$ac_config_files icudefs.mk Makefile data/pkgdataMakefile config/Makefile.inc config/icu.pc config/pkgdataMakefile data/Makefile stubdata/Makefile common/Makefile i18n/Makefile layout/Makefile layoutex/Makefile io/Makefile extra/Makefile extra/uconv/Makefile extra/uconv/pkgdataMakefile extra/scrptrun/Makefile tools/Makefile tools/ctestfw/Makefile tools/toolutil/Makefile tools/makeconv/Makefile tools/genrb/Makefile tools/genccode/Makefile tools/gencmn/Makefile tools/gencnval/Makefile tools/gendict/Makefile tools/gentest/Makefile tools/gennorm2/Makefile tools/genbrk/Makefile tools/gensprep/Makefile tools/icuinfo/Makefile tools/icupkg/Makefile tools/icuswap/Makefile tools/pkgdata/Makefile tools/tzcode/Makefile tools/gencfu/Makefile test/Makefile test/compat/Makefile test/testdata/Makefile test/testdata/pkgdataMakefile test/hdrtst/Makefile test/intltest/Makefile test/cintltst/Makefile test/iotest/Makefile test/letest/Makefile test/perf/Makefile test/perf/collationperf/Makefile test/perf/collperf/Makefile test/perf/dicttrieperf/Makefile test/perf/ubrkperf/Makefile test/perf/charperf/Makefile test/perf/convperf/Makefile test/perf/normperf/Makefile test/perf/DateFmtPerf/Makefile test/perf/howExpensiveIs/Makefile test/perf/strsrchperf/Makefile test/perf/unisetperf/Makefile test/perf/usetperf/Makefile test/perf/ustrperf/Makefile test/perf/utfperf/Makefile test/perf/utrie2perf/Makefile test/perf/leperf/Makefile samples/Makefile samples/date/Makefile samples/cal/Makefile samples/layout/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -8095,6 +8252,7 @@ do
"test/perf/ustrperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/ustrperf/Makefile" ;;
"test/perf/utfperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utfperf/Makefile" ;;
"test/perf/utrie2perf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/utrie2perf/Makefile" ;;
+ "test/perf/leperf/Makefile") CONFIG_FILES="$CONFIG_FILES test/perf/leperf/Makefile" ;;
"samples/Makefile") CONFIG_FILES="$CONFIG_FILES samples/Makefile" ;;
"samples/date/Makefile") CONFIG_FILES="$CONFIG_FILES samples/date/Makefile" ;;
"samples/cal/Makefile") CONFIG_FILES="$CONFIG_FILES samples/cal/Makefile" ;;
@@ -8583,6 +8741,7 @@ else
$as_echo "too old or test failed - try upgrading GNU Make" >&6; }
fi
+
if test -n "$UCONFIG_CPPFLAGS"; then
HDRFILE="uconfig.h.prepend"
echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:"
@@ -8620,4 +8779,19 @@ if test -n "$UCONFIG_CPPFLAGS"; then
echo '--------------- end ' "${HDRFILE}"
fi
+
+if test -n "$UCONFIG_CFLAGS"; then
+ echo "C apps may want to build with CFLAGS = ${UCONFIG_CFLAGS}"
+fi
+
+if test -n "$UCONFIG_CXXFLAGS"; then
+ echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}"
+fi
+
+if test "$tools" = false;
+then
+ echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests."
+ echo "## Expect build failures in the 'data', 'test', and other directories."
+fi
+
$as_unset _CXX_CXXSUFFIX
diff --git a/intl/icu/source/configure.ac b/intl/icu/source/configure.ac
new file mode 100644
--- /dev/null
+++ b/intl/icu/source/configure.ac
@@ -0,0 +1,1425 @@
+# -*-autoconf-*-
+AC_COPYRIGHT([ Copyright (c) 1999-2013, International Business Machines Corporation and others. All Rights Reserved. ])
+# configure.in for ICU
+# Stephen F. Booth, heavily modified by Yves and others
+
+# Check for autoconf version
+AC_PREREQ(2.68)
+
+# Process this file with autoconf to produce a configure script
+AC_INIT([ICU])
+
+#TODO: IcuBug:8502
+#AC_INIT([ICU],
+# m4_esyscmd_s([sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"),
+# [http://icu-project.org/bugs],
+# [International Components for Unicode],
+# [http://icu-project.org])
+
+AC_CONFIG_SRCDIR([common/unicode/utypes.h])
+
+PACKAGE="icu"
+AC_SUBST(PACKAGE)
+
+# Use custom echo test for newline option
+# Current autoconf (2.65) gives incorrect echo newline option
+# for icu-config
+# This may be removed later - mow (June 17, 2010)
+ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T=
+case `/bin/sh -c "echo -n x"` in
+-n*)
+ case `/bin/sh -c "echo 'x\c'"` in
+ *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ICU_ECHO_C='\c';;
+ esac;;
+*)
+ ICU_ECHO_N='-n';;
+esac
+AC_SUBST(ICU_ECHO_N)
+AC_SUBST(ICU_ECHO_C)
+AC_SUBST(ICU_ECHO_T)
+
+AC_MSG_CHECKING(for ICU version numbers)
+
+# Get the ICU version from uversion.h or other headers
+geticuversion() {
+ [sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
+}
+getuversion() {
+ [sed -n 's/^[ ]*#[ ]*define[ ]*U_UNICODE_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
+}
+VERSION=`geticuversion $srcdir/common/unicode/uvernum.h`
+if test x"$VERSION" = x; then
+ as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5
+fi
+
+#TODO: IcuBug:8502
+#if test "$VERSION" != "$PACKAGE_VERSION"; then
+# AC_MSG_ERROR([configure was generated for $PACKAGE_VERSION but uvernum.h has $VERSION - please rerun autoconf])
+#fi
+
+UNICODE_VERSION=`getuversion $srcdir/common/unicode/uchar.h`
+if test x"$UNICODE_VERSION" = x; then
+ AC_MSG_ERROR([Cannot determine Unicode version number from uchar.h header file])
+fi
+# Compute a reasonable library version from the release version. This is
+# very bad, but that's wanted... We want to make sure that the LIB_VERSION
+# has at least a dot in it, so we'll add a .0 if needed.
+#[LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'`]
+LIB_VERSION=$VERSION
+LIB_VERSION_MAJOR=`echo $LIB_VERSION | sed 's/\..*//'`
+AC_SUBST(VERSION)
+AC_SUBST(LIB_VERSION)
+AC_SUBST(LIB_VERSION_MAJOR)
+AC_MSG_RESULT([release $VERSION, library $LIB_VERSION, unicode version $UNICODE_VERSION])
+
+AC_SUBST(UNICODE_VERSION)
+
+# Determine the host system
+AC_CANONICAL_HOST
+
+AC_SUBST(CPPFLAGS)
+
+# This variable is needed on z/OS because the C++ compiler only recognizes .C
+_CXX_CXXSUFFIX=cpp
+export _CXX_CXXSUFFIX
+
+# Accumulate #defines
+
+# CONFIG_CPPFLAGS: These are defines that are set for ICU Build time only.
+# They are only needed for building ICU itself. Example: platform stuff
+CONFIG_CPPFLAGS=""
+# UCONFIG_CPPFLAGS: These are defines which are set for ICU build time,
+# and also a notice is output that they need to be set
+# for end-users of ICU also. uconfig.h.prepend is generated
+# with, for example, "#define U_DISABLE_RENAMING 1"
+# Example: ICU configuration stuff
+UCONFIG_CPPFLAGS=""
+# UCONFIG_CFLAGS: contains a copy of anything that needs to be set by end users
+# such as -std
+UCONFIG_CFLAGS=""
+
+# Check whether to build debug libraries
+AC_MSG_CHECKING([whether to build debug libraries])
+enabled=no
+ENABLE_DEBUG=0
+AC_ARG_ENABLE(debug,
+ [ --enable-debug build debug libraries and enable the U_DEBUG define [default=no]],
+ [ case "${enableval}" in
+ yes|"") enabled=yes; ENABLE_DEBUG=1; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEBUG=1" ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(ENABLE_DEBUG)
+
+# Check whether to build release libraries
+AC_MSG_CHECKING([whether to build release libraries])
+enabled=yes
+ENABLE_RELEASE=1
+AC_ARG_ENABLE(release,
+ [ --enable-release build release libraries [default=yes]],
+ [ case "${enableval}" in
+ no) enabled=no; ENABLE_RELEASE=0 ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(ENABLE_RELEASE)
+
+# Don't use the default C/CXXFLags
+: ${CFLAGS=""}
+: ${CXXFLAGS=""}
+
+# Checks for compilers
+AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc])
+# Make sure that we try clang++ first, which provides C++11 support.
+# The g++ compiler is less likely to support C++11.
+AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
+
+# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
+# The release mode use is the default one for autoconf
+if test "$GCC" = yes; then
+ if test "$CFLAGS" = ""; then
+ if test "$ENABLE_DEBUG" = 1; then
+ CFLAGS=-g
+ fi
+ if test "$ENABLE_RELEASE" = 1; then
+ CFLAGS="$CFLAGS -O2"
+ fi
+ fi
+ if test "$CXXFLAGS" = ""; then
+ if test "$ENABLE_DEBUG" = 1; then
+ CXXFLAGS=-g
+ fi
+ if test "$ENABLE_RELEASE" = 1; then
+ CXXFLAGS="$CXXFLAGS -O2"
+ fi
+ fi
+fi
+
+AC_PROG_CPP
+
+AC_PROG_INSTALL
+
+AC_SUBST(cross_compiling)
+
+dnl use the pld hack to get ac_fn_cxx_try_link defined globally and not local
+AC_LANG_PUSH([C++])
+AC_LINK_IFELSE([AC_LANG_PROGRAM()])
+AC_LANG_POP([C++])
+
+# make sure install is relative to srcdir - if a script
+if test "$srcdir" = "."; then
+ # If srcdir isn't just ., then (srcdir) is already prepended.
+ if test "${ac_install_sh}" = "${INSTALL}"; then
+ INSTALL="\\\$(top_srcdir)/${ac_install_sh}"
+ fi
+fi
+
+#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
+#AC_CHECK_PROG(STRIP, strip, strip, true)
+
+# Check for the platform make
+AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
+AC_SUBST(U_MAKE)
+
+
+AC_ARG_WITH(cross-build,
+ [ --with-cross-build=dir specify an absolute path to the build directory of an ICU built for the current platform [default=no cross dir]],
+ [cross_buildroot="${withval}"],
+ [cross_buildroot=""])
+
+if test "X$cross_buildroot" = "X"; then
+ if test "$cross_compiling" = "yes"; then
+ AC_MSG_ERROR([Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root])
+ dnl '
+ fi
+else
+ if test -f "${cross_buildroot}/config/icucross.mk"; then
+ AC_MSG_RESULT([Using cross buildroot: $cross_buildroot])
+ else
+ if test -d "${cross_buildroot}"; then
+ AC_MSG_ERROR([${cross_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_buildroot} first.])
+ else
+ AC_MSG_ERROR([No such directory ${cross_buildroot} supplied as the argument to --with-cross-build. Use an absolute path.])
+ fi
+ fi
+fi
+AC_SUBST(cross_buildroot)
+
+# Check for doxygen to generate documentation
+AC_PATH_PROG(DOXYGEN,doxygen,,$PATH:/usr/local/bin:/usr/bin)
+
+# Check that the linker is usable
+ICU_PROG_LINK
+
+# Determine the executable suffix
+# We don't use AC_EXEEXT because some compilers output separate debugging
+# files, which confuses the AC_EXEEXT macro.
+AC_MSG_CHECKING(checking for executable suffix)
+case "${host}" in
+ *-*-cygwin*|*-*-mingw*) EXEEXT=.exe ;;
+ *) EXEEXT="" ;;
+esac
+ac_exeext=$EXEEXT
+AC_MSG_RESULT($EXEEXT)
+AC_SUBST(EXEEXT)
+
+# Determine how strict we want to be when compiling
+AC_CHECK_STRICT_COMPILE
+
+# Check if we can build and use 64-bit libraries
+AC_CHECK_64BIT_LIBS
+AC_SUBST(ARFLAGS)
+AC_SUBST(COMPILE_LINK_ENVVAR)
+
+# Determine the Makefile fragment
+ICU_CHECK_MH_FRAG
+
+# Checks for libraries and other host specific stuff
+# On HP/UX, don't link to -lm from a shared lib because it isn't
+# PIC (at least on 10.2)
+case "${host}" in
+ *-*-hpux*) AC_CHECK_LIB(m, floor, LIB_M="-lm") ;;
+
+ *) AC_CHECK_LIB(m, floor)
+ LIB_M="" ;;
+esac
+AC_SUBST(LIB_M)
+
+# Check whether to build shared libraries
+AC_MSG_CHECKING([whether to build shared libraries])
+enabled=no
+AC_ARG_ENABLE(shared,
+ [ --enable-shared build shared libraries [default=yes]],
+ [ case "${enableval}" in
+ yes|"") enabled=yes; ENABLE_SHARED=YES ;;
+ no);;
+ *) ;;
+ esac],
+ [enabled=yes; ENABLE_SHARED=YES]
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(ENABLE_SHARED)
+
+# Check whether to build static libraries
+AC_MSG_CHECKING([whether to build static libraries])
+enabled=no
+AC_ARG_ENABLE(static,
+ [ --enable-static build static libraries [default=no]],
+ [ case "${enableval}" in
+ yes|"") enabled=yes; ENABLE_STATIC=YES ;;
+ no) ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(ENABLE_STATIC)
+
+# When building release static library, there might be some optimization flags we can use
+if test "$ENABLE_STATIC" = "YES"; then
+ if test "$ENABLE_SHARED" != "YES"; then
+ if test "$ENABLE_RELEASE" = 1; then
+ AC_MSG_CHECKING([whether we can use static library optimization option])
+ CHECK_STATIC_OPT_FLAG=no
+
+ OLD_CPPFLAGS="${CPPFLAGS}"
+ OLD_LDFLAGS="${LDFLAGS}"
+
+ case "${host}" in
+ *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
+ if test "$GCC" = yes; then
+ CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
+ LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [CHECK_STATIC_OPT_FLAG=yes], [CHECK_STATIC_OPT_FLAG=no])
+ AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG)
+ if test "$CHECK_STATIC_OPT_FLAG" = no; then
+ CPPFLAGS="${OLD_CPPFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+ fi
+ fi
+ fi
+fi
+
+
+# Check whether to enable auto cleanup of libraries
+AC_MSG_CHECKING([whether to enable auto cleanup of libraries])
+enabled=no
+UCLN_NO_AUTO_CLEANUP=1
+AC_ARG_ENABLE(auto-cleanup,
+ [ --enable-auto-cleanup enable auto cleanup of libraries [default=no]],
+ [ case "${enableval}" in
+ yes) enabled=yes;
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0";
+ UCLN_NO_AUTO_CLEANUP=0
+ ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(UCLN_NO_AUTO_CLEANUP)
+
+# MSVC floating-point option
+MSVC_RELEASE_FLAG=""
+if test $enabled = yes
+then
+ if test $icu_cv_host_frag = mh-cygwin-msvc
+ then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #if defined _MSC_VER && _MSC_VER >= 1400
+ #else
+ Microsoft Visual C++ < 2005
+ #endif
+ ]], [[]])],[MSVC_RELEASE_FLAG="/fp:precise"],[MSVC_RELEASE_FLAG="/Op"])
+
+ CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}"
+ CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}"
+ fi
+fi
+
+# Check whether to enabled draft APIs
+AC_MSG_CHECKING([whether to enable draft APIs])
+enabled=yes
+U_DEFAULT_SHOW_DRAFT=1
+AC_ARG_ENABLE(draft,
+ [ --enable-draft enable draft APIs (and internal APIs) [default=yes]],
+ [ case "${enableval}" in
+ no) enabled=no; U_DEFAULT_SHOW_DRAFT=0;
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0"
+ ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+# Make sure that we can use draft API in ICU.
+if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
+fi
+AC_SUBST(U_DEFAULT_SHOW_DRAFT)
+
+AC_PROG_RANLIB
+
+# look for 'ar' the proper way
+AC_CHECK_TOOL(AR, ar, false)
+
+AC_MSG_CHECKING([whether to enable renaming of symbols])
+enabled=yes
+U_DISABLE_RENAMING=0
+AC_ARG_ENABLE(renaming,
+ [ --enable-renaming add a version suffix to symbols [default=yes]],
+ [ case "${enableval}" in
+ yes|"") enabled=yes ;;
+ no) enabled=no; U_DISABLE_RENAMING=1;
+ UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1"
+ ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(U_DISABLE_RENAMING)
+
+AC_MSG_CHECKING([whether to enable function and data tracing])
+enabled=no
+U_ENABLE_TRACING=0
+AC_ARG_ENABLE(tracing,
+ [ --enable-tracing enable function and data tracing [default=no]],
+ [ case "${enableval}" in
+ yes|"") enabled=yes;
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1";
+ U_ENABLE_TRACING=1 ;;
+ no) enabled=no; U_ENABLE_TRACING=0 ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(U_ENABLE_TRACING)
+
+# check if elf.h is present.
+AC_CHECK_HEADERS([elf.h])
+if test "x$ac_cv_header_elf_h" = "xyes"; then
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_HAVE_ELF_H=1";
+fi
+
+U_ENABLE_DYLOAD=1
+enable=yes
+AC_MSG_CHECKING([whether to enable dynamic loading of plugins])
+AC_ARG_ENABLE(dyload,
+ [ --disable-dyload disable dynamic loading [default=no]],
+ [ case "${enableval}" in
+ yes|"")
+ U_ENABLE_DYLOAD=1
+ enable=yes
+ ;;
+ no)
+ U_ENABLE_DYLOAD=0;
+ enable=no;
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0";
+ ;;
+ *) ;;
+ esac],
+)
+AC_MSG_RESULT($enable)
+AC_SUBST(U_ENABLE_DYLOAD)
+
+if test "$enable" = "yes"; then
+ AC_CHECK_HEADERS([dlfcn.h])
+ #AC_MSG_RESULT($enabled)
+ AC_SEARCH_LIBS([dlopen], [dl])
+ AC_CHECK_FUNCS([dlopen])
+
+ if test "x$ac_cv_func_dlopen" != xyes; then
+ CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0"
+ fi
+fi
+
+# Check for miscellanous functions.
+# So, use for putil / tools only.
+# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
+AC_CHECK_FUNCS([gettimeofday])
+
+
+# Check whether to use the evil rpath or not
+AC_ARG_ENABLE(rpath,
+ [ --enable-rpath use rpath when linking [default is only if necessary]],
+ [ case "${enableval}" in
+ yes|"") ENABLE_RPATH=YES ;;
+ no) ;;
+ *) ;;
+ esac],
+ [ENABLE_RPATH=NO]
+)
+AC_SUBST(ENABLE_RPATH)
+
+
+
+AC_LANG_PUSH([C++])
+AC_MSG_CHECKING([[if we have a C++ compiler]])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no])
+if test $cxx_okay = yes
+then
+ AC_MSG_RESULT([[Good]])
+else
+ AC_MSG_RESULT([[no]])
+ AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]])
+fi
+
+if [[ "$GXX" = yes ]]; then
+ # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
+ # and check that the compiler still works.
+ if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS="$CXXFLAGS --std=c++0x"
+ AC_MSG_CHECKING([[if we have a C++11 compiler]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
+ AC_MSG_RESULT($cxx11_okay)
+ if [[ $cxx11_okay = yes ]]; then
+ AC_MSG_NOTICE([Adding CXXFLAGS option --std=c++0x])
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x"
+ else
+ CXXFLAGS="$OLD_CXXFLAGS"
+ fi
+ fi
+fi
+
+AC_MSG_CHECKING([[if #include works]])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
+AC_MSG_RESULT($ac_cv_header_stdstring)
+if test $ac_cv_header_stdstring = yes
+then
+ U_HAVE_STD_STRING=1
+else
+ U_HAVE_STD_STRING=0
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
+fi
+AC_SUBST(U_HAVE_STD_STRING)
+
+
+AC_MSG_CHECKING([[if #include works]])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [ac_cv_header_atomic=yes], [ac_cv_header_atomic=no])
+AC_MSG_RESULT($ac_cv_header_atomic)
+if test $ac_cv_header_atomic = yes
+then
+ U_HAVE_ATOMIC=1
+else
+ U_HAVE_ATOMIC=0
+fi
+# Make this available via CPPFLAGS
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
+AC_SUBST(U_HAVE_ATOMIC)
+
+AC_LANG_POP([C++])
+
+# Always build ICU with multi-threading support.
+threads=true
+ICU_USE_THREADS=1
+OLD_LIBS=${LIBS}
+
+if test $threads = true; then
+ # For Compaq Tru64 (OSF1), we must look for pthread_attr_init
+ # and must do this before seaching for pthread_mutex_destroy, or
+ # we will pick up libpthreads.so not libpthread.so
+ # If this fails, then we must test for HPUX specials, before
+ # moving on to a more generic test
+
+ AC_CHECK_LIB(pthread, pthread_attr_init)
+ if test $ac_cv_lib_pthread_pthread_attr_init = yes; then
+ ICU_USE_THREADS=1
+ else
+ # Locate the right library for POSIX threads. We look for the
+ # symbols in the libraries first, because on Solaris libc provides
+ # pthread_create but libpthread has the real code :(
+ # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread
+ # FreeBSD users may need libpthread if they do not have libc_r.
+
+ AC_SEARCH_LIBS_FIRST(pthread_mutex_destroy, pthread pthreads c_r )
+
+ if test "$ac_cv_search_pthread_mutex_destroy" != no; then
+ ICU_USE_THREADS=1
+ else
+ # For HP 11
+ AC_CHECK_LIB(pthread, pthread_mutex_init)
+ if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
+ ICU_USE_THREADS=1
+ fi
+ fi
+
+ AC_CHECK_FUNC(pthread_mutex_lock)
+
+ if test $ac_cv_func_pthread_mutex_lock = yes; then
+ ICU_USE_THREADS=1
+ fi
+ fi
+ # Check to see if we are using CygWin with MSVC
+ case "${host}" in
+ *-pc-cygwin*|*-pc-mingw*)
+ # For gcc, the thread options are set by mh-mingw/mh-cygwin
+ # For msvc, the thread options are set by runConfigureICU
+ ICU_USE_THREADS=1
+ ;;
+ *-*-hpux*)
+ # Add -mt because it does several nice things on newer compilers.
+ case "${icu_cv_host_frag}" in
+ mh-hpux-acc)
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS="${CXXFLAGS} -mt"
+ if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ else
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -mt"
+ fi
+ ;;
+ esac
+ ;;
+ *-*-solaris*)
+ case "${icu_cv_host_frag}" in
+ mh-solaris)
+ LIBS="${LIBS} -mt"
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+AC_ARG_ENABLE(weak-threads,
+ [ --enable-weak-threads weakly reference the threading library [default=no]],
+ [case "${enableval}" in
+ yes)
+ LIB_THREAD="${LIBS%${OLD_LIBS}}"
+ LIBS=${OLD_LIBS}
+ ;;
+ no) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-weak-threads) ;;
+ esac])
+AC_SUBST(LIB_THREAD)
+
+# Check for mmap()
+
+# The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific.
+# Do this check instead.
+HAVE_MMAP=0
+AC_MSG_CHECKING([for mmap])
+AC_CACHE_VAL(ac_cv_func_mmap_ok,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include
+#include
+#include
+#include ], [mmap((void *)0, 0, PROT_READ, 0, 0, 0);])],[ac_cv_func_mmap_ok=yes],[ac_cv_func_mmap_ok=no])] )
+AC_MSG_RESULT($ac_cv_func_mmap_ok)
+if test $ac_cv_func_mmap_ok = yes
+then
+ HAVE_MMAP=1
+else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0"
+fi
+AC_SUBST(HAVE_MMAP)
+
+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)
+ if test "$GCC" = yes; then
+ # We're using gcc, and the simple -a gcc command line works for genccode
+ GENCCODE_ASSEMBLY="-a gcc"
+ fi ;;
+i*86-*-solaris*)
+ if test "$GCC" = yes; then
+ # When using gcc, look if we're also using GNU as.
+ # When using GNU as, the simple -a gcc command line works for genccode.
+ asv=`"${CC}" -print-prog-name=as 2>/dev/null`
+ asv=`"${asv}" --version 2>/dev/null`
+ case "X${asv}" in
+ X*GNU*) GENCCODE_ASSEMBLY="-a gcc" ;;
+ X*) GENCCODE_ASSEMBLY="-a sun-x86" ;;
+ esac
+ unset asv
+ else
+ GENCCODE_ASSEMBLY="-a sun-x86"
+ fi ;;
+sparc-*-solaris*)
+ GENCCODE_ASSEMBLY="-a sun"
+ ;;
+ia64-*-hpux*)
+ GENCCODE_ASSEMBLY="-a aCC-ia64"
+ ;;
+esac
+AC_SUBST(GENCCODE_ASSEMBLY)
+
+AC_MSG_RESULT($GENCCODE_ASSEMBLY)
+
+# Checks for header files
+AC_CHECK_HEADERS(inttypes.h)
+if test $ac_cv_header_inttypes_h = no; then
+ U_HAVE_INTTYPES_H=0
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
+else
+ U_HAVE_INTTYPES_H=1
+fi
+if test "$CC" = ccc; then
+ AC_MSG_RESULT("C compiler set to CCC ${CC}" )
+ case "${host}" in
+ alpha*-*-*) U_HAVE_INTTYPES_H=0;
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
+ esac
+fi
+
+AC_SUBST(U_HAVE_INTTYPES_H)
+
+AC_CHECK_HEADERS(dirent.h)
+if test $ac_cv_header_dirent_h = no; then
+ U_HAVE_DIRENT_H=0
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0"
+else
+ U_HAVE_DIRENT_H=1
+fi
+
+AC_SUBST(U_HAVE_DIRENT_H)
+
+# Check for endianness
+AC_C_BIGENDIAN()
+if test $ac_cv_c_bigendian = no; then
+U_IS_BIG_ENDIAN=0
+U_ENDIAN_CHAR="l"
+else
+U_IS_BIG_ENDIAN=1
+U_ENDIAN_CHAR="b"
+fi
+AC_SUBST(U_IS_BIG_ENDIAN)
+
+# Do various POSIX related checks
+U_HAVE_NL_LANGINFO_CODESET=0
+U_NL_LANGINFO_CODESET=-1
+AC_CHECK_FUNC(nl_langinfo,[U_HAVE_NL_LANGINFO=1],[U_HAVE_NL_LANGINFO=0])
+dnl AC_SUBST(U_HAVE_NL_LANGINFO)
+if test $U_HAVE_NL_LANGINFO -eq 1; then
+ AC_CACHE_CHECK([for nl_langinfo's argument to obtain the codeset],
+ ac_cv_nl_langinfo_codeset,
+ [ac_cv_nl_langinfo_codeset="unknown"
+ for a in CODESET _NL_CTYPE_CODESET_NAME; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[nl_langinfo($a);]])],[ac_cv_nl_langinfo_codeset="$a"; break],[])]
+ done)
+ if test x$ac_cv_nl_langinfo_codeset != xunknown
+ then
+ U_HAVE_NL_LANGINFO_CODESET=1
+ U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
+ if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET"
+ then
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}"
+ fi
+ else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0"
+ fi
+fi
+AC_SUBST(U_HAVE_NL_LANGINFO_CODESET)
+AC_SUBST(U_NL_LANGINFO_CODESET)
+
+# Namespace support checks
+AC_LANG(C++)
+AC_MSG_CHECKING([for namespace support])
+AC_CACHE_VAL(ac_cv_namespace_ok,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace x_version {void f(){}}
+ namespace x = x_version;
+ using namespace x_version;
+ ], [f();])],[ac_cv_namespace_ok=yes],[ac_cv_namespace_ok=no])] )
+AC_MSG_RESULT($ac_cv_namespace_ok)
+if test $ac_cv_namespace_ok = no
+then
+ AC_MSG_ERROR(Namespace support is required to build ICU.)
+fi
+
+AC_MSG_CHECKING([for properly overriding new and delete])
+U_OVERRIDE_CXX_ALLOCATION=0
+U_HAVE_PLACEMENT_NEW=0
+AC_CACHE_VAL(ac_cv_override_cxx_allocation_ok,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include
+ class UMemory {
+ public:
+ void *operator new(size_t size) {return malloc(size);}
+ void *operator new[](size_t size) {return malloc(size);}
+ void operator delete(void *p) {free(p);}
+ void operator delete[](void *p) {free(p);}
+ };
+ ]], [])],[ac_cv_override_cxx_allocation_ok=yes],[ac_cv_override_cxx_allocation_ok=no])] )
+AC_MSG_RESULT($ac_cv_override_cxx_allocation_ok)
+if test $ac_cv_override_cxx_allocation_ok = yes
+then
+ U_OVERRIDE_CXX_ALLOCATION=1
+ AC_MSG_CHECKING([for placement new and delete])
+ AC_CACHE_VAL(ac_cv_override_placement_new_ok,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include
+ class UMemory {
+ public:
+ void *operator new(size_t size) {return malloc(size);}
+ void *operator new[](size_t size) {return malloc(size);}
+ void operator delete(void *p) {free(p);}
+ void operator delete[](void *p) {free(p);}
+ void * operator new(size_t, void *ptr) { return ptr; }
+ void operator delete(void *, void *) {}
+ };
+ ]], [])],[ac_cv_override_placement_new_ok=yes],[ac_cv_override_placement_new_ok=no])] )
+ AC_MSG_RESULT($ac_cv_override_placement_new_ok)
+ if test $ac_cv_override_placement_new_ok = yes
+ then
+ U_HAVE_PLACEMENT_NEW=1
+ else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0"
+ fi
+else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0"
+fi
+AC_SUBST(U_OVERRIDE_CXX_ALLOCATION)
+AC_SUBST(U_HAVE_PLACEMENT_NEW)
+
+AC_LANG(C)
+AC_CHECK_FUNC(popen)
+if test x$ac_cv_func_popen = xyes
+then
+ U_HAVE_POPEN=1
+else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0"
+ U_HAVE_POPEN=0
+fi
+AC_SUBST(U_HAVE_POPEN)
+
+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
+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
+#include
+#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
+ #include
+ 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)
+
+AC_CACHE_CHECK(for timezone,ac_cv_var_timezone,
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifndef __USE_POSIX
+#define __USE_POSIX
+#endif
+#ifndef __USE_XOPEN
+#define __USE_XOPEN
+#endif
+#include
+], [[timezone = 1;]])],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no])])
+U_HAVE_TIMEZONE=0
+if test $ac_cv_var_timezone = yes; then
+ U_TIMEZONE=timezone
+ U_HAVE_TIMEZONE=1
+else
+ AC_CACHE_CHECK(for __timezone,ac_cv_var___timezone,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[__timezone = 1;]])],[ac_cv_var___timezone=yes],[ac_cv_var___timezone=no])])
+ if test $ac_cv_var___timezone = yes; then
+ U_TIMEZONE=__timezone
+ U_HAVE_TIMEZONE=1
+ else
+ AC_CACHE_CHECK(for _timezone,ac_cv_var__timezone,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[_timezone = 1;]])],[ac_cv_var__timezone=yes],[ac_cv_var__timezone=no])])
+ if test $ac_cv_var__timezone = yes; then
+ U_TIMEZONE=_timezone
+ U_HAVE_TIMEZONE=1
+ else
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
+ fi
+ fi
+fi
+AC_SUBST(U_HAVE_TIMEZONE)
+AC_SUBST(U_TIMEZONE)
+
+# Checks for typedefs
+AC_CHECK_TYPE(int8_t,signed char)
+AC_CHECK_TYPE(uint8_t,unsigned char)
+AC_CHECK_TYPE(int16_t,signed short)
+AC_CHECK_TYPE(uint16_t,unsigned short)
+AC_CHECK_TYPE(int32_t,signed long)
+AC_CHECK_TYPE(uint32_t,unsigned long)
+AC_CHECK_TYPE(int64_t,signed long long)
+AC_CHECK_TYPE(uint64_t,unsigned long long)
+
+if test $ac_cv_type_int8_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0"
+fi
+
+if test $ac_cv_type_uint8_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0"
+fi
+
+if test $ac_cv_type_int16_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0"
+fi
+
+if test $ac_cv_type_uint16_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0"
+fi
+
+if test $ac_cv_type_int32_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0"
+fi
+
+if test $ac_cv_type_uint32_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0"
+fi
+
+if test $ac_cv_type_int64_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0"
+fi
+
+if test $ac_cv_type_uint64_t = no; then
+CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0"
+fi
+
+# Do various wchar_t related checks
+AC_CHECK_HEADER(wchar.h)
+if test "$ac_cv_header_wchar_h" = no
+then
+ U_HAVE_WCHAR_H=0
+ U_HAVE_WCSCPY=0
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0"
+else
+ AC_DEFINE([HAVE_WCHAR_H], [1], [wchar.h was found.])
+ U_HAVE_WCHAR_H=1
+ # Some broken systems have wchar.h but not some of its functions...
+ AC_SEARCH_LIBS(wcscpy, wcs w)
+ if test "$ac_cv_search_wcscpy" != no; then
+ U_HAVE_WCSCPY=1
+ else
+ U_HAVE_WCSCPY=0
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0"
+ fi
+fi
+AC_SUBST(U_HAVE_WCHAR_H)
+AC_SUBST(U_HAVE_WCSCPY)
+
+AC_CHECK_SIZEOF([wchar_t], 0, [
+#if STDC_HEADERS
+#include
+#endif
+#include
+#if HAVE_WCHAR_H
+#include
+#include
+#endif])
+U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
+# We do this check to verify that everything is okay.
+if test $U_SIZEOF_WCHAR_T = 0; then
+ if test $U_HAVE_WCHAR_H=1; then
+ AC_MSG_ERROR(There is wchar.h but the size of wchar_t is 0)
+ fi
+fi
+
+AC_MSG_CHECKING([for UTF-16 string literal support])
+U_CHECK_UTF16_STRING=1
+CHECK_UTF16_STRING_RESULT="unknown"
+
+case "${host}" in
+*-*-aix*|powerpc64-*-linux*)
+ if test "$GCC" = no; then
+ OLD_CFLAGS="${CFLAGS}"
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ CFLAGS="${CFLAGS} -qutf"
+ CXXFLAGS="${CXXFLAGS} -qutf"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = u"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
+ if test "$U_CHECK_UTF16_STRING" = 0; then
+ CFLAGS="${OLD_CFLAGS}"
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ else
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -qutf"
+ CHECK_UTF16_STRING_RESULT="-qutf"
+ fi
+ fi
+ ;;
+*-*-solaris*)
+ if test "$GCC" = no; then
+ OLD_CFLAGS="${CFLAGS}"
+ OLD_CXXFLAGS="${CXXFLAGS}"
+ CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
+ CXXFLAGS="${CXXFLAGS} -xustr=ascii_utf16_ushort"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = U"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
+ if test "$U_CHECK_UTF16_STRING" = 0; then
+ CFLAGS="${OLD_CFLAGS}"
+ CXXFLAGS="${OLD_CXXFLAGS}"
+ else
+ CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort"
+ UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -xustr=ascii_utf16_ushort"
+ UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -xustr=ascii_utf16_ushort"
+ # Since we can't detect the availability of this UTF-16 syntax at compile time,
+ # we depend on configure telling us that we can use it.
+ # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
+ # we only use this macro within ICU.
+ # If an ICU user uses icu-config, this feature will be enabled.
+ CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
+ U_CHECK_UTF16_STRING=0
+ fi
+ fi
+ ;;
+*-*-hpux*)
+ if test "$GCC" = no; then
+ # The option will be detected at compile time without additional compiler options.
+ CHECK_UTF16_STRING_RESULT="available"
+ fi
+ ;;
+*-*-cygwin)
+ # wchar_t can be used
+ CHECK_UTF16_STRING_RESULT="available"
+ ;;
+*)
+ ;;
+esac
+
+# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
+if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
+ if test "$GCC" = yes; then
+ OLD_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} -std=gnu99"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+static const char16_t test[] = u"This is a UTF16 literal string.";
+ ]], [[]])],[CC_UTF16_STRING=1],[CC_UTF16_STRING=0])
+ if test "$CC_UTF16_STRING" = 1; then
+ UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99"
+ CHECK_UTF16_STRING_RESULT="C only";
+ else
+ CFLAGS="${OLD_CFLAGS}"
+ fi
+ fi
+ if test "$GXX" = yes; then
+ # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+static const char16_t test[] = u"This is a UTF16 literal string.";
+ ]], [[]])],[CXX_UTF16_STRING=1],[CXX_UTF16_STRING=0])
+ AC_LANG_POP([C++])
+ if test "$CXX_UTF16_STRING" = 1; then
+ if test "$CC_UTF16_STRING" = 1; then
+ CHECK_UTF16_STRING_RESULT="available";
+ else
+ CHECK_UTF16_STRING_RESULT="C++ only";
+ fi
+ fi
+ fi
+fi
+AC_MSG_RESULT($CHECK_UTF16_STRING_RESULT)
+
+# Enable/disable extras
+AC_ARG_ENABLE(extras,
+ [ --enable-extras build ICU extras [default=yes]],
+ [case "${enableval}" in
+ yes) extras=true ;;
+ no) extras=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-extras) ;;
+ esac],
+ extras=true)
+ICU_CONDITIONAL(EXTRAS, test "$extras" = true)
+AC_ARG_ENABLE(icuio,
+ [ --enable-icuio build ICU's icuio library [default=yes]],
+ [case "${enableval}" in
+ yes) icuio=true ;;
+ no) icuio=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-icuio) ;;
+ esac],
+ icuio=true)
+ICU_CONDITIONAL(ICUIO, test "$icuio" = true)
+
+# Enable/disable layout
+AC_ARG_ENABLE(layout,
+ [ --enable-layout build ICU's layout library [default=yes]],
+ [case "${enableval}" in
+ yes) layout=true ;;
+ no) layout=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;;
+ esac],
+ layout=true)
+ICU_CONDITIONAL(LAYOUT, test "$layout" = true)
+
+# Enable/disable tools
+AC_ARG_ENABLE(tools,
+ [ --enable-tools build ICU's tools [default=yes]],
+ [case "${enableval}" in
+ yes) tools=true ;;
+ no) tools=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;;
+ esac],
+ tools=true)
+ICU_CONDITIONAL(TOOLS, test "$tools" = true)
+
+AC_ARG_WITH(data-packaging,
+ [ --with-data-packaging=type specify how to package ICU data (files, archive, library, static, auto) [default=auto]],
+ [case "${withval}" in
+ files|archive|library) datapackaging=$withval ;;
+ auto) datapackaging=$withval ;;
+ common) datapackaging=archive ;;
+ dll) datapackaging=library ;;
+ static) datapackaging=static ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --with-data-packaging) ;;
+ esac],
+ [datapackaging=])
+
+# Note: 'thesysconfdir' is an evaluated version, for Man pages, so also for thedatadir, thelibdir, etc..
+# thesysconfdir=`eval echo $sysconfdir`
+dnl# AC_SUBST(thesysconfdir)
+dnl# thelibdir=`test "x$exec_prefix" = xNONE && exec_prefix="$prefix"; eval echo $libdir`
+dnl# AC_SUBST(thelibdir)
+thedatadir=`eval echo $datadir`
+dnl# AC_SUBST(thedatadir)
+# Always put raw data files in share/icu/{version}, etc. Never use lib/icu/{version} for data files.. Actual shared libraries will go in {libdir}.
+pkgicudatadir=$datadir
+thepkgicudatadir=$thedatadir
+AC_SUBST(pkgicudatadir)
+AC_SUBST(thepkgicudatadir)
+
+dnl# Shouldn't need the AC_SUBST
+
+if test x"$datapackaging" = x -o x"$datapackaging" = xauto; then
+ # default to library
+ datapackaging=library
+ if test "$ENABLE_STATIC" = "YES"; then
+ if test "$ENABLE_SHARED" != "YES"; then
+ datapackaging=static
+ fi
+ fi
+fi
+
+datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
+
+datapackaging_msg="(No explaination for mode $datapackaging.)"
+
+datapackaging_msg_path="ICU will look in $datapackaging_dir which is the installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override."
+datapackaging_msg_set="ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override."
+datapackaging_howfound="(unknown)"
+
+case "$datapackaging" in
+ files)
+ DATA_PACKAGING_MODE=files
+ datapackaging_msg="ICU data will be stored in individual files."
+ datapackaging_howfound="$datapackaging_msg_path"
+ ;;
+ archive)
+ DATA_PACKAGING_MODE=common
+ datapackaging_msg="ICU data will be stored in a single .dat file."
+ datapackaging_howfound="$datapackaging_msg_path"
+ ;;
+ library)
+ DATA_PACKAGING_MODE=dll
+ datapackaging_msg="ICU data will be linked with ICU."
+ if test "$ENABLE_STATIC" = "YES"; then
+ datapackaging_msg="$datapackaging_msg A static data library will be built. "
+ fi
+ if test "$ENABLE_SHARED" = "YES"; then
+ datapackaging_msg="$datapackaging_msg A shared data library will be built. "
+ fi
+ datapackaging_howfound="$datapackaging_msg_set"
+ ;;
+ static)
+ DATA_PACKAGING_MODE=static
+ datapackaging_msg="ICU data will be stored in a static library."
+ datapackaging_howfound="$datapackaging_msg_set"
+ ;;
+esac
+AC_SUBST(DATA_PACKAGING_MODE)
+
+# Sets a library suffix
+AC_MSG_CHECKING([for a library suffix to use])
+AC_ARG_WITH(library-suffix,
+ [ --with-library-suffix=suffix tag a suffix to the library names [default=]],
+ [ICULIBSUFFIX="${withval}"],
+ [ICULIBSUFFIX=])
+msg=$ICULIBSUFFIX
+if test "$msg" = ""; then
+ msg=none
+fi
+AC_MSG_RESULT($msg)
+AC_SUBST(ICULIBSUFFIX)
+if test "$ICULIBSUFFIX" != ""
+then
+ U_HAVE_LIB_SUFFIX=1
+ ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
+ UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
+else
+ U_HAVE_LIB_SUFFIX=0
+fi
+AC_SUBST(U_HAVE_LIB_SUFFIX)
+AC_SUBST(ICULIBSUFFIXCNAME)
+
+# Enable/disable tests
+AC_ARG_ENABLE(tests,
+ [ --enable-tests build ICU tests [default=yes]],
+ [case "${enableval}" in
+ yes) tests=true ;;
+ no) tests=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
+ esac],
+ tests=true)
+ICU_CONDITIONAL(TESTS, test "$tests" = true)
+
+# Enable/disable samples
+AC_ARG_ENABLE(samples,
+ [ --enable-samples build ICU samples [default=yes]
+
+Additionally, the variable FORCE_LIBS may be set before calling configure.
+If set, it will REPLACE any automatic list of libraries.],
+ [case "${enableval}" in
+ yes) samples=true ;;
+ no) samples=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-samples) ;;
+ esac],
+ samples=true)
+ICU_CONDITIONAL(SAMPLES, test "$samples" = true)
+
+ICUDATA_CHAR=$U_ENDIAN_CHAR
+
+# Platform-specific Makefile setup
+# set ICUDATA_CHAR to 'e' for any EBCDIC (which should be big endian) platform.
+case "${host}" in
+ *-*-solaris*) platform=U_SOLARIS ;;
+ *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) platform=U_LINUX ;;
+ *-*-*bsd*|*-*-dragonfly*) platform=U_BSD ;;
+ *-*-aix*) platform=U_AIX ;;
+ *-*-hpux*) platform=U_HPUX ;;
+ *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;;
+ *-*-cygwin*) platform=U_CYGWIN ;;
+ *-*-mingw*) platform=U_MINGW ;;
+ *-*ibm-openedition*|*-*-os390*) platform=OS390
+ if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
+ ICUDATA_CHAR="e"
+ fi ;;
+ *-*-os400*) platform=OS400
+ if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
+ ICUDATA_CHAR="e"
+ fi ;;
+ *-*-nto*) platform=U_QNX ;;
+ *-dec-osf*) platform=U_OSF ;;
+ *-*-beos) platform=U_BEOS ;;
+ *-*-irix*) platform=U_IRIX ;;
+ *-ncr-*) platform=U_MPRAS ;;
+ *) platform=U_UNKNOWN_PLATFORM ;;
+esac
+AC_SUBST(ICUDATA_CHAR)
+AC_SUBST(platform)
+platform_make_fragment_name="$icu_cv_host_frag"
+platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name"
+AC_SUBST(platform_make_fragment_name)
+AC_SUBST(platform_make_fragment)
+
+if test "${FORCE_LIBS}" != ""; then
+ echo " *** Overriding automatically chosen [LIBS=$LIBS], using instead [FORCE_LIBS=${FORCE_LIBS}]" 1>&6
+ LIBS=${FORCE_LIBS}
+fi
+
+# Now that we're done using CPPFLAGS etc. for tests, we can change it
+# for build.
+
+if test "${CC}" == "clang"; then
+ CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+else
+ CLANGCFLAGS=""
+fi
+
+if test "${CXX}" == "clang++"; then
+ CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+else
+ CLANGCXXFLAGS=""
+fi
+
+CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
+CFLAGS="$CFLAGS \$(THREADSCFLAGS) $CLANGCFLAGS"
+CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS) $CLANGCXXFLAGS"
+
+AC_SUBST(LIBCFLAGS)
+AC_SUBST(LIBCXXFLAGS)
+
+# append all config cppflags
+CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS $UCONFIG_CPPFLAGS"
+
+echo "CPPFLAGS=$CPPFLAGS"
+echo "CFLAGS=$CFLAGS"
+echo "CXXFLAGS=$CXXFLAGS"
+
+
+# output the Makefiles
+AC_CONFIG_FILES([icudefs.mk \
+ Makefile \
+ data/pkgdataMakefile \
+ config/Makefile.inc \
+ config/icu.pc \
+ config/pkgdataMakefile \
+ data/Makefile \
+ stubdata/Makefile \
+ common/Makefile \
+ i18n/Makefile \
+ layout/Makefile \
+ layoutex/Makefile \
+ io/Makefile \
+ extra/Makefile \
+ extra/uconv/Makefile \
+ extra/uconv/pkgdataMakefile \
+ extra/scrptrun/Makefile \
+ tools/Makefile \
+ tools/ctestfw/Makefile \
+ tools/toolutil/Makefile \
+ tools/makeconv/Makefile \
+ tools/genrb/Makefile \
+ tools/genccode/Makefile \
+ tools/gencmn/Makefile \
+ tools/gencnval/Makefile \
+ tools/gendict/Makefile \
+ tools/gentest/Makefile \
+ tools/gennorm2/Makefile \
+ tools/genbrk/Makefile \
+ tools/gensprep/Makefile \
+ tools/icuinfo/Makefile \
+ tools/icupkg/Makefile \
+ tools/icuswap/Makefile \
+ tools/pkgdata/Makefile \
+ tools/tzcode/Makefile \
+ tools/gencfu/Makefile \
+ test/Makefile \
+ test/compat/Makefile \
+ test/testdata/Makefile \
+ test/testdata/pkgdataMakefile \
+ test/hdrtst/Makefile \
+ test/intltest/Makefile \
+ test/cintltst/Makefile \
+ test/iotest/Makefile \
+ test/letest/Makefile \
+ test/perf/Makefile \
+ test/perf/collationperf/Makefile \
+ test/perf/collperf/Makefile \
+ test/perf/dicttrieperf/Makefile \
+ test/perf/ubrkperf/Makefile \
+ test/perf/charperf/Makefile \
+ test/perf/convperf/Makefile \
+ test/perf/normperf/Makefile \
+ test/perf/DateFmtPerf/Makefile \
+ test/perf/howExpensiveIs/Makefile \
+ test/perf/strsrchperf/Makefile \
+ test/perf/unisetperf/Makefile \
+ test/perf/usetperf/Makefile \
+ test/perf/ustrperf/Makefile \
+ test/perf/utfperf/Makefile \
+ test/perf/utrie2perf/Makefile \
+ test/perf/leperf/Makefile \
+ samples/Makefile samples/date/Makefile \
+ samples/cal/Makefile samples/layout/Makefile])
+AC_OUTPUT
+
+echo
+echo "ICU for C/C++ $VERSION is ready to be built."
+echo "=== Important Notes: ==="
+
+echo "Data Packaging: $datapackaging"
+echo " This means: $datapackaging_msg"
+echo " To locate data: $datapackaging_howfound"
+
+if test -n "`$U_MAKE -v 2>&1 | grep '^GNU Make'`"; then
+echo "Building ICU: Use a GNU make such as $U_MAKE to build ICU."
+else
+echo "** WARNING: $U_MAKE may not be GNU make."
+echo "This may cause ICU to fail to build. Please make sure that GNU make"
+echo "is in your PATH so that the configure script can detect its location."
+fi
+if test "x$AR" = "xfalse"; then
+ echo "*** WARNING: Archiver ar not found. Set AR= or fix PATH. Some builds (such as static) may fail."
+fi
+
+AC_MSG_CHECKING([the version of "$U_MAKE"])
+if "$U_MAKE" -f "$srcdir/config/gmakever.mk" PLATFORM="$platform"; then
+AC_MSG_RESULT([ok])
+else
+AC_MSG_RESULT([too old or test failed - try upgrading GNU Make])
+fi
+
+AC_SUBST(UCONFIG_CPPFLAGS)
+if test -n "$UCONFIG_CPPFLAGS"; then
+ HDRFILE="uconfig.h.prepend"
+ echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:"
+ echo
+ echo " ${UCONFIG_CPPFLAGS}"
+ echo
+ echo 'The recommended way to do this is to prepend the following lines to source/common/unicode/uconfig.h or #include them near the top of that file.'
+ echo "Creating the file ${HDRFILE}"
+ echo
+ echo '--------------- ' "${HDRFILE}"
+ echo > "${HDRFILE}"
+ echo '/* ICU customizations: put these lines at the top of uconfig.h */' >> "${HDRFILE}"
+ echo >> "${HDRFILE}"
+ for flag in ${UCONFIG_CPPFLAGS};
+ do
+ echo " /* $flag */" >> "${HDRFILE}"
+ case "${flag}" in
+ -D*=*)
+ [ \echo "${flag}" | sed -n 's%-D\([^=]*\)=%#define \1 %p' >> "${HDRFILE}" ]
+ \echo >> "${HDRFILE}"
+ ;;
+ -D*)
+ [ \echo "${flag}" | sed -n 's%-D\([^=]*\)%#define \1 %p' >> "${HDRFILE}" ]
+ \echo >> "${HDRFILE}"
+ ;;
+ *)
+ \echo "/* Not sure how to handle this argument: ${flag} */" >> "${HDRFILE}"
+ \echo >> "${HDRFILE}"
+ ;;
+ esac
+ done
+ cat "${HDRFILE}"
+ \echo "/* End of ${HDRFILE} ------------ */" >> "${HDRFILE}"
+ echo >> "${HDRFILE}"
+ echo '--------------- end ' "${HDRFILE}"
+fi
+
+AC_SUBST(UCONFIG_CFLAGS)
+if test -n "$UCONFIG_CFLAGS"; then
+ echo "C apps may want to build with CFLAGS = ${UCONFIG_CFLAGS}"
+fi
+AC_SUBST(UCONFIG_CXXFLAGS)
+if test -n "$UCONFIG_CXXFLAGS"; then
+ echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}"
+fi
+
+if test "$tools" = false;
+then
+ echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests."
+ echo "## Expect build failures in the 'data', 'test', and other directories."
+fi
+
+$as_unset _CXX_CXXSUFFIX
diff --git a/intl/icu/source/configure.in b/intl/icu/source/configure.in
deleted file mode 100644
--- a/intl/icu/source/configure.in
+++ /dev/null
@@ -1,1335 +0,0 @@
-# -*-autoconf-*-
-AC_COPYRIGHT([ Copyright (c) 1999-2012, International Business Machines Corporation and others. All Rights Reserved. ])
-# configure.in for ICU
-# Stephen F. Booth, heavily modified by Yves and others
-
-# Check for autoconf version
-AC_PREREQ(2.68)
-
-# Process this file with autoconf to produce a configure script
-AC_INIT([ICU])
-
-#TODO: IcuBug:8502
-#AC_INIT([ICU],
-# m4_esyscmd_s([sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"),
-# [http://icu-project.org/bugs],
-# [International Components for Unicode],
-# [http://icu-project.org])
-
-AC_CONFIG_SRCDIR([common/unicode/utypes.h])
-
-PACKAGE="icu"
-AC_SUBST(PACKAGE)
-
-# Use custom echo test for newline option
-# Current autoconf (2.65) gives incorrect echo newline option
-# for icu-config
-# This may be removed later - mow (June 17, 2010)
-ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T=
-case `/bin/sh -c "echo -n x"` in
--n*)
- case `/bin/sh -c "echo 'x\c'"` in
- *c*) ICU_ECHO_T=' ';; # ECHO_T is single tab character.
- *) ICU_ECHO_C='\c';;
- esac;;
-*)
- ICU_ECHO_N='-n';;
-esac
-AC_SUBST(ICU_ECHO_N)
-AC_SUBST(ICU_ECHO_C)
-AC_SUBST(ICU_ECHO_T)
-
-AC_MSG_CHECKING(for ICU version numbers)
-
-# Get the ICU version from uversion.h or other headers
-geticuversion() {
- [sed -n 's/^[ ]*#[ ]*define[ ]*U_ICU_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
-}
-getuversion() {
- [sed -n 's/^[ ]*#[ ]*define[ ]*U_UNICODE_VERSION[ ]*"\([^"]*\)".*/\1/p' "$@"]
-}
-VERSION=`geticuversion $srcdir/common/unicode/uvernum.h`
-if test x"$VERSION" = x; then
- as_fn_error $? "Cannot determine ICU version number from uvernum.h header file" "$LINENO" 5
-fi
-
-#TODO: IcuBug:8502
-#if test "$VERSION" != "$PACKAGE_VERSION"; then
-# AC_MSG_ERROR([configure was generated for $PACKAGE_VERSION but uvernum.h has $VERSION - please rerun autoconf])
-#fi
-
-UNICODE_VERSION=`getuversion $srcdir/common/unicode/uchar.h`
-if test x"$UNICODE_VERSION" = x; then
- AC_MSG_ERROR([Cannot determine Unicode version number from uchar.h header file])
-fi
-# Compute a reasonable library version from the release version. This is
-# very bad, but that's wanted... We want to make sure that the LIB_VERSION
-# has at least a dot in it, so we'll add a .0 if needed.
-#[LIB_VERSION=`echo $VERSION | sed -e 's/\.//' -e 's/^\([^.]*\)$/\1.0/'`]
-LIB_VERSION=$VERSION
-LIB_VERSION_MAJOR=`echo $LIB_VERSION | sed 's/\..*//'`
-AC_SUBST(VERSION)
-AC_SUBST(LIB_VERSION)
-AC_SUBST(LIB_VERSION_MAJOR)
-AC_MSG_RESULT([release $VERSION, library $LIB_VERSION, unicode version $UNICODE_VERSION])
-
-AC_SUBST(UNICODE_VERSION)
-
-# Determine the host system
-AC_CANONICAL_HOST
-
-AC_SUBST(CPPFLAGS)
-
-# This variable is needed on z/OS because the C++ compiler only recognizes .C
-_CXX_CXXSUFFIX=cpp
-export _CXX_CXXSUFFIX
-
-# Accumulate #defines
-CONFIG_CPPFLAGS=""
-UCONFIG_CPPFLAGS=""
-
-# Check whether to build debug libraries
-AC_MSG_CHECKING([whether to build debug libraries])
-enabled=no
-ENABLE_DEBUG=0
-AC_ARG_ENABLE(debug,
- [ --enable-debug build debug libraries and enable the U_DEBUG define [default=no]],
- [ case "${enableval}" in
- yes|"") enabled=yes; ENABLE_DEBUG=1; CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEBUG=1" ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(ENABLE_DEBUG)
-
-# Check whether to build release libraries
-AC_MSG_CHECKING([whether to build release libraries])
-enabled=yes
-ENABLE_RELEASE=1
-AC_ARG_ENABLE(release,
- [ --enable-release build release libraries [default=yes]],
- [ case "${enableval}" in
- no) enabled=no; ENABLE_RELEASE=0 ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(ENABLE_RELEASE)
-
-# Don't use the default C/CXXFLags
-: ${CFLAGS=""}
-: ${CXXFLAGS=""}
-
-# Checks for compilers
-AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc])
-# Make sure that we try clang++ first, which provides C++11 support.
-# The g++ compiler is less likely to support C++11.
-AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RCC])
-
-# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
-# The release mode use is the default one for autoconf
-if test "$GCC" = yes; then
- if test "$CFLAGS" = ""; then
- if test "$ENABLE_DEBUG" = 1; then
- CFLAGS=-g
- fi
- if test "$ENABLE_RELEASE" = 1; then
- CFLAGS="$CFLAGS -O2"
- fi
- fi
- if test "$CXXFLAGS" = ""; then
- if test "$ENABLE_DEBUG" = 1; then
- CXXFLAGS=-g
- fi
- if test "$ENABLE_RELEASE" = 1; then
- CXXFLAGS="$CXXFLAGS -O2"
- fi
- fi
-fi
-
-AC_PROG_CPP
-
-AC_PROG_INSTALL
-
-AC_SUBST(cross_compiling)
-
-dnl use the pld hack to get ac_fn_cxx_try_link defined globally and not local
-AC_LANG_PUSH([C++])
-AC_LINK_IFELSE([AC_LANG_PROGRAM()])
-AC_LANG_POP([C++])
-
-# make sure install is relative to srcdir - if a script
-if test "$srcdir" = "."; then
- # If srcdir isn't just ., then (srcdir) is already prepended.
- if test "${ac_install_sh}" = "${INSTALL}"; then
- INSTALL="\\\$(top_srcdir)/${ac_install_sh}"
- fi
-fi
-
-#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
-#AC_CHECK_PROG(STRIP, strip, strip, true)
-
-# Check for the platform make
-AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
-AC_SUBST(U_MAKE)
-
-
-AC_ARG_WITH(cross-build,
- [ --with-cross-build=dir specify an absolute path to the build directory of an ICU built for the current platform [default=no cross dir]],
- [cross_buildroot="${withval}"],
- [cross_buildroot=""])
-
-if test "X$cross_buildroot" = "X"; then
- if test "$cross_compiling" = "yes"; then
- AC_MSG_ERROR([Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root])
- dnl '
- fi
-else
- if test -f "${cross_buildroot}/config/icucross.mk"; then
- AC_MSG_RESULT([Using cross buildroot: $cross_buildroot])
- else
- if test -d "${cross_buildroot}"; then
- AC_MSG_ERROR([${cross_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_buildroot} first.])
- else
- AC_MSG_ERROR([No such directory ${cross_buildroot} supplied as the argument to --with-cross-build. Use an absolute path.])
- fi
- fi
-fi
-AC_SUBST(cross_buildroot)
-
-# Check for doxygen to generate documentation
-AC_PATH_PROG(DOXYGEN,doxygen,,$PATH:/usr/local/bin:/usr/bin)
-
-# Check that the linker is usable
-ICU_PROG_LINK
-
-# Determine the executable suffix
-# We don't use AC_EXEEXT because some compilers output separate debugging
-# files, which confuses the AC_EXEEXT macro.
-AC_MSG_CHECKING(checking for executable suffix)
-case "${host}" in
- *-*-cygwin*|*-*-mingw*) EXEEXT=.exe ;;
- *) EXEEXT="" ;;
-esac
-ac_exeext=$EXEEXT
-AC_MSG_RESULT($EXEEXT)
-AC_SUBST(EXEEXT)
-
-# Determine how strict we want to be when compiling
-AC_CHECK_STRICT_COMPILE
-
-# Check if we can build and use 64-bit libraries
-AC_CHECK_64BIT_LIBS
-AC_SUBST(ARFLAGS)
-AC_SUBST(COMPILE_LINK_ENVVAR)
-
-# Determine the Makefile fragment
-ICU_CHECK_MH_FRAG
-
-# Checks for libraries and other host specific stuff
-# On HP/UX, don't link to -lm from a shared lib because it isn't
-# PIC (at least on 10.2)
-case "${host}" in
- *-*-hpux*) AC_CHECK_LIB(m, floor, LIB_M="-lm") ;;
-
- *) AC_CHECK_LIB(m, floor)
- LIB_M="" ;;
-esac
-AC_SUBST(LIB_M)
-
-# Check whether to build shared libraries
-AC_MSG_CHECKING([whether to build shared libraries])
-enabled=no
-AC_ARG_ENABLE(shared,
- [ --enable-shared build shared libraries [default=yes]],
- [ case "${enableval}" in
- yes|"") enabled=yes; ENABLE_SHARED=YES ;;
- no);;
- *) ;;
- esac],
- [enabled=yes; ENABLE_SHARED=YES]
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(ENABLE_SHARED)
-
-# Check whether to build static libraries
-AC_MSG_CHECKING([whether to build static libraries])
-enabled=no
-AC_ARG_ENABLE(static,
- [ --enable-static build static libraries [default=no]],
- [ case "${enableval}" in
- yes|"") enabled=yes; ENABLE_STATIC=YES ;;
- no) ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(ENABLE_STATIC)
-
-# When building release static library, there might be some optimization flags we can use
-if test "$ENABLE_STATIC" = "YES"; then
- if test "$ENABLE_SHARED" != "YES"; then
- if test "$ENABLE_RELEASE" = 1; then
- AC_MSG_CHECKING([whether we can use static library optimization option])
- CHECK_STATIC_OPT_FLAG=no
-
- OLD_CPPFLAGS="${CPPFLAGS}"
- OLD_LDFLAGS="${LDFLAGS}"
-
- case "${host}" in
- *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
- if test "$GCC" = yes; then
- CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
- LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
- fi
- ;;
- *)
- ;;
- esac
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [CHECK_STATIC_OPT_FLAG=yes], [CHECK_STATIC_OPT_FLAG=no])
- AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG)
- if test "$CHECK_STATIC_OPT_FLAG" = no; then
- CPPFLAGS="${OLD_CPPFLAGS}"
- LDFLAGS="${OLD_LDFLAGS}"
- fi
- fi
- fi
-fi
-
-
-# Check whether to enable auto cleanup of libraries
-AC_MSG_CHECKING([whether to enable auto cleanup of libraries])
-enabled=no
-UCLN_NO_AUTO_CLEANUP=1
-AC_ARG_ENABLE(auto-cleanup,
- [ --enable-auto-cleanup enable auto cleanup of libraries [default=no]],
- [ case "${enableval}" in
- yes) enabled=yes;
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DUCLN_NO_AUTO_CLEANUP=0";
- UCLN_NO_AUTO_CLEANUP=0
- ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(UCLN_NO_AUTO_CLEANUP)
-
-# MSVC floating-point option
-MSVC_RELEASE_FLAG=""
-if test $enabled = yes
-then
- if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc
- then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #if defined _MSC_VER && _MSC_VER >= 1400
- #else
- Microsoft Visual C++ < 2005
- #endif
- ]], [[]])],[MSVC_RELEASE_FLAG="/fp:precise"],[MSVC_RELEASE_FLAG="/Op"])
-
- CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}"
- CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}"
- fi
-fi
-
-# Check whether to enabled draft APIs
-AC_MSG_CHECKING([whether to enable draft APIs])
-enabled=yes
-U_DEFAULT_SHOW_DRAFT=1
-AC_ARG_ENABLE(draft,
- [ --enable-draft enable draft APIs (and internal APIs) [default=yes]],
- [ case "${enableval}" in
- no) enabled=no; U_DEFAULT_SHOW_DRAFT=0;
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_DEFAULT_SHOW_DRAFT=0"
- ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-# Make sure that we can use draft API in ICU.
-if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
-fi
-AC_SUBST(U_DEFAULT_SHOW_DRAFT)
-
-AC_PROG_RANLIB
-
-# look for 'ar' the proper way
-AC_CHECK_TOOL(AR, ar, false)
-
-AC_MSG_CHECKING([whether to enable renaming of symbols])
-enabled=yes
-U_DISABLE_RENAMING=0
-AC_ARG_ENABLE(renaming,
- [ --enable-renaming add a version suffix to symbols [default=yes]],
- [ case "${enableval}" in
- yes|"") enabled=yes ;;
- no) enabled=no; U_DISABLE_RENAMING=1;
- UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_DISABLE_RENAMING=1"
- ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(U_DISABLE_RENAMING)
-
-AC_MSG_CHECKING([whether to enable function and data tracing])
-enabled=no
-U_ENABLE_TRACING=0
-AC_ARG_ENABLE(tracing,
- [ --enable-tracing enable function and data tracing [default=no]],
- [ case "${enableval}" in
- yes|"") enabled=yes;
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_TRACING=1";
- U_ENABLE_TRACING=1 ;;
- no) enabled=no; U_ENABLE_TRACING=0 ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enabled)
-AC_SUBST(U_ENABLE_TRACING)
-
-
-U_ENABLE_DYLOAD=1
-enable=yes
-AC_MSG_CHECKING([whether to enable dynamic loading of plugins])
-AC_ARG_ENABLE(dyload,
- [ --disable-dyload disable dynamic loading [default=no]],
- [ case "${enableval}" in
- yes|"")
- U_ENABLE_DYLOAD=1
- enable=yes
- ;;
- no)
- U_ENABLE_DYLOAD=0;
- enable=no;
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_ENABLE_DYLOAD=0";
- ;;
- *) ;;
- esac],
-)
-AC_MSG_RESULT($enable)
-AC_SUBST(U_ENABLE_DYLOAD)
-
-if test "$enable" = "yes"; then
- AC_CHECK_HEADERS([dlfcn.h])
- #AC_MSG_RESULT($enabled)
- AC_SEARCH_LIBS([dlopen], [dl])
- AC_CHECK_FUNCS([dlopen])
-
- if test "x$ac_cv_func_dlopen" != xyes; then
- CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DHAVE_DLOPEN=0"
- fi
-fi
-
-# Check for miscellanous functions.
-# So, use for putil / tools only.
-# Note that this will generate HAVE_GETTIMEOFDAY, not U_HAVE_GETTIMEOFDAY
-AC_CHECK_FUNCS([gettimeofday])
-
-
-# Check whether to use the evil rpath or not
-AC_ARG_ENABLE(rpath,
- [ --enable-rpath use rpath when linking [default is only if necessary]],
- [ case "${enableval}" in
- yes|"") ENABLE_RPATH=YES ;;
- no) ;;
- *) ;;
- esac],
- [ENABLE_RPATH=NO]
-)
-AC_SUBST(ENABLE_RPATH)
-
-
-
-AC_LANG_PUSH([C++])
-AC_MSG_CHECKING([[if we have a C++ compiler]])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx_okay=yes],[cxx_okay=no])
-if test $cxx_okay = yes
-then
- AC_MSG_RESULT([[Good]])
-else
- AC_MSG_RESULT([[no]])
- AC_MSG_ERROR([[C++ compiler $CXX does not work or no compiler found]])
-fi
-
-AC_MSG_CHECKING([[if #include works]])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
-AC_MSG_RESULT($ac_cv_header_stdstring)
-if test $ac_cv_header_stdstring = yes
-then
- U_HAVE_STD_STRING=1
-else
- U_HAVE_STD_STRING=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
-fi
-AC_SUBST(U_HAVE_STD_STRING)
-AC_LANG_POP([C++])
-
-# Always build ICU with multi-threading support.
-threads=true
-ICU_USE_THREADS=1
-OLD_LIBS=${LIBS}
-
-if test $threads = true; then
- # For Compaq Tru64 (OSF1), we must look for pthread_attr_init
- # and must do this before seaching for pthread_mutex_destroy, or
- # we will pick up libpthreads.so not libpthread.so
- # If this fails, then we must test for HPUX specials, before
- # moving on to a more generic test
-
- AC_CHECK_LIB(pthread, pthread_attr_init)
- if test $ac_cv_lib_pthread_pthread_attr_init = yes; then
- ICU_USE_THREADS=1
- else
- # Locate the right library for POSIX threads. We look for the
- # symbols in the libraries first, because on Solaris libc provides
- # pthread_create but libpthread has the real code :(
- # AIX uses libpthreads instead of libpthread, and HP/UX uses libpthread
- # FreeBSD users may need libpthread if they do not have libc_r.
-
- AC_SEARCH_LIBS_FIRST(pthread_mutex_destroy, pthread pthreads c_r )
-
- if test "$ac_cv_search_pthread_mutex_destroy" != no; then
- ICU_USE_THREADS=1
- else
- # For HP 11
- AC_CHECK_LIB(pthread, pthread_mutex_init)
- if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
- ICU_USE_THREADS=1
- fi
- fi
-
- AC_CHECK_FUNC(pthread_mutex_lock)
-
- if test $ac_cv_func_pthread_mutex_lock = yes; then
- ICU_USE_THREADS=1
- fi
- fi
- # Check to see if we are using CygWin with MSVC
- case "${host}" in
- *-pc-cygwin*|*-pc-mingw*)
- # For gcc, the thread options are set by mh-mingw/mh-cygwin
- # For msvc, the thread options are set by runConfigureICU
- ICU_USE_THREADS=1
- ;;
- *-*-hpux*)
- # Add -mt because it does several nice things on newer compilers.
- case "${icu_cv_host_frag}" in
- mh-hpux-acc)
- OLD_CXXFLAGS="${CXXFLAGS}"
- CXXFLAGS="${CXXFLAGS} -mt"
- if test x"`${CXX} ${CXXFLAGS} 2>&1`" != x""; then
- CXXFLAGS="${OLD_CXXFLAGS}"
- fi
- ;;
- esac
- ;;
- *-*-solaris*)
- case "${icu_cv_host_frag}" in
- mh-solaris)
- LIBS="${LIBS} -mt"
- ;;
- esac
- ;;
- esac
-fi
-
-AC_ARG_ENABLE(weak-threads,
- [ --enable-weak-threads weakly reference the threading library [default=no]],
- [case "${enableval}" in
- yes)
- LIB_THREAD="${LIBS%${OLD_LIBS}}"
- LIBS=${OLD_LIBS}
- ;;
- no) ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-weak-threads) ;;
- esac])
-AC_SUBST(LIB_THREAD)
-
-# Check for mmap()
-
-# The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific.
-# Do this check instead.
-HAVE_MMAP=0
-AC_MSG_CHECKING([for mmap])
-AC_CACHE_VAL(ac_cv_func_mmap_ok,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include
-#include
-#include
-#include ], [mmap((void *)0, 0, PROT_READ, 0, 0, 0);])],[ac_cv_func_mmap_ok=yes],[ac_cv_func_mmap_ok=no])] )
-AC_MSG_RESULT($ac_cv_func_mmap_ok)
-if test $ac_cv_func_mmap_ok = yes
-then
- HAVE_MMAP=1
-else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_MMAP=0"
-fi
-AC_SUBST(HAVE_MMAP)
-
-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)
- if test "$GCC" = yes; then
- # We're using gcc, and the simple -a gcc command line works for genccode
- GENCCODE_ASSEMBLY="-a gcc"
- fi ;;
-i*86-*-solaris*)
- if test "$GCC" = yes; then
- # When using gcc, look if we're also using GNU as.
- # When using GNU as, the simple -a gcc command line works for genccode.
- asv=`"${CC}" -print-prog-name=as 2>/dev/null`
- asv=`"${asv}" --version 2>/dev/null`
- case "X${asv}" in
- X*GNU*) GENCCODE_ASSEMBLY="-a gcc" ;;
- X*) GENCCODE_ASSEMBLY="-a sun-x86" ;;
- esac
- unset asv
- else
- GENCCODE_ASSEMBLY="-a sun-x86"
- fi ;;
-sparc-*-solaris*)
- GENCCODE_ASSEMBLY="-a sun"
- ;;
-ia64-*-hpux*)
- GENCCODE_ASSEMBLY="-a aCC-ia64"
- ;;
-esac
-AC_SUBST(GENCCODE_ASSEMBLY)
-
-AC_MSG_RESULT($GENCCODE_ASSEMBLY)
-
-# Checks for header files
-AC_CHECK_HEADERS(inttypes.h)
-if test $ac_cv_header_inttypes_h = no; then
- U_HAVE_INTTYPES_H=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
-else
- U_HAVE_INTTYPES_H=1
-fi
-if test "$CC" = ccc; then
- AC_MSG_RESULT("C compiler set to CCC ${CC}" )
- case "${host}" in
- alpha*-*-*) U_HAVE_INTTYPES_H=0;
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INTTYPES_H=0"
- esac
-fi
-
-AC_SUBST(U_HAVE_INTTYPES_H)
-
-AC_CHECK_HEADERS(dirent.h)
-if test $ac_cv_header_dirent_h = no; then
- U_HAVE_DIRENT_H=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_DIRENT_H=0"
-else
- U_HAVE_DIRENT_H=1
-fi
-
-AC_SUBST(U_HAVE_DIRENT_H)
-
-# Check for endianness
-AC_C_BIGENDIAN()
-if test $ac_cv_c_bigendian = no; then
-U_IS_BIG_ENDIAN=0
-U_ENDIAN_CHAR="l"
-else
-U_IS_BIG_ENDIAN=1
-U_ENDIAN_CHAR="b"
-fi
-AC_SUBST(U_IS_BIG_ENDIAN)
-
-# Do various POSIX related checks
-U_HAVE_NL_LANGINFO_CODESET=0
-U_NL_LANGINFO_CODESET=-1
-AC_CHECK_FUNC(nl_langinfo,[U_HAVE_NL_LANGINFO=1],[U_HAVE_NL_LANGINFO=0])
-dnl AC_SUBST(U_HAVE_NL_LANGINFO)
-if test $U_HAVE_NL_LANGINFO -eq 1; then
- AC_CACHE_CHECK([for nl_langinfo's argument to obtain the codeset],
- ac_cv_nl_langinfo_codeset,
- [ac_cv_nl_langinfo_codeset="unknown"
- for a in CODESET _NL_CTYPE_CODESET_NAME; do
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[nl_langinfo($a);]])],[ac_cv_nl_langinfo_codeset="$a"; break],[])]
- done)
- if test x$ac_cv_nl_langinfo_codeset != xunknown
- then
- U_HAVE_NL_LANGINFO_CODESET=1
- U_NL_LANGINFO_CODESET=$ac_cv_nl_langinfo_codeset
- if test "x${ac_cv_nl_langinfo_codeset}" != "xCODESET"
- then
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DNL_LANGINFO_CODESET=${ac_cv_nl_langinfo_codeset}"
- fi
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_NL_LANGINFO_CODESET=0"
- fi
-fi
-AC_SUBST(U_HAVE_NL_LANGINFO_CODESET)
-AC_SUBST(U_NL_LANGINFO_CODESET)
-
-# Namespace support checks
-AC_LANG(C++)
-AC_MSG_CHECKING([for namespace support])
-AC_CACHE_VAL(ac_cv_namespace_ok,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace x_version {void f(){}}
- namespace x = x_version;
- using namespace x_version;
- ], [f();])],[ac_cv_namespace_ok=yes],[ac_cv_namespace_ok=no])] )
-AC_MSG_RESULT($ac_cv_namespace_ok)
-if test $ac_cv_namespace_ok = no
-then
- AC_MSG_ERROR(Namespace support is required to build ICU.)
-fi
-
-AC_MSG_CHECKING([for properly overriding new and delete])
-U_OVERRIDE_CXX_ALLOCATION=0
-U_HAVE_PLACEMENT_NEW=0
-AC_CACHE_VAL(ac_cv_override_cxx_allocation_ok,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include
- class UMemory {
- public:
- void *operator new(size_t size) {return malloc(size);}
- void *operator new[](size_t size) {return malloc(size);}
- void operator delete(void *p) {free(p);}
- void operator delete[](void *p) {free(p);}
- };
- ]], [])],[ac_cv_override_cxx_allocation_ok=yes],[ac_cv_override_cxx_allocation_ok=no])] )
-AC_MSG_RESULT($ac_cv_override_cxx_allocation_ok)
-if test $ac_cv_override_cxx_allocation_ok = yes
-then
- U_OVERRIDE_CXX_ALLOCATION=1
- AC_MSG_CHECKING([for placement new and delete])
- AC_CACHE_VAL(ac_cv_override_placement_new_ok,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include
- class UMemory {
- public:
- void *operator new(size_t size) {return malloc(size);}
- void *operator new[](size_t size) {return malloc(size);}
- void operator delete(void *p) {free(p);}
- void operator delete[](void *p) {free(p);}
- void * operator new(size_t, void *ptr) { return ptr; }
- void operator delete(void *, void *) {}
- };
- ]], [])],[ac_cv_override_placement_new_ok=yes],[ac_cv_override_placement_new_ok=no])] )
- AC_MSG_RESULT($ac_cv_override_placement_new_ok)
- if test $ac_cv_override_placement_new_ok = yes
- then
- U_HAVE_PLACEMENT_NEW=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_PLACEMENT_NEW=0"
- fi
-else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_OVERRIDE_CXX_ALLOCATION=0"
-fi
-AC_SUBST(U_OVERRIDE_CXX_ALLOCATION)
-AC_SUBST(U_HAVE_PLACEMENT_NEW)
-
-AC_LANG(C)
-AC_CHECK_FUNC(popen)
-if test x$ac_cv_func_popen = xyes
-then
- U_HAVE_POPEN=1
-else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_POPEN=0"
- U_HAVE_POPEN=0
-fi
-AC_SUBST(U_HAVE_POPEN)
-
-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
-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
-#include
-#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
- #include
- 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)
-
-AC_CACHE_CHECK(for timezone,ac_cv_var_timezone,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([#ifndef __USE_POSIX
-#define __USE_POSIX
-#endif
-#ifndef __USE_XOPEN
-#define __USE_XOPEN
-#endif
-#include
-], [[timezone = 1;]])],[ac_cv_var_timezone=yes],[ac_cv_var_timezone=no])])
-U_HAVE_TIMEZONE=0
-if test $ac_cv_var_timezone = yes; then
- U_TIMEZONE=timezone
- U_HAVE_TIMEZONE=1
-else
- AC_CACHE_CHECK(for __timezone,ac_cv_var___timezone,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[__timezone = 1;]])],[ac_cv_var___timezone=yes],[ac_cv_var___timezone=no])])
- if test $ac_cv_var___timezone = yes; then
- U_TIMEZONE=__timezone
- U_HAVE_TIMEZONE=1
- else
- AC_CACHE_CHECK(for _timezone,ac_cv_var__timezone,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[_timezone = 1;]])],[ac_cv_var__timezone=yes],[ac_cv_var__timezone=no])])
- if test $ac_cv_var__timezone = yes; then
- U_TIMEZONE=_timezone
- U_HAVE_TIMEZONE=1
- else
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_TIMEZONE=0"
- fi
- fi
-fi
-AC_SUBST(U_HAVE_TIMEZONE)
-AC_SUBST(U_TIMEZONE)
-
-# Checks for typedefs
-AC_CHECK_TYPE(int8_t,signed char)
-AC_CHECK_TYPE(uint8_t,unsigned char)
-AC_CHECK_TYPE(int16_t,signed short)
-AC_CHECK_TYPE(uint16_t,unsigned short)
-AC_CHECK_TYPE(int32_t,signed long)
-AC_CHECK_TYPE(uint32_t,unsigned long)
-AC_CHECK_TYPE(int64_t,signed long long)
-AC_CHECK_TYPE(uint64_t,unsigned long long)
-
-if test $ac_cv_type_int8_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT8_T=0"
-fi
-
-if test $ac_cv_type_uint8_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT8_T=0"
-fi
-
-if test $ac_cv_type_int16_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT16_T=0"
-fi
-
-if test $ac_cv_type_uint16_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT16_T=0"
-fi
-
-if test $ac_cv_type_int32_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT32_T=0"
-fi
-
-if test $ac_cv_type_uint32_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT32_T=0"
-fi
-
-if test $ac_cv_type_int64_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_INT64_T=0"
-fi
-
-if test $ac_cv_type_uint64_t = no; then
-CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_UINT64_T=0"
-fi
-
-# Do various wchar_t related checks
-AC_CHECK_HEADER(wchar.h)
-if test "$ac_cv_header_wchar_h" = no
-then
- U_HAVE_WCHAR_H=0
- U_HAVE_WCSCPY=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCHAR_H=0 -DU_HAVE_WCSCPY=0"
-else
- AC_DEFINE([HAVE_WCHAR_H], [1], [wchar.h was found.])
- U_HAVE_WCHAR_H=1
- # Some broken systems have wchar.h but not some of its functions...
- AC_SEARCH_LIBS(wcscpy, wcs w)
- if test "$ac_cv_search_wcscpy" != no; then
- U_HAVE_WCSCPY=1
- else
- U_HAVE_WCSCPY=0
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_WCSCPY=0"
- fi
-fi
-AC_SUBST(U_HAVE_WCHAR_H)
-AC_SUBST(U_HAVE_WCSCPY)
-
-AC_CHECK_SIZEOF([wchar_t], 0, [
-#if STDC_HEADERS
-#include
-#endif
-#include
-#if HAVE_WCHAR_H
-#include
-#include
-#endif])
-U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
-# We do this check to verify that everything is okay.
-if test $U_SIZEOF_WCHAR_T = 0; then
- if test $U_HAVE_WCHAR_H=1; then
- AC_MSG_ERROR(There is wchar.h but the size of wchar_t is 0)
- fi
-fi
-
-AC_MSG_CHECKING([for UTF-16 string literal support])
-U_CHECK_UTF16_STRING=1
-CHECK_UTF16_STRING_RESULT="unknown"
-
-case "${host}" in
-*-*-aix*|powerpc64-*-linux*)
- if test "$GCC" = no; then
- OLD_CFLAGS="${CFLAGS}"
- OLD_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${CFLAGS} -qutf"
- CXXFLAGS="${CXXFLAGS} -qutf"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = u"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
- if test "$U_CHECK_UTF16_STRING" = 0; then
- CFLAGS="${OLD_CFLAGS}"
- CXXFLAGS="${OLD_CXXFLAGS}"
- else
- CHECK_UTF16_STRING_RESULT="-qutf"
- fi
- fi
- ;;
-*-*-solaris*)
- if test "$GCC" = no; then
- OLD_CFLAGS="${CFLAGS}"
- OLD_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${CFLAGS} -xustr=ascii_utf16_ushort"
- CXXFLAGS="${CXXFLAGS} -xustr=ascii_utf16_ushort"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[const unsigned short hello[] = U"hello";]], [[]])],[U_CHECK_UTF16_STRING=1],[U_CHECK_UTF16_STRING=0])
- if test "$U_CHECK_UTF16_STRING" = 0; then
- CFLAGS="${OLD_CFLAGS}"
- CXXFLAGS="${OLD_CXXFLAGS}"
- else
- CHECK_UTF16_STRING_RESULT="-xustr=ascii_utf16_ushort"
-
- # Since we can't detect the availability of this UTF-16 syntax at compile time,
- # we depend on configure telling us that we can use it.
- # Since we can't ensure ICU users use -xustr=ascii_utf16_ushort,
- # we only use this macro within ICU.
- # If an ICU user uses icu-config, this feature will be enabled.
- CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_CHECK_UTF16_STRING=1"
- U_CHECK_UTF16_STRING=0
- fi
- fi
- ;;
-*-*-hpux*)
- if test "$GCC" = no; then
- # The option will be detected at compile time without additional compiler options.
- CHECK_UTF16_STRING_RESULT="available"
- fi
- ;;
-*-*-cygwin)
- # wchar_t can be used
- CHECK_UTF16_STRING_RESULT="available"
- ;;
-*)
- ;;
-esac
-
-# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
-if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
- if test "$GCC" = yes; then
- OLD_CFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -std=gnu99"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-static const char16_t test[] = u"This is a UTF16 literal string.";
- ]], [[]])],[CC_UTF16_STRING=1],[CC_UTF16_STRING=0])
- if test "$CC_UTF16_STRING" = 1; then
- CHECK_UTF16_STRING_RESULT="C only";
- else
- CFLAGS="${OLD_CFLAGS}"
- fi
- fi
- if test "$GXX" = yes; then
- OLD_CXXFLAGS="${CXXFLAGS}"
- # -Wno-return-type-c-linkage is desired so that stable ICU API is not warned about.
- CXXFLAGS="${CXXFLAGS} -std=c++11"
- AC_LANG_PUSH([C++])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-static const char16_t test[] = u"This is a UTF16 literal string.";
- ]], [[]])],[CXX_UTF16_STRING=1],[CXX_UTF16_STRING=0])
- AC_LANG_POP([C++])
- if test "$CXX_UTF16_STRING" = 1; then
- if test "$CC_UTF16_STRING" = 1; then
- CHECK_UTF16_STRING_RESULT="available";
- else
- CHECK_UTF16_STRING_RESULT="C++ only";
- fi
- else
- CXXFLAGS="${OLD_CXXFLAGS}"
- fi
- fi
-fi
-AC_MSG_RESULT($CHECK_UTF16_STRING_RESULT)
-
-# Enable/disable extras
-AC_ARG_ENABLE(extras,
- [ --enable-extras build ICU extras [default=yes]],
- [case "${enableval}" in
- yes) extras=true ;;
- no) extras=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-extras) ;;
- esac],
- extras=true)
-ICU_CONDITIONAL(EXTRAS, test "$extras" = true)
-AC_ARG_ENABLE(icuio,
- [ --enable-icuio build ICU's icuio library [default=yes]],
- [case "${enableval}" in
- yes) icuio=true ;;
- no) icuio=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-icuio) ;;
- esac],
- icuio=true)
-ICU_CONDITIONAL(ICUIO, test "$icuio" = true)
-
-# Enable/disable layout
-AC_ARG_ENABLE(layout,
- [ --enable-layout build ICU's layout library [default=yes]],
- [case "${enableval}" in
- yes) layout=true ;;
- no) layout=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;;
- esac],
- layout=true)
-ICU_CONDITIONAL(LAYOUT, test "$layout" = true)
-
-AC_ARG_WITH(data-packaging,
- [ --with-data-packaging=type specify how to package ICU data (files, archive, library, static, auto) [default=auto]],
- [case "${withval}" in
- files|archive|library) datapackaging=$withval ;;
- auto) datapackaging=$withval ;;
- common) datapackaging=archive ;;
- dll) datapackaging=library ;;
- static) datapackaging=static ;;
- *) AC_MSG_ERROR(bad value ${withval} for --with-data-packaging) ;;
- esac],
- [datapackaging=])
-
-# Note: 'thesysconfdir' is an evaluated version, for Man pages, so also for thedatadir, thelibdir, etc..
-# thesysconfdir=`eval echo $sysconfdir`
-dnl# AC_SUBST(thesysconfdir)
-dnl# thelibdir=`test "x$exec_prefix" = xNONE && exec_prefix="$prefix"; eval echo $libdir`
-dnl# AC_SUBST(thelibdir)
-thedatadir=`eval echo $datadir`
-dnl# AC_SUBST(thedatadir)
-# Always put raw data files in share/icu/{version}, etc. Never use lib/icu/{version} for data files.. Actual shared libraries will go in {libdir}.
-pkgicudatadir=$datadir
-thepkgicudatadir=$thedatadir
-AC_SUBST(pkgicudatadir)
-AC_SUBST(thepkgicudatadir)
-
-dnl# Shouldn't need the AC_SUBST
-
-if test x"$datapackaging" = x -o x"$datapackaging" = xauto; then
- # default to library
- datapackaging=library
- if test "$ENABLE_STATIC" = "YES"; then
- if test "$ENABLE_SHARED" != "YES"; then
- datapackaging=static
- fi
- fi
-fi
-
-datapackaging_dir=`eval echo $thedatadir`"/icu/${VERSION}"
-
-datapackaging_msg="(No explaination for mode $datapackaging.)"
-
-datapackaging_msg_path="ICU will look in $datapackaging_dir which is the installation location. Call u_setDataDirectory() or use the ICU_DATA environment variable to override."
-datapackaging_msg_set="ICU will use the linked data library. If linked with the stub library located in stubdata/, the application can use udata_setCommonData() or set a data path to override."
-datapackaging_howfound="(unknown)"
-
-case "$datapackaging" in
- files)
- DATA_PACKAGING_MODE=files
- datapackaging_msg="ICU data will be stored in individual files."
- datapackaging_howfound="$datapackaging_msg_path"
- ;;
- archive)
- DATA_PACKAGING_MODE=common
- datapackaging_msg="ICU data will be stored in a single .dat file."
- datapackaging_howfound="$datapackaging_msg_path"
- ;;
- library)
- DATA_PACKAGING_MODE=dll
- datapackaging_msg="ICU data will be linked with ICU."
- if test "$ENABLE_STATIC" = "YES"; then
- datapackaging_msg="$datapackaging_msg A static data library will be built. "
- fi
- if test "$ENABLE_SHARED" = "YES"; then
- datapackaging_msg="$datapackaging_msg A shared data library will be built. "
- fi
- datapackaging_howfound="$datapackaging_msg_set"
- ;;
- static)
- DATA_PACKAGING_MODE=static
- datapackaging_msg="ICU data will be stored in a static library."
- datapackaging_howfound="$datapackaging_msg_set"
- ;;
-esac
-AC_SUBST(DATA_PACKAGING_MODE)
-
-# Sets a library suffix
-AC_MSG_CHECKING([for a library suffix to use])
-AC_ARG_WITH(library-suffix,
- [ --with-library-suffix=suffix tag a suffix to the library names [default=]],
- [ICULIBSUFFIX="${withval}"],
- [ICULIBSUFFIX=])
-msg=$ICULIBSUFFIX
-if test "$msg" = ""; then
- msg=none
-fi
-AC_MSG_RESULT($msg)
-AC_SUBST(ICULIBSUFFIX)
-if test "$ICULIBSUFFIX" != ""
-then
- U_HAVE_LIB_SUFFIX=1
- ICULIBSUFFIXCNAME=`echo _$ICULIBSUFFIX | sed 's/[^A-Za-z0-9_]/_/g'`
- UCONFIG_CPPFLAGS="${UCONFIG_CPPFLAGS} -DU_HAVE_LIB_SUFFIX=1 -DU_LIB_SUFFIX_C_NAME=${ICULIBSUFFIXCNAME} "
-else
- U_HAVE_LIB_SUFFIX=0
-fi
-AC_SUBST(U_HAVE_LIB_SUFFIX)
-AC_SUBST(ICULIBSUFFIXCNAME)
-
-# Enable/disable tests
-AC_ARG_ENABLE(tests,
- [ --enable-tests build ICU tests [default=yes]],
- [case "${enableval}" in
- yes) tests=true ;;
- no) tests=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-tests) ;;
- esac],
- tests=true)
-ICU_CONDITIONAL(TESTS, test "$tests" = true)
-
-# Enable/disable samples
-AC_ARG_ENABLE(samples,
- [ --enable-samples build ICU samples [default=yes]
-
-Additionally, the variable FORCE_LIBS may be set before calling configure.
-If set, it will REPLACE any automatic list of libraries.],
- [case "${enableval}" in
- yes) samples=true ;;
- no) samples=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-samples) ;;
- esac],
- samples=true)
-ICU_CONDITIONAL(SAMPLES, test "$samples" = true)
-
-ICUDATA_CHAR=$U_ENDIAN_CHAR
-
-# Platform-specific Makefile setup
-# set ICUDATA_CHAR to 'e' for any EBCDIC (which should be big endian) platform.
-case "${host}" in
- *-*-solaris*) platform=U_SOLARIS ;;
- *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) platform=U_LINUX ;;
- *-*-*bsd*|*-*-dragonfly*) platform=U_BSD ;;
- *-*-aix*) platform=U_AIX ;;
- *-*-hpux*) platform=U_HPUX ;;
- *-apple-darwin*|*-apple-rhapsody*) platform=U_DARWIN ;;
- *-*-cygwin*) platform=U_CYGWIN ;;
- *-*-mingw*) platform=U_MINGW ;;
- *-*ibm-openedition*|*-*-os390*) platform=OS390
- if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
- ICUDATA_CHAR="e"
- fi ;;
- *-*-os400*) platform=OS400
- if test "${ICU_ENABLE_ASCII_STRINGS}" != "1"; then
- ICUDATA_CHAR="e"
- fi ;;
- *-*-nto*) platform=U_QNX ;;
- *-dec-osf*) platform=U_OSF ;;
- *-*-beos) platform=U_BEOS ;;
- *-*-irix*) platform=U_IRIX ;;
- *-ncr-*) platform=U_MPRAS ;;
- *) platform=U_UNKNOWN_PLATFORM ;;
-esac
-AC_SUBST(ICUDATA_CHAR)
-AC_SUBST(platform)
-platform_make_fragment_name="$icu_cv_host_frag"
-platform_make_fragment='$(top_srcdir)/config/'"$platform_make_fragment_name"
-AC_SUBST(platform_make_fragment_name)
-AC_SUBST(platform_make_fragment)
-
-if test "${FORCE_LIBS}" != ""; then
- echo " *** Overriding automatically chosen [LIBS=$LIBS], using instead [FORCE_LIBS=${FORCE_LIBS}]" 1>&6
- LIBS=${FORCE_LIBS}
-fi
-
-# Now that we're done using CPPFLAGS etc. for tests, we can change it
-# for build.
-
-CPPFLAGS="$CPPFLAGS \$(THREADSCPPFLAGS)"
-CFLAGS="$CFLAGS \$(THREADSCFLAGS)"
-CXXFLAGS="$CXXFLAGS \$(THREADSCXXFLAGS)"
-
-AC_SUBST(LIBCFLAGS)
-AC_SUBST(LIBCXXFLAGS)
-
-# append all config cppflags
-CPPFLAGS="$CPPFLAGS $CONFIG_CPPFLAGS $UCONFIG_CPPFLAGS"
-
-echo "CPPFLAGS=$CPPFLAGS"
-echo "CFLAGS=$CFLAGS"
-echo "CXXFLAGS=$CXXFLAGS"
-
-
-# output the Makefiles
-AC_CONFIG_FILES([icudefs.mk \
- Makefile \
- data/pkgdataMakefile \
- config/Makefile.inc \
- config/icu.pc \
- config/pkgdataMakefile \
- data/Makefile \
- stubdata/Makefile \
- common/Makefile \
- i18n/Makefile \
- layout/Makefile \
- layoutex/Makefile \
- io/Makefile \
- extra/Makefile \
- extra/uconv/Makefile \
- extra/uconv/pkgdataMakefile \
- extra/scrptrun/Makefile \
- tools/Makefile \
- tools/ctestfw/Makefile \
- tools/toolutil/Makefile \
- tools/makeconv/Makefile \
- tools/genrb/Makefile \
- tools/genccode/Makefile \
- tools/gencmn/Makefile \
- tools/gencnval/Makefile \
- tools/gendict/Makefile \
- tools/gentest/Makefile \
- tools/gennorm2/Makefile \
- tools/genbrk/Makefile \
- tools/gensprep/Makefile \
- tools/icuinfo/Makefile \
- tools/icupkg/Makefile \
- tools/icuswap/Makefile \
- tools/pkgdata/Makefile \
- tools/tzcode/Makefile \
- tools/gencfu/Makefile \
- test/Makefile \
- test/compat/Makefile \
- test/testdata/Makefile \
- test/testdata/pkgdataMakefile \
- test/hdrtst/Makefile \
- test/intltest/Makefile \
- test/cintltst/Makefile \
- test/iotest/Makefile \
- test/letest/Makefile \
- test/perf/Makefile \
- test/perf/collationperf/Makefile \
- test/perf/collperf/Makefile \
- test/perf/dicttrieperf/Makefile \
- test/perf/ubrkperf/Makefile \
- test/perf/charperf/Makefile \
- test/perf/convperf/Makefile \
- test/perf/normperf/Makefile \
- test/perf/DateFmtPerf/Makefile \
- test/perf/howExpensiveIs/Makefile \
- test/perf/strsrchperf/Makefile \
- test/perf/unisetperf/Makefile \
- test/perf/usetperf/Makefile \
- test/perf/ustrperf/Makefile \
- test/perf/utfperf/Makefile \
- test/perf/utrie2perf/Makefile \
- samples/Makefile samples/date/Makefile \
- samples/cal/Makefile samples/layout/Makefile])
-AC_OUTPUT
-
-echo
-echo "ICU for C/C++ $VERSION is ready to be built."
-echo "=== Important Notes: ==="
-
-echo "Data Packaging: $datapackaging"
-echo " This means: $datapackaging_msg"
-echo " To locate data: $datapackaging_howfound"
-
-if test -n "`$U_MAKE -v 2>&1 | grep '^GNU Make'`"; then
-echo "Building ICU: Use a GNU make such as $U_MAKE to build ICU."
-else
-echo "** WARNING: $U_MAKE may not be GNU make."
-echo "This may cause ICU to fail to build. Please make sure that GNU make"
-echo "is in your PATH so that the configure script can detect its location."
-fi
-if test "x$AR" = "xfalse"; then
- echo "*** WARNING: Archiver ar not found. Set AR= or fix PATH. Some builds (such as static) may fail."
-fi
-
-AC_MSG_CHECKING([the version of "$U_MAKE"])
-if "$U_MAKE" -f "$srcdir/config/gmakever.mk" PLATFORM="$platform"; then
-AC_MSG_RESULT([ok])
-else
-AC_MSG_RESULT([too old or test failed - try upgrading GNU Make])
-fi
-
-if test -n "$UCONFIG_CPPFLAGS"; then
- HDRFILE="uconfig.h.prepend"
- echo "*** WARNING: You must set the following flags before code compiled against this ICU will function properly:"
- echo
- echo " ${UCONFIG_CPPFLAGS}"
- echo
- echo 'The recommended way to do this is to prepend the following lines to source/common/unicode/uconfig.h or #include them near the top of that file.'
- echo "Creating the file ${HDRFILE}"
- echo
- echo '--------------- ' "${HDRFILE}"
- echo > "${HDRFILE}"
- echo '/* ICU customizations: put these lines at the top of uconfig.h */' >> "${HDRFILE}"
- echo >> "${HDRFILE}"
- for flag in ${UCONFIG_CPPFLAGS};
- do
- echo " /* $flag */" >> "${HDRFILE}"
- case "${flag}" in
- -D*=*)
- [ \echo "${flag}" | sed -n 's%-D\([^=]*\)=%#define \1 %p' >> "${HDRFILE}" ]
- \echo >> "${HDRFILE}"
- ;;
- -D*)
- [ \echo "${flag}" | sed -n 's%-D\([^=]*\)%#define \1 %p' >> "${HDRFILE}" ]
- \echo >> "${HDRFILE}"
- ;;
- *)
- \echo "/* Not sure how to handle this argument: ${flag} */" >> "${HDRFILE}"
- \echo >> "${HDRFILE}"
- ;;
- esac
- done
- cat "${HDRFILE}"
- \echo "/* End of ${HDRFILE} ------------ */" >> "${HDRFILE}"
- echo >> "${HDRFILE}"
- echo '--------------- end ' "${HDRFILE}"
-fi
-
-$as_unset _CXX_CXXSUFFIX
diff --git a/intl/icu/source/data/Makefile.in b/intl/icu/source/data/Makefile.in
--- a/intl/icu/source/data/Makefile.in
+++ b/intl/icu/source/data/Makefile.in
@@ -1,5 +1,5 @@
## Makefile.in for ICU data
-## Copyright (c) 1999-2012, International Business Machines Corporation and
+## Copyright (c) 1999-2013, International Business Machines Corporation and
## others. All Rights Reserved.
## Source directory information
@@ -350,8 +350,7 @@ ifeq ($(ENABLE_SO_VERSION_DATA),1)
ifeq ($(PKGDATA_MODE),dll)
SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
- # fixme: need to tell whether to use - or /, $(SOURCEFILE) or $<
- rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
+ rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
endif
endif
@@ -528,6 +527,9 @@ endif
$(BRKBLDDIR)/thaidict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
$(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e00 -c -i $(BUILDDIR) $(BRKSRCDIR)/thaidict.txt $(BRKBLDDIR)/thaidict.dict
+$(BRKBLDDIR)/laodict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
+ $(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x0e80 -c -i $(BUILDDIR) $(BRKSRCDIR)/laodict.txt $(BRKBLDDIR)/laodict.dict
+
# TODO: figure out why combining characters are here?
$(BRKBLDDIR)/khmerdict.dict: $(TOOLBINDIR)/gendict$(TOOLEXEEXT) $(DAT_FILES)
$(INVOKE) $(TOOLBINDIR)/gendict --bytes --transform offset-0x1780 -c -i $(BUILDDIR) $(BRKSRCDIR)/khmerdict.txt $(BRKBLDDIR)/khmerdict.dict
diff --git a/intl/icu/source/data/build.xml b/intl/icu/source/data/build.xml
--- a/intl/icu/source/data/build.xml
+++ b/intl/icu/source/data/build.xml
@@ -5,7 +5,7 @@
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
-
+
-
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
@@ -122,7 +95,7 @@
-
+
@@ -135,6 +108,7 @@
+
@@ -143,112 +117,25 @@
&icu-config;
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-locale-deprecates;
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-locale-deprecates;
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-locale-deprecates;
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-locale-deprecates;
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-locale-deprecates;
+ &icu-locale-deprecates;
-
+
-
+
+
&icu-config;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- &icu-config;
-
-
-
-
-
-
+
+
+
@@ -271,41 +158,25 @@
-
-
-
+
-
+
+
&icu-config;
-
-
-
-
-
-
-
-
-
-
-
- &icu-config;
-
-
-
@@ -314,7 +185,6 @@
-
@@ -331,7 +201,6 @@
-
@@ -344,7 +213,6 @@
-
@@ -357,7 +225,6 @@
-
@@ -370,7 +237,6 @@
-
@@ -383,7 +249,6 @@
-
@@ -396,7 +261,6 @@
-
@@ -409,7 +273,6 @@
-
@@ -422,7 +285,6 @@
-
@@ -435,18 +297,18 @@
-
-
+
-
+
+
-
-
-
-
-
-
-
-
-
-
@@ -476,7 +325,6 @@
-
diff --git a/intl/icu/source/data/cldr-icu-readme.txt b/intl/icu/source/data/cldr-icu-readme.txt
--- a/intl/icu/source/data/cldr-icu-readme.txt
+++ b/intl/icu/source/data/cldr-icu-readme.txt
@@ -1,11 +1,11 @@
-# Copyright (C) 2010,2012, International Business Machines Corporation and others.
+# Copyright (C) 2010-2013, International Business Machines Corporation and others.
# All Rights Reserved.
#
# Commands for regenerating ICU4C locale data (.txt files) from CLDR.
#
# The process requires local copies of
# - CLDR (the source of most of the data, and some Java tools)
-# - ICU4J (used by the conversion tools)
+# - ICU4J (used only for checking the converted data)
# - ICU4C (the destination for the new data, and the source for some of it)
# (Either check out ICU4C from Subversion, or download the additional
# icu4c-*-data.zip file so that the icu/source/data/ directory is fully
@@ -48,30 +48,26 @@
# etc.); on many systems this can be set using
# `/usr/libexec/java_home`.
#
-# XML_APIS_JAR: Complete path to xml-apis.jar (at the end of the path)
-#
-# ANT_OPTS: Two important options you may want to set:
+# ANT_OPTS: You may want to set:
#
# -Xmx1024m, to give Java more memory; otherwise it may run out
# of heap.
#
-# -DCLDR_DTD_CACHE=/tmp/cldrdtd, to set up a temp directory for
-# caching the CLDR xml dtd, to speed up data generation.
-#
# b) CLDR-related variables
#
# CLDR_DIR: Path to root of CLDR sources, below which are the common and
-# tools directories. Two other variables will be defined based
-# on this:
-# CLDR_MAIN, CLDR_JAR are defined relative to CLDR_DIR.
+# tools directories.
+# CLDR_CLASSES: Defined relative to CLDR_DIR. It only needs to be set if you
+# are not running ant jar for CLDR and have a non-default output
+# folder for cldr-tools classes.
#
-# c) ICU-related variables:
+# c) ICU-related variables
+# These variables only need to be set if you're directly reusing the
+# commands below.
#
# ICU4C_DIR: Path to root of ICU4C sources, below which is the source dir.
#
# ICU4J_ROOT: Path to root of ICU4J sources, below which is the main dir.
-# Two other variables will be defined based on this:
-# ICU4J_JAR, UTILITIES_JAR are defined relative to ICU4J_ROOT.
#
#----
#
@@ -96,9 +92,9 @@
# to clean the correct set of files.
#
# icu/trunk/source/data/xml/ - If you are adding a new locale, break
-# iterator, collattion tailoring, or rule-based number formatter,
-# you need to add a corresponding xml file in (respectively) the
-# main/, brkitr/, collation/, or rbnf/ subdirectory here.
+# iterator, collation tailoring, or rule-based number formatter,
+# you may need to add a corresponding xml file in (respectively)
+# the main/, brkitr/, collation/, or rbnf/ subdirectory here.
#
#----
#
@@ -124,40 +120,28 @@
################################################################################
# 1a. Java and ant variables, adjust for your system
-# (here XML_APIS_JAR is set as on Mac OSX).
export JAVA_HOME=`/usr/libexec/java_home`
-export XML_APIS_JAR=/Library/Java/Extensions/xml-apis.jar
-mkdir /tmp/cldrdtd
-export ANT_OPTS="-Xmx1024m -DCLDR_DTD_CACHE=/tmp/cldrdtd"
+export ANT_OPTS="-Xmx1024m
# 1b. CLDR variables, adjust for your setup; with cygwin it might be e.g.
# CLDR_DIR=`cygpath -wp /build/cldr`
export CLDR_DIR=$HOME/cldr/trunk
-export CLDR_MAIN=$CLDR_DIR/common/main
-export CLDR_JAR=$CLDR_DIR/tools/java/cldr.jar
#export CLDR_CLASSES=$CLDR_DIR/tools/java/classes
# 1c. ICU variables
export ICU4C_DIR=$HOME/icu/icu/trunk
export ICU4J_ROOT=$HOME/icu/icu4j/trunk
-export ICU4J_JAR=$ICU4J_ROOT/icu4j.jar
-export UTILITIES_JAR=$ICU4J_ROOT/out/cldr_util/lib/utilities.jar
-#export ICU4J_CLASSES=$ICU4J_ROOT/out/cldr_util/bin
-# 2. Build ICU4J, including the cldr utilities.
-
-cd $ICU4J_ROOT
-ant clean all jar cldrUtil
-
-# 3. Build the CLDR Java tools
+# 2. Build the CLDR Java tools
cd $CLDR_DIR/tools/java
+#cd $CLDR_DIR/cldr-tools
ant jar
-# 4. Configure ICU4C, build and test without new data first, to verify that
+# 3. Configure ICU4C, build and test without new data first, to verify that
# there are no pre-existing errors (configure shown here for MacOSX, adjust
# for your platform).
@@ -166,25 +150,25 @@ cd $ICU4C_DIR/source
make all 2>&1 | tee /tmp/icu4c-oldData-makeAll.txt
make check 2>&1 | tee /tmp/icu4c-oldData-makeCheck.txt
-# 5. Build the new ICU4C data files; these include .txt files and .mk files.
+# 4. Build the new ICU4C data files; these include .txt files and .mk files.
# These new files will replace whatever was already present in the ICU4C sources.
# This process uses ant with ICU's data/build.xml and data/icu-config.xml to
# operate (via CLDR's ant/CLDRConverterTool.java and ant/CLDRBuild.java) the
# necessary CLDR tools including LDML2ICUConverter, ConvertTransforms, etc.
-# This process will take several minutes (CLDR_DTD_CACHE helps reduce this).
+# This process will take several minutes.
# Keep a log so you can investigate anything that looks suspicious.
cd $ICU4C_DIR/source/data
ant clean
ant all 2>&1 | tee /tmp/cldrNN-buildLog.txt
-# 6. Check which data files have modifications, which have been added or removed
+# 5. Check which data files have modifications, which have been added or removed
# (if there are no changes, you may not need to proceed further). Make sure the
# list seems reasonable.
svn status
-# 7. Fix any errors, investigate any warnings. Some warnings are expected,
+# 6. Fix any errors, investigate any warnings. Some warnings are expected,
# including warnings for missing versions in locale names which specify some
# collationvariants, e.g.
# [cldr-build] WARNING (ja_JP_TRADITIONAL): No version #??
@@ -194,39 +178,39 @@ svn status
# [cldr-build] WARNING (to): warning: No collations found. Bundle will ...
#
# Fixing may entail modifying CLDR source data or tools - for example,
-# updating the validSubLocales for collation data (file a bug f appropriate).
-# Repeat steps 5-7 until there are no build errors and no unexpected
+# updating the validSubLocales for collation data (file a bug if appropriate).
+# Repeat steps 4-5 until there are no build errors and no unexpected
# warnings.
-# 8. Now rebuild ICU4C with the new data and run make check tests.
+# 7. Now rebuild ICU4C with the new data and run make check tests.
# Again, keep a log so you can investigate the errors.
cd $ICU4C_DIR/source
make check 2>&1 | tee /tmp/icu4c-newData-makeCheck.txt
-# 9. Investigate each test case failure. The first run processing new CLDR data
+# 8. Investigate each test case failure. The first run processing new CLDR data
# from the Survey Tool can result in thousands of failures (in many cases, one
# CLDR data fix can resolve hundreds of test failures). If the error is caused
# by bad CLDR data, then file a CLDR bug, fix the data, and regenerate from
-# step 5a. If the data is OK but the testcase needs to be updated because the
+# step 4. If the data is OK but the testcase needs to be updated because the
# data has legitimately changed, then update the testcase. You will check in
# the updated testcases along with the new ICU data at the end of this process.
# Note that if the new data has any differences in structure, you will have to
# update test/testdata/structLocale.txt or /tsutil/cldrtest/TestLocaleStructure
# may fail.
-# Repeat steps 5-8 until there are no errors.
+# Repeat steps 4-7 until there are no errors.
-# 10. Now run the make check tests in exhaustive mode:
+# 9. Now run the make check tests in exhaustive mode:
cd $ICU4C_DIR/source
export INTLTEST_OPTS="-e"
export CINTLTST_OPTS="-e"
make check 2>&1 | tee /tmp/icu4c-newData-makeCheckEx.txt
-# 11. Again, investigate each failure, fixing CLDR data or ICU test cases as
-# appropriate, and repeating steps 5-7 and 10 until there are no errors.
+# 10. Again, investigate each failure, fixing CLDR data or ICU test cases as
+# appropriate, and repeating steps 4-7 and 9 until there are no errors.
-# 12. Now with ICU4J, build and test without new data first, to verify that
+# 11. Now with ICU4J, build and test without new data first, to verify that
# there are no pre-existing errors (or at least to have the pre-existing errors
# as a base for comparison):
@@ -234,26 +218,26 @@ cd $ICU4J_ROOT
ant all 2>&1 | tee /tmp/icu4j-oldData-antAll.txt
ant check 2>&1 | tee /tmp/icu4j-oldData-antCheck.txt
-# 13. Now build the new data for ICU4J
+# 12. Now build the new data for ICU4J
cd $ICU4C_DIR/source/data
make icu4j-data-install
-# 14. Now rebuild ICU4J with the new data and run tests:
+# 13. Now rebuild ICU4J with the new data and run tests:
# Keep a log so you can investigate the errors.
cd $ICU4J_ROOT
ant check 2>&1 | tee /tmp/icu4j-newData-antCheck.txt
-# 15. Investigate test case failures; fix test cases and repeat from step 14,
-# or fix CLDR data and repeat from step 5, as appropriate, unitl; there are no
+# 14. Investigate test case failures; fix test cases and repeat from step 12,
+# or fix CLDR data and repeat from step 4, as appropriate, until; there are no
# more failures in ICU4C or ICU4J (except failures that were present before you
# began testing the new CLDR data).
-# 16. Check the file changes; then svn add or svn remove as necessary, and
+# 15. Check the file changes; then svn add or svn remove as necessary, and
# commit the changes.
-cd $ICU4C_DIR/source/
+cd $ICU4C_DIR/source
svn status
# add or remove as necessary, then commit
@@ -261,7 +245,7 @@ cd $ICU4J_ROOT
svn status
# add or remove as necessary, then commit
-# 17. For an official CLDR data integration into ICU, now tag the CLDR, ICU4J,
+# 16. For an official CLDR data integration into ICU, now tag the CLDR, ICU4J,
# and ICU4C sources with an appropriate CLDR milestone (you can check previous
# tags for format), e.g.:
diff --git a/intl/icu/source/data/coll/af.txt b/intl/icu/source/data/coll/af.txt
--- a/intl/icu/source/data/coll/af.txt
+++ b/intl/icu/source/data/coll/af.txt
@@ -1,20 +1,20 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/common/collation/af.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /common/collation/af.xml
// *
// ***************************************************************************
/**
- * ICU source: /xml/collation/af.xml
+ * ICU source: /xml/collation/af.xml
*/
af{
- Version{"2.0.58.16"}
+ Version{"2.0.89.0"}
collations{
standard{
Sequence{"&N<<<ʼn"}
- Version{"22.1.1"}
+ Version{"24"}
}
}
}
diff --git a/intl/icu/source/data/coll/af_NA.txt b/intl/icu/source/data/coll/af_NA.txt
--- a/intl/icu/source/data/coll/af_NA.txt
+++ b/intl/icu/source/data/coll/af_NA.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "af"
*/
af_NA{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/af_ZA.txt b/intl/icu/source/data/coll/af_ZA.txt
--- a/intl/icu/source/data/coll/af_ZA.txt
+++ b/intl/icu/source/data/coll/af_ZA.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "af"
*/
af_ZA{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar.txt b/intl/icu/source/data/coll/ar.txt
--- a/intl/icu/source/data/coll/ar.txt
+++ b/intl/icu/source/data/coll/ar.txt
@@ -1,20 +1,24 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/common/collation/ar.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /common/collation/ar.xml
// *
// ***************************************************************************
/**
- * ICU source: /xml/collation/ar.xml
+ * ICU source: /xml/collation/ar.xml
*/
ar{
- Version{"2.0.76.11"}
+ Version{"2.0.89.0"}
collations{
standard{
- Sequence{"&ت<<ة<<<ﺔ<<<ﺓ&ي<<ى<<<ﯨ<<<ﯩ<<<ﻰ<<<ﻯ<<<ﲐ<<<ﱝ"}
- Version{"22.1.1"}
+ Sequence{
+ "[reorder Arab]"
+ "&ت<<ة<<<ﺔ<<<ﺓ"
+ "&ي<<ى<<<ﯨ<<<ﯩ<<<ﻰ<<<ﻯ<<<ﲐ<<<ﱝ"
+ }
+ Version{"24"}
}
}
}
diff --git a/intl/icu/source/data/coll/ar_001.txt b/intl/icu/source/data/coll/ar_001.txt
--- a/intl/icu/source/data/coll/ar_001.txt
+++ b/intl/icu/source/data/coll/ar_001.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_001{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_AE.txt b/intl/icu/source/data/coll/ar_AE.txt
--- a/intl/icu/source/data/coll/ar_AE.txt
+++ b/intl/icu/source/data/coll/ar_AE.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_AE{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_BH.txt b/intl/icu/source/data/coll/ar_BH.txt
--- a/intl/icu/source/data/coll/ar_BH.txt
+++ b/intl/icu/source/data/coll/ar_BH.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_BH{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_DJ.txt b/intl/icu/source/data/coll/ar_DJ.txt
--- a/intl/icu/source/data/coll/ar_DJ.txt
+++ b/intl/icu/source/data/coll/ar_DJ.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_DJ{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_DZ.txt b/intl/icu/source/data/coll/ar_DZ.txt
--- a/intl/icu/source/data/coll/ar_DZ.txt
+++ b/intl/icu/source/data/coll/ar_DZ.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_DZ{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_EG.txt b/intl/icu/source/data/coll/ar_EG.txt
--- a/intl/icu/source/data/coll/ar_EG.txt
+++ b/intl/icu/source/data/coll/ar_EG.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_EG{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_EH.txt b/intl/icu/source/data/coll/ar_EH.txt
--- a/intl/icu/source/data/coll/ar_EH.txt
+++ b/intl/icu/source/data/coll/ar_EH.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_EH{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_ER.txt b/intl/icu/source/data/coll/ar_ER.txt
--- a/intl/icu/source/data/coll/ar_ER.txt
+++ b/intl/icu/source/data/coll/ar_ER.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_ER{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_IL.txt b/intl/icu/source/data/coll/ar_IL.txt
--- a/intl/icu/source/data/coll/ar_IL.txt
+++ b/intl/icu/source/data/coll/ar_IL.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_IL{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_IQ.txt b/intl/icu/source/data/coll/ar_IQ.txt
--- a/intl/icu/source/data/coll/ar_IQ.txt
+++ b/intl/icu/source/data/coll/ar_IQ.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_IQ{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_JO.txt b/intl/icu/source/data/coll/ar_JO.txt
--- a/intl/icu/source/data/coll/ar_JO.txt
+++ b/intl/icu/source/data/coll/ar_JO.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_JO{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_KM.txt b/intl/icu/source/data/coll/ar_KM.txt
--- a/intl/icu/source/data/coll/ar_KM.txt
+++ b/intl/icu/source/data/coll/ar_KM.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_KM{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_KW.txt b/intl/icu/source/data/coll/ar_KW.txt
--- a/intl/icu/source/data/coll/ar_KW.txt
+++ b/intl/icu/source/data/coll/ar_KW.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_KW{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_LB.txt b/intl/icu/source/data/coll/ar_LB.txt
--- a/intl/icu/source/data/coll/ar_LB.txt
+++ b/intl/icu/source/data/coll/ar_LB.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_LB{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_LY.txt b/intl/icu/source/data/coll/ar_LY.txt
--- a/intl/icu/source/data/coll/ar_LY.txt
+++ b/intl/icu/source/data/coll/ar_LY.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_LY{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_MA.txt b/intl/icu/source/data/coll/ar_MA.txt
--- a/intl/icu/source/data/coll/ar_MA.txt
+++ b/intl/icu/source/data/coll/ar_MA.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_MA{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_MR.txt b/intl/icu/source/data/coll/ar_MR.txt
--- a/intl/icu/source/data/coll/ar_MR.txt
+++ b/intl/icu/source/data/coll/ar_MR.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_MR{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_OM.txt b/intl/icu/source/data/coll/ar_OM.txt
--- a/intl/icu/source/data/coll/ar_OM.txt
+++ b/intl/icu/source/data/coll/ar_OM.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_OM{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_PS.txt b/intl/icu/source/data/coll/ar_PS.txt
--- a/intl/icu/source/data/coll/ar_PS.txt
+++ b/intl/icu/source/data/coll/ar_PS.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_PS{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_QA.txt b/intl/icu/source/data/coll/ar_QA.txt
--- a/intl/icu/source/data/coll/ar_QA.txt
+++ b/intl/icu/source/data/coll/ar_QA.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_QA{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_SA.txt b/intl/icu/source/data/coll/ar_SA.txt
--- a/intl/icu/source/data/coll/ar_SA.txt
+++ b/intl/icu/source/data/coll/ar_SA.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_SA{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_SD.txt b/intl/icu/source/data/coll/ar_SD.txt
--- a/intl/icu/source/data/coll/ar_SD.txt
+++ b/intl/icu/source/data/coll/ar_SD.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_SD{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_SO.txt b/intl/icu/source/data/coll/ar_SO.txt
--- a/intl/icu/source/data/coll/ar_SO.txt
+++ b/intl/icu/source/data/coll/ar_SO.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_SO{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_SY.txt b/intl/icu/source/data/coll/ar_SY.txt
--- a/intl/icu/source/data/coll/ar_SY.txt
+++ b/intl/icu/source/data/coll/ar_SY.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_SY{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_TD.txt b/intl/icu/source/data/coll/ar_TD.txt
--- a/intl/icu/source/data/coll/ar_TD.txt
+++ b/intl/icu/source/data/coll/ar_TD.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_TD{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_TN.txt b/intl/icu/source/data/coll/ar_TN.txt
--- a/intl/icu/source/data/coll/ar_TN.txt
+++ b/intl/icu/source/data/coll/ar_TN.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_TN{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/ar_YE.txt b/intl/icu/source/data/coll/ar_YE.txt
--- a/intl/icu/source/data/coll/ar_YE.txt
+++ b/intl/icu/source/data/coll/ar_YE.txt
@@ -1,17 +1,14 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/icu-config.xml & build.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /icu-config.xml & build.xml
// *
// ***************************************************************************
/**
* validSubLocale of "ar"
*/
ar_YE{
- /**
- * so genrb doesn't issue warnings
- */
___{""}
}
diff --git a/intl/icu/source/data/coll/as.txt b/intl/icu/source/data/coll/as.txt
--- a/intl/icu/source/data/coll/as.txt
+++ b/intl/icu/source/data/coll/as.txt
@@ -1,20 +1,25 @@
// ***************************************************************************
// *
-// * Copyright (C) 2012 International Business Machines
-// * Corporation and others. All Rights Reserved.
-// * Tool: com.ibm.icu.dev.tool.cldr.LDML2ICUConverter.java
-// * Source File:/common/collation/as.xml
+// * Copyright (C) 2013 International Business Machines
+// * Corporation and others. All Rights Reserved.
+// * Tool: org.unicode.cldr.icu.NewLdml2IcuConverter
+// * Source File: /common/collation/as.xml
// *
// ***************************************************************************
/**
- * ICU source: /xml/collation/as.xml
+ * ICU source: