X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fmts.c;h=7c70e46b42815b561160aa744a077f7422d019b7;hb=fc71710f8695ea07d852284286b058ecb3955317;hp=f43b15dea0436e1aa09c95e1e3224acd5fa32889;hpb=736132b163f34ce9eaa5b7604f49961df9f52329;p=mmh diff --git a/sbr/mts.c b/sbr/mts.c index f43b15d..7c70e46 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -11,14 +11,9 @@ #include #include #include -#include #include #include -#ifdef HAVE_SYS_UTSNAME_H -# include -#endif - #define NOTOK (-1) #define OK 0 @@ -40,25 +35,16 @@ LocalName(void) { static char buffer[BUFSIZ] = ""; struct addrinfo hints, *res; -#ifdef HAVE_UNAME - struct utsname name; -#endif /* check if we have cached the local name */ if (buffer[0]) return buffer; memset(buffer, 0, sizeof(buffer)); -#ifdef HAVE_UNAME - /* first get our local name */ - uname(&name); - strncpy(buffer, name.nodename, sizeof(buffer) - 1); -#else /* first get our local name */ gethostname(buffer, sizeof(buffer) - 1); -#endif - /* now fully qualify our name */ + /* now fully qualify our name */ memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_family = PF_UNSPEC; @@ -72,34 +58,6 @@ LocalName(void) /* -** This is only for UUCP mail. It gets the hostname -** as part of the UUCP "domain". -*/ -char * -SystemName(void) -{ - static char buffer[BUFSIZ] = ""; - -#ifdef HAVE_UNAME - struct utsname name; -#endif - - /* check if we have cached the system name */ - if (buffer[0]) - return buffer; - -#ifdef HAVE_UNAME - uname(&name); - strncpy(buffer, name.nodename, sizeof(buffer)); -#else - gethostname(buffer, sizeof(buffer)); -#endif - - return buffer; -} - - -/* ** Get the username of current user */ char *