aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/win_defs.h
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2016-01-11 01:37:15 -0500
committerMichael Reed <m.reed@mykolab.com>2016-01-12 12:26:15 -0500
commitf65d58907d9ff613294c496fb54cc0e9c8e6ad73 (patch)
tree886d01223fa0a6f63f8bda0d9f0ca7e1e2c31a4f /src/nvim/os/win_defs.h
parenta1c770ca2713b2d269f75390fede83c678b6e3df (diff)
downloadrneovim-f65d58907d9ff613294c496fb54cc0e9c8e6ad73.tar.gz
rneovim-f65d58907d9ff613294c496fb54cc0e9c8e6ad73.tar.bz2
rneovim-f65d58907d9ff613294c496fb54cc0e9c8e6ad73.zip
os/*_defs.h: MAXNAMLEN cleanup
For non-Windows systems, we assume that NAME_MAX is in <limits.h>, 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
Diffstat (limited to 'src/nvim/os/win_defs.h')
-rw-r--r--src/nvim/os/win_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 698f41b3ca..e6a714601f 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -5,6 +5,8 @@
#include <sys/stat.h>
#include <stdio.h>
+#define NAME_MAX _MAX_PATH
+
#define TEMP_DIR_NAMES {"$TMP", "$TEMP", "$USERPROFILE", ""}
#define TEMP_FILE_PATH_MAXLEN _MAX_PATH