From 30e59fc03d1b822e39b0fb2f404d97d9f7a19155 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Thu, 11 Dec 2003 18:40:46 +0000 Subject: [PATCH] ICU-3456 Make HP-UX more thread safe. X-SVN-Rev: 14101 --- icu4c/readme.html | 19 ++++++++----------- icu4c/source/config/mh-hpux-acc | 7 ++++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/icu4c/readme.html b/icu4c/readme.html index 57eecacc315..d9d291ffa9b 100644 --- a/icu4c/readme.html +++ b/icu4c/readme.html @@ -1420,16 +1420,13 @@ del common/libicuuc.so

Using ICU in a Multithreaded Environment on HP-UX

-

If you are building ICU with a newer aCC compiler, or you are planning - on using any RogueWave libraries, you will need to set special flags before - building ICU. These flags are needed in order to make ICU thread safe and - to allow iostream to work properly. More information about the -mt - and If you are building ICU with a newer aCC compiler and you are planning + on using any RogueWave libraries, you will need to set a special flag before + building ICU. The - -AA options can be found in the HP aCC documentation.

+ -AA flag is needed in order to make ICU thread safe with RogueWave.

-CFLAGS="-mt" CXXFLAGS="-mt -AA" LDFLAGS="-mt" ./runConfigureICU HP-UX11ACC
+CXXFLAGS="-AA" ./runConfigureICU HP-UX11ACC
 

char * strings in @@ -1438,9 +1435,9 @@ del common/libicuuc.so

The C/C++ languages do not provide a portable way to specify Unicode code point or string literals other than with arrays of numeric constants. For convenience, ICU4C tends to use char * strings in places where only - "invariant characters" are used — a portable subset of the 7-bit - ASCII repertoire — so that locale IDs, charset names, resource bundle - item keys and similar can be easily specified as string literals in the + "invariant characters" (a portable subset of the 7-bit ASCII + repertoire) are used. This allows locale IDs, charset names, resource bundle + item keys and similar items to be easily specified as string literals in the source code. The same types of strings are also stored as "invariant character" char * strings in the ICU data files.

diff --git a/icu4c/source/config/mh-hpux-acc b/icu4c/source/config/mh-hpux-acc index b5b5c137fa2..1edfa2de088 100644 --- a/icu4c/source/config/mh-hpux-acc +++ b/icu4c/source/config/mh-hpux-acc @@ -3,7 +3,7 @@ ## Copyright (c) 1999-2003, International Business Machines Corporation and ## others. All Rights Reserved. ## -## $Id: mh-hpux-acc,v 1.35 2003/12/04 22:04:51 grhoten-oss Exp $ +## $Id: mh-hpux-acc,v 1.36 2003/12/11 18:40:38 grhoten-oss Exp $ ## Commands to generate dependency files GEN_DEPS.c= : @@ -13,6 +13,11 @@ GEN_DEPS.cc= : SHAREDLIBCFLAGS = +z SHAREDLIBCXXFLAGS = +z +## Additional flags when building libraries with threads +## We use this instead of -mt, which isn't available in all versions of aCC +## Our tools won't compile with -D_POSIX_C_SOURCE=199506L +THREADSCPPFLAGS = -D_REENTRANT -D_THREAD_SAFE + # Use Extended ANSI mode, which is useful for 64-bit numbers # +Olibcalls uses intrinsic functions for strlen and others # +W ignores some warnings