ICU-408 HPUX 10/11 CC port

X-SVN-Rev: 1533
This commit is contained in:
Helena Chapman 2000-06-01 18:27:44 +00:00
parent 7eed939820
commit 3fc21cb0f4
3 changed files with 25 additions and 9 deletions

View File

@ -58,7 +58,12 @@ void CompoundTransliteratorTest::TestConstruction(){
Transliterator* transarray3[]={t4, t1, t2}; Transliterator* transarray3[]={t4, t1, t2};
Transliterator* transarray4[]={t1, t2, t3, t4}; Transliterator* transarray4[]={t1, t2, t3, t4};
Transliterator** transarray[]={transarray1, transarray2, transarray3, transarray4}; Transliterator** transarray[4];
transarray[0] = transarray1;
transarray[1] = transarray2;
transarray[2] = transarray3;
transarray[3] = transarray4;
const UnicodeString IDs[]={ const UnicodeString IDs[]={
names[0], names[0],
names[0]+";"+names[3], names[0]+";"+names[3],

View File

@ -576,22 +576,22 @@ void TransliteratorTest::TestJ277(void) {
void TransliteratorTest::TestJ243(void) { void TransliteratorTest::TestJ243(void) {
UErrorCode status = U_ZERO_ERROR; UErrorCode status = U_ZERO_ERROR;
#if !defined(HPUX)
// Test default Hex-Unicode, which should handle // Test default Hex-Unicode, which should handle
// \u, \U, u+, and U+ // \u, \U, u+, and U+
HexToUnicodeTransliterator hex; HexToUnicodeTransliterator hex;
expect(hex, "\\u0041+\\U0042,u+0043uu+0044z", "A+B,CuDz"); expect(hex, "\\u0041+\\U0042,u+0043uu+0044z", "A+B,CuDz");
// Try a custom Hex-Unicode // Try a custom Hex-Unicode
// \uXXXX and &#xXXXX; // \uXXXX and &#xXXXX;
status = U_ZERO_ERROR; status = U_ZERO_ERROR;
HexToUnicodeTransliterator hex2("\\\\u###0;&\\#x###0\\;", status); HexToUnicodeTransliterator hex2("\\\\u###0;&\\#x###0\\;", status);
expect(hex2, "\\u61\\u062\\u0063\\u00645\\u66x0123", expect(hex2, "\\u61\\u062\\u0063\\u00645\\u66x0123",
"abcd5fx0123"); "abcd5fx0123");
// Try custom Unicode-Hex (default is tested elsewhere) // Try custom Unicode-Hex (default is tested elsewhere)
status = U_ZERO_ERROR; status = U_ZERO_ERROR;
UnicodeToHexTransliterator hex3("&\\#x###0;", status); UnicodeToHexTransliterator hex3("&\\#x###0;", status);
expect(hex3, "012", "012"); expect(hex3, "012", "012");
#endif
} }
/** /**

View File

@ -4,6 +4,23 @@
* others. All Rights Reserved. * others. All Rights Reserved.
********************************************************************/ ********************************************************************/
#if defined(hpux)
# ifndef _INCLUDE_POSIX_SOURCE
# define _INCLUDE_POSIX_SOURCE
# endif
# ifndef _INCLUDE_XOPEN_SOURCE
# define _INCLUDE_XOPEN_SOURCE
# endif
# ifndef _INCLUDE_XOPEN_SOURCE_EXTENDED
# define _INCLUDE_XOPEN_SOURCE_EXTENDED
# endif
# ifndef _XPG4_EXTENDED
# define _XPG4_EXTENDED
# endif
# include <sys/newsig.h>
# include <sys/types.h>
#endif
#include <unicode/umachine.h> #include <unicode/umachine.h>
#if !defined(WIN32) && !defined(XP_MAC) #if !defined(WIN32) && !defined(XP_MAC)
@ -13,12 +30,6 @@
#if defined(POSIX)||defined(SOLARIS)||defined(AIX)||defined(HPUX) #if defined(POSIX)||defined(SOLARIS)||defined(AIX)||defined(HPUX)
#define HAVE_IMP #define HAVE_IMP
#if defined(__hpux) && defined(HPUX_CMA)
# ifndef _INCLUDE_POSIX_SOURCE
# define _INCLUDE_POSIX_SOURCE
# endif
#endif
#include <pthread.h> #include <pthread.h>
#if defined(__hpux) && defined(HPUX_CMA) #if defined(__hpux) && defined(HPUX_CMA)