summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas <Coquinho@users.noreply.github.com>2020-07-22 15:23:59 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-12-15 16:10:26 -0300
commitb0fbb1020870b445a80dcbaf120d87985d2d8b54 (patch)
treea976b2126eab2d469063468ce68a7035b3b19e1e
parentedb195cfd28b0c09bda888d2f05d8fc808a5cd2f (diff)
evil: Define file creation flags and file status flags for fcntl
UCRT `fcntl.h` already define those as `_<FLAG>` and by defining `_CRT_DECLARE_NONSTDC_NAMES` it does a `#define _<FLAG> <FLAG>` making them available the way a POSIX system expects.
-rw-r--r--src/lib/evil/evil_fcntl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/evil/evil_fcntl.h b/src/lib/evil/evil_fcntl.h
index 1930a18e7f..f988de5fe9 100644
--- a/src/lib/evil/evil_fcntl.h
+++ b/src/lib/evil/evil_fcntl.h
@@ -4,6 +4,19 @@
4 4
5# include <sys/types.h> 5# include <sys/types.h>
6 6
7#if _MSC_VER
8# define _CRT_DECLARE_NONSTDC_NAMES 1
9# include <fcntl.h>
10# undef _CRT_DECLARE_NONSTDC_NAMES
11#endif
12
13/**
14 * @def O_ACCMODE
15 * O_ACCMODE is an AND mask to extract file access modes.
16 */
17#ifdef _MSC_VER
18# define O_ACCMODE 3
19#endif
7 20
8/** 21/**
9 * @def FD_CLOEXEC 22 * @def FD_CLOEXEC