aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-27 15:16:17 +0200
committerGitHub <noreply@github.com>2017-03-27 15:16:17 +0200
commit72c29895e0eab6b77a1f9990c642163664915bb1 (patch)
treeb49d47dd91a9dbed3d632d58545c582f41a9161d /src/nvim/os
parent7bc37ffb22a84668bba5b2e3589c4c05ad43f7d0 (diff)
parent88124dfebc1a9c7eeb149beedd52a818058f9c16 (diff)
downloadrneovim-72c29895e0eab6b77a1f9990c642163664915bb1.tar.gz
rneovim-72c29895e0eab6b77a1f9990c642163664915bb1.tar.bz2
rneovim-72c29895e0eab6b77a1f9990c642163664915bb1.zip
Merge #6375 from justinmk/check-single-includes
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/fs_defs.h2
-rw-r--r--src/nvim/os/os_defs.h4
-rw-r--r--src/nvim/os/unix_defs.h2
-rw-r--r--src/nvim/os/win_defs.h6
4 files changed, 9 insertions, 5 deletions
diff --git a/src/nvim/os/fs_defs.h b/src/nvim/os/fs_defs.h
index 0bd9c37750..2277d926b3 100644
--- a/src/nvim/os/fs_defs.h
+++ b/src/nvim/os/fs_defs.h
@@ -14,7 +14,7 @@ typedef struct {
uint64_t device_id; ///< @private The id of the device containing the file
} FileID;
-#define FILE_ID_EMPTY (FileID) {.inode = 0, .device_id = 0}
+#define FILE_ID_EMPTY (FileID) { .inode = 0, .device_id = 0 }
typedef struct {
uv_fs_t request; ///< @private The request to uv for the directory.
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index 14c210c69c..f81785675e 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -27,11 +27,11 @@
// Use up to 5 Mbyte for a buffer.
#ifndef DFLT_MAXMEM
-# define DFLT_MAXMEM (5*1024)
+# define DFLT_MAXMEM (5 * 1024)
#endif
// use up to 10 Mbyte for Vim.
#ifndef DFLT_MAXMEMTOT
-# define DFLT_MAXMEMTOT (10*1024)
+# define DFLT_MAXMEMTOT (10 * 1024)
#endif
// Note: Some systems need both string.h and strings.h (Savage). However,
diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h
index c98aa88bfa..5c9daca476 100644
--- a/src/nvim/os/unix_defs.h
+++ b/src/nvim/os/unix_defs.h
@@ -8,7 +8,7 @@
// POSIX.1-2008 says that NAME_MAX should be in here
#include <limits.h>
-#define TEMP_DIR_NAMES {"$TMPDIR", "/tmp", ".", "~"}
+#define TEMP_DIR_NAMES { "$TMPDIR", "/tmp", ".", "~" }
#define TEMP_FILE_PATH_MAXLEN 256
#define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL)
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 8de896c490..827fb2f247 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -1,6 +1,10 @@
#ifndef NVIM_OS_WIN_DEFS_H
#define NVIM_OS_WIN_DEFS_H
+#ifndef WIN32
+# error Header must be included only when compiling for Windows.
+#endif
+
// winsock2.h must be first to avoid incompatibilities
// with winsock.h (included by windows.h)
#include <winsock2.h>
@@ -15,7 +19,7 @@
#define NAME_MAX _MAX_PATH
-#define TEMP_DIR_NAMES {"$TMP", "$TEMP", "$USERPROFILE", ""}
+#define TEMP_DIR_NAMES { "$TMP", "$TEMP", "$USERPROFILE", "" }
#define TEMP_FILE_PATH_MAXLEN _MAX_PATH
#define FNAME_ILLEGAL "\"*?><|"