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

9 Porting From Specific UNIX Systems
This subsection discusses other vendors’ UNIX environments for developing or compiling C and
C++ programs that you want to port to the OSS environment. The following topics are discussed:
“The UNIX Workstation Development Environment” (page 162)
“C Compilation on a Workstation” (page 166)
“Resolving the Endian Problem” (page 168)
The UNIX Workstation Development Environment
Your UNIX workstation environment should be XPG4 compliant. Your vendor should specify whether
they are compliant in their documentation. XPG4 is a superset of POSIX.1 and POSIX.2. If a
vendor’s product has gone through the XPG4 certification, they will be branded as being XPG4
certified.
The workstation software discussed in the following subsections can affect what and how you port
applications:
“Shells” (page 162)
“Editors” (page 162)
“Development Tools” (page 163)
Shells
One or more of three shells are available on most UNIX workstations. They are:
The Bourne shell, which was developed by Bell Labs.
The C shell, which was developed by University of California, Berkeley.
The Korn shell, which was also developed by Bell Labs. The Korn shell was designed to be a
superset of both the C shell and the Bourne shell.
The POSIX.2 standard is based upon the Korn shell. Because the OSS shell implements the POSIX.2
standard, porting scripts from a Korn shell to the OSS shell is relatively easy. Applications that
depend upon shell scripts or shell commands should be carefully checked to ensure that Open
System Services supports all of the commands and command flags used within the scripts.
Editors
There are two common editors available on all UNIX workstations:
The vi editor, which is the de facto standard, full-screen editor for UNIX systems. More
information about using vi is available in the vi(1) online reference page; vi is also
available in the OSS environment.
The ed editor, which is the original line editor that comes with UNIX systems. More information
about using ed is available in the ed(1) online reference page; ed is also available in the
OSS environment.
Often, there is also an emacs editor (a public domain editor), which is a popular editor with
programmers.
Any program development or maintenance shell scripts that use either the vi or ed editor should
be portable to the OSS environment.
162 Porting From Specific UNIX Systems