HP aC++/HP C A.06.28 Programmer's Guide Integrity servers (769150-001, March 2014)

-mt
The -mt option enables multi-threading capability without the need to set any other flags, such as
-l and -D. HP aC++ examines your environment and automatically selects and sets the appropriate
flags. “Performance Options” (page 167).
There are three possible sets of flags depending on your operating system and the libstd you
use. Table 5 lists the option matrix for -mt.
Table 5 Option Matrix for -mt
FlagsLibraries
-D_REENTRANTold-lib
libstd 1.2.1
-DRW_MULTI_THREAD
(-AP)&
-DRWSTD_MULTI_THREAD
librwtool 7.0.x
-D_THREAD_SAFE
-D_POSIX_C_SOURCE=199506L
-D_HPUX_SOURCE *
-lpthread
-D_REENTRANTnew-lib
(-AA)
-D_RW_MULTI_THREAD
libstd 2.2.1
-D_RWSTD_MULTI_THREAD
-D_POSIX_C_SOURCE=199506L
-D_HPUX_SOURCE *
-lpthread
-D_REENTRANTC mode
-Ae/-Aa
-D_POSIX_C_SOURCE=199506L
-lpthread
* required if -D_POSIX_C_SOURCE is used.
NOTE: For C++ and C -Ae -D_HPUX_SOURCE is set to be compatible with the default when
-mt is not used. For C mode options -AC89, -AC99, and -Aa, -D_HPUX_SOURCE is also set. If
you do not want to use-D_HPUX_SOURCE, you can undefine it by using -U. Example:
-U_HPUX_SOURCE
The following macros are 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 available yet).
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.
66 Command-Line Options