HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

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).
80 Command-Line Options