Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide—520573-006
8-26
Include File Search Order
/usr/include/stdio.h are identical to the contents of
$SYSTEM.SYSTEM.STDIOH, for example.
Any Guardian C or C++ source code that includes completely qualified header file
names in Guardian filename syntax must be modified to use the equivalent OSS
pathname syntax.
Include File Search Order
When C or C++ source modules are compiled in the Guardian environment, the search
order for header files included in the source code is given by the SSV pragma list
provided. When using c89, #include files with names enclosed in double quotes
("") are searched for first in the current directory. The #include files with names
surrounded by angle brackets (<>) or the continued search of #include files
enclosed in double quotes occurs in the directories named with the -I flags specified
in the compiler command line in the order from left to right. Finally #include files are
searched for in the /usr/include directory.
New Pragmas
Some of the compiler pragmas used in Guardian C or C++ programs have no effect in
the OSS environment. When C or C++ program modules are compiled by c89, the
following pragmas are ignored or generate an error:
These pragmas can be removed from the C or C++ source files if the source files are
to be compiled in the OSS environment.
Feature-Test Macros
Feature-test macros control the visibility of symbols. They determine which set of
features is included in header files. The following feature-test macros can be used in
the OSS environment. Which symbols are defined by including a standard header file
is determined as described in Feature-Test Macros on page 7-13.
The feature-test macro _XOPEN_SOURCE is set by default in c89. The
_XOPEN_SOURCE macro is a superset of the _POSIX_SOURCE and
_POSIX_C_SOURCE macros. The _TANDEM_SOURCE feature-test macro is used to
make identifiers defined by HP visible.
RUNNABLE Generates executable object file
SEARCH Searches object file to resolve external references (used with
RUNNABLE)
SSV Specifies list of search subvolumes for files in #include
directives
NOXMEM Gives an error; all OSS programs are wide model