HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
New Features in Version A.03.30
Chapter 1 53
libstd | | -D_POSIX_C_SOURCE=199506L
2.2.1 | |
| -lcma | -lpthread
-----------+--------------------------------+-----------------------------------
Macros used to compile multi-thread source code:
_REENTRANT
Required by system header files that provide reentrant functions (suffixed by _r).
RW_MULTI_THREAD/_RW_MULTI_THREAD
Required by Rogue Wave toolsh++ header files and libraries. RW_MULTI_THREAD is used by toolsh++
7.0.x. _RW_MULTI_THREAD is used by toolsh++ 8.x (not yet available).
RWSTD_MULTI_THREAD/_RWSTD_MULTI_THREAD
Required by Rogue Wave standard library header files and libraries. RWSTD_MULTI_THREAD is used
by libstd 1.2.1. _RWSTD_MULTI_THREAD is used by libstd 2.2.1 when compiling with -AA.
_POSIX_C_SOURCE=199506L
Required by pthread.
Using -D__HPACC_THREAD_SAFE_RB_TREE:
The Rogue Wave Standard C++ Library 1.2.1 (libstd) and Tools.h++ 7.0.6 (librwtool) are not
thread safe if the underlying implementation rb_tree class is involved. In other words, if the tree
header file (which includes tree.cc) under /opt/aCC/include/ is used, these libraries are not
thread safe. Most likely, it is indirectly referenced by including the standard C++ library container class
map or set headers, or by including a RogueWave tools.h++ header like tvset.h, tpmset.h,
tpmset.h, tvset.h, tvmset.h, tvmset.h, tpmap.h.
Since changing the rb_tree implementation to make it thread safe would break binary compatibility,
the preprocessing macro __HPACC_THREAD_SAFE_RB_TREE must be defined. Whether or not this
macro is defined when compiling a file that includes the tree header, its use must be consistent. For
example, a new object file compiled with the macro defined should not be linked with older ones that
were compiled without the macro defined. Library providers whose library is built with the macro
defined may need to notify their users to also compile their source with the macro defined when the tree
header is included.
This macro is not set by -mt, You must set it explicitly on the command line.
_THREAD_SAFE
Required by thread safe cfront compatible libstream header files and library. For the frequently used
objects cout, cin, cerr, and clog, you can specify the -D_THREAD_SAFE compile time flag for any
file that includes <iostream.h>
. In this case, a new instance of the object is transparently created for
each thread that uses it. All instances share the same file descriptor.