diff options
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r-- | src/nvim/macros.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h index 351fa55929..05065499f4 100644 --- a/src/nvim/macros.h +++ b/src/nvim/macros.h @@ -195,4 +195,11 @@ # define UV_BUF_LEN(x) (x) #endif +// Type of bufcnt for read/write on Windows is unsigned int, not size_t. +#if defined(WIN32) +# define IO_SIZE(x) (unsigned)(x) +#else +# define IO_SIZE(x) (x) +#endif + #endif // NVIM_MACROS_H |