improved signature of gethostname getprogname