Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide520573-006
7-13
Defined Symbols and Header Files
environment. In addition, the following header files are provided to define the interfaces
to HP extensions:
The contents of the header files in the OSS environment in /usr/include are
identical to the contents of the header files in the Guardian environment in
$SYSTEM.SYSTEM. These files support the OSS and the Guardian environments.
The system entry points are different for the same external run-time routine for each of
the memory models. The proper entry point to the system is determined by the use of
the appropriate compiler-defined symbols. In general, you do not need to be concerned
with how the proper entry point is selected in the header files. This selection is handled
by using the appropriate pragmas in the source code and symbol definitions in the
compiler command line. Defaults are used in each environment. Different memory
models used between the OSS and Guardian environments is not an issue in the
native environment, because both use the WIDE data type.
Feature-Test Macros
Feature-test macros determine which set of features is included in header files. The
following feature-test macros can be used in the OSS environment:
cextdecs.h Function prototype declarations for the Guardian procedures
sql.h Embedded SQL/MP definitions and some SQL/MX data-type
declarations
sqlcli.h Declarations for the SQL/MX C/C++ preprocessor of the command
line interface functions and data structures (provided automatically
by the preprocessor; #include is not required)
tal.h TAL condition code macros
tdmext.h Function call definitions for HP extension functions
tdmstd.h HP pragmas and toggles
__STDC__=1 When defined, all symbols defined by ISO/ANSI
C are always made visible, by default. This
macro is not defined by the user; the compiler
defines it, signifying compliance with ANSI/ISO
C. __STDC__=1 is not defined when the user
invokes the compiler to use the Common C
compiler. (Note that there are two underscores,
“__”, before and after “STDC.”)
_POSIX_SOURCE
or
_POSIX_C_SOURCE=1
When defined, all symbols defined by POSIX.1
are visible.
_POSIX_C_SOURCE=2 When defined, all symbols defined by POSIX.1
and POSIX.2 are visible.