diff options
-rw-r--r-- | src/Initialize.c | 23 |
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 |