aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Zhao <zhaozg@gmail.com>2018-01-17 19:36:59 +0800
committerGeorge Zhao <zhaozg@gmail.com>2018-01-18 21:30:04 +0800
commitbac86a194117008656d02951de6d303ab8687eec (patch)
tree356b960d9431b50429ca7ef062201420135d6002
parent06994e0e21eb5545aef7c2234f5d1a271865366e (diff)
downloadrneovim-bac86a194117008656d02951de6d303ab8687eec.tar.gz
rneovim-bac86a194117008656d02951de6d303ab8687eec.tar.bz2
rneovim-bac86a194117008656d02951de6d303ab8687eec.zip
Fix warning when redefine RGB on Windows
1
-rw-r--r--src/nvim/macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/macros.h b/src/nvim/macros.h
index 26d4f74b6a..0bec9af733 100644
--- a/src/nvim/macros.h
+++ b/src/nvim/macros.h
@@ -148,6 +148,11 @@
/// 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.
+#if defined(WIN32) && defined(RGB)
+# undef RGB
+#endif
#define RGB(r, g, b) ((r << 16) | (g << 8) | b)
#define STR_(x) #x