mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 05:55:35 +00:00
ICU-3576 Make it easier to build static libraries on Windows.
X-SVN-Rev: 14514
This commit is contained in:
parent
202cc029db
commit
77f04e099c
5 changed files with 33 additions and 22 deletions
|
@ -649,7 +649,7 @@ static void udata_pathiter_dt(UDataPathIterator *iter) {
|
|||
* our common data. *
|
||||
* *
|
||||
*----------------------------------------------------------------------*/
|
||||
extern const DataHeader U_IMPORT U_ICUDATA_ENTRY_POINT;
|
||||
extern const DataHeader U_DATA_API U_ICUDATA_ENTRY_POINT;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------*
|
||||
|
|
|
@ -330,60 +330,68 @@ typedef void* UClassID;
|
|||
*/
|
||||
|
||||
/**
|
||||
* \def U_USTDIO_API
|
||||
* \def U_IO_API
|
||||
* Set to export library symbols from inside the ustdio library,
|
||||
* and to import them from outside.
|
||||
* @stable ICU 2.0
|
||||
*/
|
||||
|
||||
#if defined(U_COMBINED_IMPLEMENTATION)
|
||||
#define U_DATA_API U_EXPORT
|
||||
#define U_COMMON_API U_EXPORT
|
||||
#define U_I18N_API U_EXPORT
|
||||
#define U_LAYOUT_API U_EXPORT
|
||||
#define U_LAYOUTEX_API U_EXPORT
|
||||
#define U_USTDIO_API U_EXPORT
|
||||
#define U_IO_API U_EXPORT
|
||||
#elif defined(U_STATIC_IMPLEMENTATION)
|
||||
#define U_DATA_API
|
||||
#define U_COMMON_API
|
||||
#define U_I18N_API
|
||||
#define U_LAYOUT_API
|
||||
#define U_LAYOUTEX_API
|
||||
#define U_USTDIO_API
|
||||
#define U_IO_API
|
||||
#elif defined(U_COMMON_IMPLEMENTATION)
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_EXPORT
|
||||
#define U_I18N_API U_IMPORT
|
||||
#define U_LAYOUT_API U_IMPORT
|
||||
#define U_LAYOUTEX_API U_IMPORT
|
||||
#define U_USTDIO_API U_IMPORT
|
||||
#define U_IO_API U_IMPORT
|
||||
#elif defined(U_I18N_IMPLEMENTATION)
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_IMPORT
|
||||
#define U_I18N_API U_EXPORT
|
||||
#define U_LAYOUT_API U_IMPORT
|
||||
#define U_LAYOUTEX_API U_IMPORT
|
||||
#define U_USTDIO_API U_IMPORT
|
||||
#define U_IO_API U_IMPORT
|
||||
#elif defined(U_LAYOUT_IMPLEMENTATION)
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_IMPORT
|
||||
#define U_I18N_API U_IMPORT
|
||||
#define U_LAYOUT_API U_EXPORT
|
||||
#define U_LAYOUTEX_API U_IMPORT
|
||||
#define U_USTDIO_API U_IMPORT
|
||||
#define U_IO_API U_IMPORT
|
||||
#elif defined(U_LAYOUTEX_IMPLEMENTATION)
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_IMPORT
|
||||
#define U_I18N_API U_IMPORT
|
||||
#define U_LAYOUT_API U_IMPORT
|
||||
#define U_LAYOUTEX_API U_EXPORT
|
||||
#define U_USTDIO_API U_IMPORT
|
||||
#define U_IO_API U_IMPORT
|
||||
#elif defined(U_USTDIO_IMPLEMENTATION)
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_IMPORT
|
||||
#define U_I18N_API U_IMPORT
|
||||
#define U_LAYOUT_API U_IMPORT
|
||||
#define U_LAYOUTEX_API U_IMPORT
|
||||
#define U_USTDIO_API U_EXPORT
|
||||
#define U_IO_API U_EXPORT
|
||||
#else
|
||||
#define U_DATA_API U_IMPORT
|
||||
#define U_COMMON_API U_IMPORT
|
||||
#define U_I18N_API U_IMPORT
|
||||
#define U_LAYOUT_API U_IMPORT
|
||||
#define U_LAYOUTEX_API U_IMPORT
|
||||
#define U_USTDIO_API U_IMPORT
|
||||
#define U_IO_API U_IMPORT
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,10 +53,8 @@ U_CDECL_BEGIN
|
|||
*/
|
||||
#ifdef UTRACE_IMPL
|
||||
U_EXPORT int32_t
|
||||
#elif U_COMMON_IMPLEMENTATION
|
||||
U_CFUNC int32_t
|
||||
#else
|
||||
U_CFUNC U_IMPORT int32_t
|
||||
U_CFUNC U_COMMON_API int32_t
|
||||
#endif
|
||||
utrace_level;
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
|
||||
#include "unicode/unistr.h"
|
||||
|
||||
U_NAMESPACE_USE
|
||||
|
||||
// for unistrm.h
|
||||
/**
|
||||
* Write the contents of a UnicodeString to an ostream. This functions writes
|
||||
* the characters in a UnicodeString to an ostream. The UChars in the
|
||||
|
@ -28,17 +26,24 @@ U_NAMESPACE_USE
|
|||
*/
|
||||
#if U_IOSTREAM_SOURCE >= 199711
|
||||
#include <iostream>
|
||||
U_USTDIO_API std::ostream &operator<<(std::ostream& stream, const UnicodeString& s);
|
||||
|
||||
U_USTDIO_API std::istream &operator>>(std::istream& stream, UnicodeString& s);
|
||||
U_NAMESPACE_BEGIN
|
||||
U_IO_API std::ostream &operator<<(std::ostream& stream, const UnicodeString& s);
|
||||
|
||||
U_IO_API std::istream &operator>>(std::istream& stream, UnicodeString& s);
|
||||
U_NAMESPACE_END
|
||||
|
||||
#elif U_IOSTREAM_SOURCE >= 198506
|
||||
#include <iostream.h>
|
||||
U_USTDIO_API ostream &operator<<(ostream& stream, const UnicodeString& s);
|
||||
|
||||
U_USTDIO_API istream &operator>>(istream& stream, UnicodeString& s);
|
||||
U_NAMESPACE_BEGIN
|
||||
U_IO_API ostream &operator<<(ostream& stream, const UnicodeString& s);
|
||||
|
||||
U_IO_API istream &operator>>(istream& stream, UnicodeString& s);
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
||||
/* TODO: We should add the operator<< and the operator>> for UDate. */
|
||||
/* No operator for UChar because it can conflict with wchar_t */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define STD_OSTREAM STD_NAMESPACE ostream
|
||||
#define STD_ISTREAM STD_NAMESPACE istream
|
||||
|
||||
U_USTDIO_API STD_OSTREAM &
|
||||
U_IO_API STD_OSTREAM &
|
||||
operator<<(STD_OSTREAM& stream, const UnicodeString& str)
|
||||
{
|
||||
if(str.length() > 0) {
|
||||
|
@ -66,7 +66,7 @@ operator<<(STD_OSTREAM& stream, const UnicodeString& str)
|
|||
return stream;
|
||||
}
|
||||
|
||||
U_USTDIO_API STD_ISTREAM &
|
||||
U_IO_API STD_ISTREAM &
|
||||
operator>>(STD_ISTREAM& stream, UnicodeString& str)
|
||||
{
|
||||
/* ipfx should eat whitespace when ios::skipws is set */
|
||||
|
|
Loading…
Add table
Reference in a new issue