Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

These macros are also available with the HP C compiler. Program behavior dependent on
these macros should be portable.
These preprocessor-defined macros:
sparc
sun
sun4
unix
These macros are not available with the HP C compiler. The equivalent behavior can be
created by using #ifdef in your header files.
Both ISO/ANSI C and Common C (also called Kernighan and Ritchie C) code, using the
following flags:
Used for ISO/ANSI C plus Common C compatibility extensions, with semantic
changes required by ISO/ANSI C to ensure that the code strictly complies with
ISO/ANSI C conventions.
-Xa
Used for maximum conformance to ISO/ANSI C, with Common C compatibility
extensions.
-Xc
Used for ISO/ANSI C plus Common C compatibility extensions, without semantic
changes required by ISO/ANSI C.
-Xt
Because applications that use strictly ISO/ANSI C semantics are the easiest to port, your
application should compile successfully with the -Xa flag before being considered ready to
port to the OSS environment.
GNU C Compiler
The GNU C compiler supports ISO/ANSI C language syntax and supports a “pedantic” mode,
which requires strict adherence ISO/ANSI C. It supports the following:
ISO/ANSI C and Common C.
Relevant compiler flags:
Supports ISO/ANSI C syntax.-ansi
Supports strict ISO/ANSI C syntax.-pedantic
Inhibits all warning messages.-w
Warns you whenever a local variable is unused aside from its declaration.-Wimplicit
Because applications that use strictly ISO/ANSI C semantics are the easiest to port, your
application should compile successfully with the -pedantic flag before being considered
ready to port to the OSS environment.
Optional additional GNU utilities:
Maintains groups of programs.gmake
The GNU debugger program.gdb
The GNU assembler program.gas
These additional utilities are not provided in the OSS environment. The proper functioning of
your application should not depend upon these tools after it is ported to the OSS environment.
C Compilation on a Workstation 167