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
The Development Environment
Open System Services Porting Guide—520573-006
2-15
C and C++ Compilation Using the c89 Utility
Native c89 Standard Include Directories
The standard C and C++ header files for the native C compilers are in the
/usr/include directory for the OSS environment; for UNIX workstations, they are in
the /usr/vendor/tndm_complrs/usr/include directory.
Native c89 Standard Library Directories
For native environments, the linker searches a list of standard library directories. For
the OSS environment, the default directories are /lib, /usr/lib, and
/usr/local/lib.
Native c89 Installation Locations
Beginning with the D40.00 RVU, the TNS/R native c89 utility is installed in the
/usr/bin directory by default. The H-series TNS/E native c89 utility is also installed
in the /usr/bin directory by default.
TNS c89 Standard Include Directories
The standard C and C++ header files for the TNS C compiler are in the
/usr/include directory for the OSS environment.
TNS c89 Standard Library Directories
For TNS c89, the linker searches a default list of standard library directories specified
by -L flags. For the G-series OSS environment, it is the /nonnative/usr/lib
directory. When using the -L flag, c89 searches the default library directories after
those specified by the -L flag.
TNS c89 Installation Locations
Beginning with the D40.00 RVU, the c89 utility for generating TNS object files is
installed in the /nonnative/usr/bin directory by default.
c89 Utility Examples
•
The following example compiles test.c and produces an a.out executable file:
c89 test.c
•
The following example compiles source code modules x.c, y.c, and z.c; links
the object files into an executable file called tst; and produces symbolic
information for debugging:
c89 -g -o tst x.c y.c z.c
•
The following example compiles file.c and links the native object file into an
executable file called a.out in the current working directory. The native C compiler
is used.
c89 file.c -lc -WBstatic -larchive -WBdynamic -lnative