aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/macros.h')
-rw-r--r--src/nvim/macros.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index 05065499f4..a98c1e05a0 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -148,8 +148,7 @@
/// zero in those cases (-Wdiv-by-zero in GCC).
#define ARRAY_SIZE(arr) ((sizeof(arr)/sizeof((arr)[0])) / ((size_t)(!(sizeof(arr) % sizeof((arr)[0])))))
-// Windows defines a RGB macro that produces 0x00bbggrr color values for use
-// with GDI. Our macro is different, and we don't use GDI.
+// Duplicated in os/win_defs.h to avoid include-order sensitivity.
#if defined(WIN32) && defined(RGB)
# undef RGB
#endif
@@ -188,18 +187,19 @@
/// @return ((Type *)obj).
#define STRUCT_CAST(Type, obj) ((Type *)(obj))
-// Type of uv_buf_t.len on Windows is ULONG, but others is size_t.
+// Type of uv_buf_t.len is platform-dependent.
+// Related: https://github.com/libuv/libuv/pull/1236
#if defined(WIN32)
# define UV_BUF_LEN(x) (ULONG)(x)
#else
# define UV_BUF_LEN(x) (x)
#endif
-// Type of bufcnt for read/write on Windows is unsigned int, not size_t.
+// Type of read()/write() `count` param is platform-dependent.
#if defined(WIN32)
-# define IO_SIZE(x) (unsigned)(x)
+# define IO_COUNT(x) (unsigned)(x)
#else
-# define IO_SIZE(x) (x)
+# define IO_COUNT(x) (x)
#endif
#endif // NVIM_MACROS_H