summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 13:34:19 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-11 13:34:19 -0800
commit83316566121745b6e1a0c3f4dbce06241ee29ecd (patch)
treeed49778037d543022a820d6b08be649f03b2cb72
parentb51706a073ca1f7f43d6fab1710e16a08ffd108c (diff)
unifdef USG
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/Initialize.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/Initialize.c b/src/Initialize.c
index 5d2c92a..1380e06 100644
--- a/src/Initialize.c
+++ b/src/Initialize.c
@@ -101,14 +101,6 @@ in this Software without prior written authorization from The Open Group.
#define XtInitialize _XtInitialize
#endif /* (SUNSHLIB || AIXSHLIB) && SHAREDCODE */
-#ifdef USG
-#define USE_UNAME
-#endif
-
-#ifdef USE_UNAME
-#include <sys/utsname.h>
-#endif
-
/* some unspecified magic number of expected search levels for Xrm */
#define SEARCH_LIST_SIZE 1000
@@ -156,27 +148,12 @@ static XrmOptionDescRec const opTable[] = {
static void
GetHostname(char *buf, int maxlen)
{
-#ifdef USE_UNAME
- int len;
- struct utsname name;
-
- if (maxlen <= 0 || buf == NULL)
- return;
-
- uname(&name);
- len = strlen(name.nodename);
- if (len >= maxlen)
- len = maxlen;
- (void) strncpy(buf, name.nodename, len - 1);
- buf[len - 1] = '\0';
-#else
if (maxlen <= 0 || buf == NULL)
return;
buf[0] = '\0';
(void) gethostname(buf, (size_t) maxlen);
buf[maxlen - 1] = '\0';
-#endif
}
#ifdef SUNSHLIB