Martin Wilck Martin.Wilck@fujitsu-siemens.com writes:
I am asking because GetComputerName() IMO returns the wrong value (FQDN rather than NETBIOS name). A real implementation of GetComputerName() would look for the above value in the Registry and use gethostname() only as a fallback, but currently it's the other way around - why ?
Because users are not going to edit the registry if their Unix hostname changes so it will always be wrong. Now if the problem is the FQDN then it should be trivial to truncate it to just the hostname.