Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP C/HP-UX Programmer's Guide: HP-UX Systems

Chapter 5 Programming for Portability

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Portable C programs are clear, reliable, and easily maintainable and can be easily transported from one machine to another. With few modifications, C programs written with portability in mind can be recompiled and run on different computers. For specific information on system dependencies, refer to the HP C/HP-UX Reference Manual.

The ANSI standard specifies which aspects of C are required to work the same on conforming implementations, and which can work differently. Since many ANSI-conforming compilers are available on a wide variety of platforms, it is easy to develop portable programs. HP C, when invoked in ANSI mode and used with the preprocessor (cpp), headers, libraries, and linker, conforms fully with the standard.

This chapter discusses some guidelines for making your C programs more portable. Emphasis is placed on HP C specific portability issues, especially as they relate to porting from pre-ANSI mode HP C (Kernighan and Ritchie plus BSD extensions) to ANSI mode HP C.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.