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

Using Archiving Utilities......................................................................................................37
The tar Utility................................................................................................................37
The pax Utility..............................................................................................................37
Working on the NonStop System..............................................................................................38
C and C++ Compilation Using the c89 Utility........................................................................38
C and C++ Compilation Using the c99 Utility........................................................................38
Compiling Using the TNS/R Native C Compiler.....................................................................39
Compiling Using the TNS C Compiler..................................................................................39
TNS/R Native c89 Flags and TNS c89 Flags .......................................................................40
Displaying c89 or c99 Help................................................................................................40
Differences in Handling Input Files.......................................................................................40
Linking Your Program Modules.............................................................................................40
Compiling and Linking With the c89 or c99 Utility............................................................40
Using nld to Link Native Object Files................................................................................41
Using ld or eld to Link Native Linkfiles..............................................................................41
Using Binder for TNS Object Files...................................................................................41
File Locations for c89 and c99 Files......................................................................................42
Native c89 and c99 Standard Include Directories..............................................................42
Native c89 and c99 Standard Library Directories..............................................................42
Native c89 and c99 Installation Locations........................................................................42
TNS c89 Standard Include Directories..............................................................................42
TNS c89 Standard Library Directories..............................................................................42
TNS c89 Installation Locations........................................................................................42
c89 and c99 Utility Examples..............................................................................................42
Editing OSS Files...............................................................................................................43
Editing OSS Files Using vi..............................................................................................43
Editing OSS Files Using emacs........................................................................................44
Using the Debuggers With OSS Files....................................................................................44
Debugging Native Program Files.....................................................................................45
Running the Debuggers .................................................................................................45
OSS Environment Considerations.....................................................................................46
Using the noft and enoft Utilities on Native Program Files........................................................46
3 Useful Porting Tools...................................................................................48
lint Tool.................................................................................................................................48
findcalls Tool..........................................................................................................................49
CodeCheck Tool.....................................................................................................................49
Open Systems Portability Checker (OSPC) Tool...........................................................................50
Code Coverage Tool...............................................................................................................51
4 Interoperating Between User Environments...................................................52
Purpose of Interoperability.......................................................................................................52
C Programming and Interoperability.....................................................................................53
Scopes of Interoperability....................................................................................................54
The OSS User Environment.......................................................................................................54
OSS Shell.........................................................................................................................54
Factors Affecting Shell Operation.........................................................................................54
Shell Start-Up Files.........................................................................................................55
Option Values..............................................................................................................55
Variable Values.............................................................................................................55
PATH Variable..........................................................................................................55
PSn Variable............................................................................................................56
Aliases and Functions....................................................................................................56
stty Settings..................................................................................................................56
Line and History Editing.................................................................................................56
VISUAL or EDITOR Variables......................................................................................56
4 Contents