From f65d58907d9ff613294c496fb54cc0e9c8e6ad73 Mon Sep 17 00:00:00 2001 From: Michael Reed Date: Mon, 11 Jan 2016 01:37:15 -0500 Subject: os/*_defs.h: MAXNAMLEN cleanup For non-Windows systems, we assume that NAME_MAX is in , as specified in POSIX.1-2008[1]. For Windows, which doesn't have NAME_MAX, just define it ourselves to _MAX_PATH[2]. Also, remove two (now unused) HAVE_*_H checks. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html [2]: https://msdn.microsoft.com/en-us/library/930f87yf.aspx Helped-by: Seth Jackson --- src/nvim/os/unix_defs.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/nvim/os/unix_defs.h') diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h index 4af468f8d9..78fc9331d1 100644 --- a/src/nvim/os/unix_defs.h +++ b/src/nvim/os/unix_defs.h @@ -1,13 +1,12 @@ #ifndef NVIM_OS_UNIX_DEFS_H #define NVIM_OS_UNIX_DEFS_H +// Windows doesn't have unistd.h, so we include it here to avoid numerous +// instances of `#ifdef HAVE_UNISTD_H'. #include -#include -// Defines BSD, if it's a BSD system. -#ifdef HAVE_SYS_PARAM_H -# include -#endif +// POSIX.1-2008 says that NAME_MAX should be in here +#include #define TEMP_DIR_NAMES {"$TMPDIR", "/tmp", ".", "~"} #define TEMP_FILE_PATH_MAXLEN 256 -- cgit