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


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

HP-UX 11i v3.0 critical impact:

gai_strerror, getnameinfo - behaviour differences (CrCh397)

NW Impacts

Problem description

On HPUX 11iv3, gai_strerror and getnameinfo have been enhanced and the behaviour have been changed.

These APIs are defined under _XOPEN_SOURCE_EXTENDED macro on HPUX 11iv3 as,

const char *gai_strerror(int encode);

int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags);

Where as, on Tru64, their definitions are as follows.

char *gai_strerror(int ecode);

int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *node, size_t *nodelen, char *serv, size_t servlen, int flags);

The return value of the gai_strerror API has changed from "char *" to "const char *".

A new non-zero error code, EAI_OVERFLOW, is introduced in the getnameinfo API. It returns an EAI_OVERFLOW error if an argument buffer overflow occurs.

The type of the "hostlen" and "servlen" variables in getnameinfo is changed from size_t to socklen_t.


C/C++ Functionsgai_strerror C/C++ Functionsgetnameinfo    

See also

Solution description

Review your code and applicable manpages to determine the impact of changed behaviour of these APIs.

See also

Problem summary

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