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.
This commit is contained in:
Lucas 2020-07-22 15:23:59 -03:00 committed by Felipe Magno de Almeida
parent edb195cfd2
commit b0fbb10208
1 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,19 @@
# include <sys/types.h>
#if _MSC_VER
# define _CRT_DECLARE_NONSTDC_NAMES 1
# include <fcntl.h>
# undef _CRT_DECLARE_NONSTDC_NAMES
#endif
/**
* @def O_ACCMODE
* O_ACCMODE is an AND mask to extract file access modes.
*/
#ifdef _MSC_VER
# define O_ACCMODE 3
#endif
/**
* @def FD_CLOEXEC