HP aC++/HP C A.06.20 Programmer's Guide
Table 2-4 Option Matrix for -mt
FlagsLibraries
-D_REENTRANT
-DRW_MULTI_THREAD
-DRWSTD_MULTI_THREAD
-D_THREAD_SAFE
-D_POSIX_C_SOURCE=199506L
-D_HPUX_SOURCE *
-lpthread
old-lib
libstd 1.2.1
(-AP)&
librwtool 7.0.x
-D_REENTRANT
-D_RW_MULTI_THREAD
-D_RWSTD_MULTI_THREAD
-D_POSIX_C_SOURCE=199506L
-D_HPUX_SOURCE *
-lpthread
new-lib
(-AA)
libstd 2.2.1
-D_REENTRANT
-D_POSIX_C_SOURCE=199506L
-lpthread
C mode
-Ae/-Aa
* 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.
88 Command-Line Options