From 83316566121745b6e1a0c3f4dbce06241ee29ecd Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 11 Feb 2024 13:34:19 -0800 Subject: unifdef USG Signed-off-by: Alan Coopersmith --- src/Initialize.c | 23 ----------------------- 1 file changed, 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 -#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 -- cgit v1.2.3