aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-08 20:26:18 +0100
committerGitHub <noreply@github.com>2018-03-08 20:26:18 +0100
commit9cefd83cc7b96d9a20ae8aae5ad5f2c4a02a74f4 (patch)
tree2933dd4aa96bd42eb8939c7a2afe2fcf544834f1 /src/nvim/os
parentd82621877b72ee8322a5b88adaba4edd5ad3b308 (diff)
parent0adf950ccf9a0057c552a349d79a716ff7be6f8f (diff)
downloadrneovim-9cefd83cc7b96d9a20ae8aae5ad5f2c4a02a74f4.tar.gz
rneovim-9cefd83cc7b96d9a20ae8aae5ad5f2c4a02a74f4.tar.bz2
rneovim-9cefd83cc7b96d9a20ae8aae5ad5f2c4a02a74f4.zip
Merge #8084 'build/win: support MSVC'
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/os_defs.h8
-rw-r--r--src/nvim/os/unix_defs.h3
-rw-r--r--src/nvim/os/win_defs.h4
3 files changed, 5 insertions, 10 deletions
diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h
index 87f8d214bd..f81785675e 100644
--- a/src/nvim/os/os_defs.h
+++ b/src/nvim/os/os_defs.h
@@ -4,7 +4,6 @@
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -14,13 +13,6 @@
# include "nvim/os/unix_defs.h"
#endif
-/// File descriptor number used for standard IO streams
-enum {
- OS_STDIN_FILENO = STDIN_FILENO,
- OS_STDOUT_FILENO = STDOUT_FILENO,
- OS_STDERR_FILENO = STDERR_FILENO,
-};
-
#define BASENAMELEN (NAME_MAX - 5)
// Use the system path length if it makes sense.
diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h
index 5c9daca476..60a2dfa882 100644
--- a/src/nvim/os/unix_defs.h
+++ b/src/nvim/os/unix_defs.h
@@ -1,9 +1,8 @@
#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 WIN32'.
#include <unistd.h>
+#include <sys/param.h>
// POSIX.1-2008 says that NAME_MAX should be in here
#include <limits.h>
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 8fd2e51f8b..faee06304c 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -45,6 +45,9 @@
# ifndef restrict
# define restrict __restrict
# endif
+# ifndef STDIN_FILENO
+# define STDIN_FILENO _fileno(stdin)
+# endif
# ifndef STDOUT_FILENO
# define STDOUT_FILENO _fileno(stdout)
# endif
@@ -60,6 +63,7 @@
#ifdef _MSC_VER
typedef SSIZE_T ssize_t;
+typedef int mode_t;
#endif
#ifndef SSIZE_MAX