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

Table Of Contents
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide520573-006
8-24
C Compiler Considerations for OSS Programs
OSS server programs can be initiated from the OSS shell either in the foreground or in
the background. They cannot be activated directly from the Guardian LISTNER
program, but they can be activated by the LISTNER using an intermediate Guardian
server program. A new Guardian process created by the LISTNER is passed one
command line parameter (port number and Internet address) from the PORTCONF
configuration file. The parameter is then passed to the OSS server program created by
the Guardian program.
For example, if a service request is received on port 4321 from the Internet address
130.252.3.234, the parameter ultimately passed to the OSS server program would be
4321.130.252.3.234.
More information on configuring and starting up LISTNER processes and servers can
be found in one of the following manuals:
TCP/IP Configuration and Management Manual
TCP/IPv6 Configuration and Management Manual
TCP/IP (Parallel Library) Configuration and Management Manual
The TCP/IP Programming Manual discusses starting TCP/IP servers.
C Compiler Considerations for OSS Programs
Guardian C or C++ programs have typically been built and maintained in the Guardian
environment using Guardian tools. When these programs are ported to the OSS
environment, a new set of development tools and programming constructs become
available. C is the main programming language for Open System Services. The system
type is set to OSS for all C compilations in the OSS environment and is determined in
three stages:
1. Implicitly from the host environment
2. Explicitly from the command line
3. Affirmatively in the source text
The C compiler considerations when moving a Guardian C or C++ program to the OSS
environment include the following topics:
Compiler Tools on page 8-25
Memory Models on page 8-25
Header Files on page 8-25
Include File Search Order on page 8-26
New Pragmas on page 8-26
Feature-Test Macros on page 8-26
Predefined Preprocessor Symbols on page 8-27
Linking on page 8-27