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-UX 64-bit Porting and Transition Guide: HP 9000 Computers > Chapter 5 Writing Portable Code

Getting Configurable System Information

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Instead of hardcoding system values, use any of the portable alternatives:

  • Use sysconf(2), confstr(3C), and getconf(1) to get configurable system information, such as determining if the underlying operating system is 64 bits or 32 bits.

  • Use pathconf(2) to get configurable pathnames for files and directory values.

  • Use <limits.h> to get static system limits.

Beginning with the 11.0 release, sysconf() returns additional information:

  • the processor implementation

  • the operating system execution mode — 32 bit or 64 bit

  • whether the system is capable of running a 64-bit operating system

Additionally, the confstr() system call returns the appropriate compiler options, libraries, and lint options to build and check an application in a 32-bit or 64-bit programming environment.

For More Information:

  • See the man page for limits(5) for details on macros available in <limits.h>.

  • See the man pages for sysconf(2), confstr(3C), getconf(1), and pathconf(2).

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