While looking into memory allocation issues I noticed the xgetdomainname module. As far as I know, nobody uses it, so I propose we remove it. The getdomainname function is used for the NIS domain name, and few programs would need that nowadays, as the world has mostly moved on to LDAP etc.
xgetdomainname was written by Simon Josefsson. I checked the GNU programs I thought he might be contributing to (GnuTLS, libtasn1, nettle, Emacs, inetutils) and xgetdomainname doesn't seem to be used there any more.