Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit
» 

DSPP Home

» HP STK home
Tru64 UNIX STK
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» FAQ
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
» DSPP
Content starts here

critical impact:

geterrno, seterrno - not available; use errno (CrUn280)

TH Impacts

Problem description

The geterrno and seterrno functions exist on Tru64 UNIX, but not on HP-UX. However, you can use errno instead.

The geterrno and seterrno functions get and set errno in a thread-safe manner.

Identifiers

C/C++ Functionsgeterrno C/C++ Functionsseterrno      

See also

  • Background information on threads impacts

Solution description

Use errno to achieve similar results.

You can use errno in a thread-safe manner on both platforms as long as the source file includes <errno.h> and one of the following conditions is true:

  • The file is compiled with the -pthread option on Tru64 UNIX or the -mt option on HP-UX.

  • The pthread.h file is included at the top of the source file.

  • The _REENTRANT feature test macro is explicitly set either on the compilation command line or before the include of errno.h. Note that while this functions properly, the use of _REENTRANT is considered obsolete.


Problem summary

classifications source types OS release severity type
TH C, C++ any HP-UX 11i version critical unavailable
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.