summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-15 15:56:32 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-21 11:08:01 -0700
commitbcc112ca1ba3505899d97ef0502fcb0fb4d6e0a0 (patch)
treed84cc196e3a6a671e4353f9abbb9e081e9fc62a8
parente3cad27560774ca1a5587d26900c1bd09bad7dfc (diff)
downloadxorg-lib-libXmu-bcc112ca1ba3505899d97ef0502fcb0fb4d6e0a0.tar.gz
XmuGetHostname: Drop support for ancient USG systems
USG was defined for a handful of pre-SVR4 systems based on AT&T's Unix System Group releases in the old imake configs and has never been defined in X11R7 modular builds. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/GetHost.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/GetHost.c b/src/GetHost.c
index 2f0bccd..fdb1741 100644
--- a/src/GetHost.c
+++ b/src/GetHost.c
@@ -42,13 +42,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xwinsock.h>
#endif
-#ifdef USG
-#define NEED_UTSNAME
-#endif
-#ifdef NEED_UTSNAME
-#include <sys/utsname.h>
-#endif
#include <X11/Xmu/SysUtil.h>
@@ -63,22 +57,9 @@ XmuGetHostname(char *buf, int maxlen)
return -1;
#endif
-#ifdef NEED_UTSNAME
- /*
- * same host name crock as in server and xinit.
- */
- struct utsname name;
-
- uname (&name);
- len = strlen (name.nodename);
- if (len >= maxlen) len = maxlen - 1;
- strncpy (buf, name.nodename, len);
- buf[len] = '\0';
-#else
buf[0] = '\0';
(void) gethostname (buf, maxlen);
buf [maxlen - 1] = '\0';
len = strlen(buf);
-#endif /* hpux */
return len;
}