HP-UX 11i June 2001 Release Notes
Programming
Changes to confstr(3C) (new at 11i original release)
Chapter 13272
bufsize=confstr(_CS_MACHINE_IDENT,NULL,(size_t)0);
buffer=(char *)malloc(bufsize+1);
confstr(_CS_MACHINE_IDENT,buffer,bufsize+1);
The first line will return the length of the string to be returned, allocate
memory based on this value, then call confstr() again to get the actual
value.