diff options
author | Stefan Hoffmann <stefan991@gmail.com> | 2014-04-05 13:51:48 +0200 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-05 20:19:38 -0300 |
commit | e76249c813192aa082060d024b66f11d95d09b51 (patch) | |
tree | b85521e6135f487f4dd7b7df9d3f4965e37f0246 /src/os_unix.c | |
parent | a8013f2bb1b7e62c273f7a7da58653aa82e9c5ca (diff) | |
download | rneovim-e76249c813192aa082060d024b66f11d95d09b51.tar.gz rneovim-e76249c813192aa082060d024b66f11d95d09b51.tar.bz2 rneovim-e76249c813192aa082060d024b66f11d95d09b51.zip |
Moved mch_get_host_name and renamed it to os_get_hostanme
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 27 |
1 files changed, 0 insertions, 27 deletions
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 |