On 11/28/2010 08:56 AM, Bruno Haible wrote: > So what the gnulib replacement was doing, was to return a > dummy string instead of calling the system's function. It is better > to call the system's function.
<http://www.sun.com/software/solaris/programs/abi/appcert_faq.xml#q18> says that libnsl's getdomainname is a private interface, which (presumably) means that gnulib should not use it. It says that for the NIS domain (which is what the code currently says it wants) the code should use sysinfo(SI_SRPC_DOMAIN). But before we get too deeply into this, who needs getdomainname and why? If the caller wants the DNS domain, they could well be barking up the wrong tree here.