From e76249c813192aa082060d024b66f11d95d09b51 Mon Sep 17 00:00:00 2001 From: Stefan Hoffmann Date: Sat, 5 Apr 2014 13:51:48 +0200 Subject: Moved mch_get_host_name and renamed it to os_get_hostanme --- src/os_unix.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/os_unix.c') diff --git a/src/os_unix.c b/src/os_unix.c index f5bd1006b1..e90d52afa5 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -397,33 +397,6 @@ int vim_is_fastterm(char_u *name) || STRNICMP(name, "dtterm", 6) == 0; } -/* - * Insert host name is s[len]. - */ - -#ifdef HAVE_SYS_UTSNAME_H -void mch_get_host_name(char_u *s, int len) -{ - struct utsname vutsname; - - if (uname(&vutsname) < 0) - *s = NUL; - else - vim_strncpy(s, (char_u *)vutsname.nodename, len - 1); -} -#else /* HAVE_SYS_UTSNAME_H */ - -# ifdef HAVE_SYS_SYSTEMINFO_H -# define gethostname(nam, len) sysinfo(SI_HOSTNAME, nam, len) -# endif - -void mch_get_host_name(char_u *s, int len) -{ - gethostname((char *)s, len); - s[len - 1] = NUL; /* make sure it's terminated */ -} -#endif /* HAVE_SYS_UTSNAME_H */ - #if defined(USE_FNAME_CASE) || defined(PROTO) /* * Set the case of the file name, if it already exists. This will cause the -- cgit