HP-UX 11i Release Notes (December 2000)

Programming
Changes to confstr(3C) (new)
Chapter 13 269
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.