aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-09-12 22:50:52 +0200
committersaturneric <[email protected]>2026-09-12 22:50:52 +0200
commita28c7efd4c8b23c596ed34dcdebaa06834f621cf (patch)
tree0f818fed2aaa4cd8c63c38e72883612c5b048fe7 /src
parentfix(tls): enforce minimum TLS 1.2 protocol version (diff)
downloadvmime-a28c7efd4c8b23c596ed34dcdebaa06834f621cf.tar.gz
vmime-a28c7efd4c8b23c596ed34dcdebaa06834f621cf.zip
fix(imap): prevent Windows TEXT macro collision
- undefine the Windows TEXT macro before declaring the IMAP SEARCH key - avoid macro expansion errors when including winsock2.h on Windows
Diffstat (limited to 'src')
-rw-r--r--src/vmime/net/imap/IMAPSearchAttributes.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vmime/net/imap/IMAPSearchAttributes.hpp b/src/vmime/net/imap/IMAPSearchAttributes.hpp
index 5e96f56c..2af8399e 100644
--- a/src/vmime/net/imap/IMAPSearchAttributes.hpp
+++ b/src/vmime/net/imap/IMAPSearchAttributes.hpp
@@ -40,6 +40,14 @@
#include "vmime/net/messageSet.hpp"
+// <windows.h> (pulled in by winsock2.h) defines TEXT as a macro, which
+// mangles the IMAP SEARCH key of the same name declared below. vmime never
+// uses the Windows macro, so drop it here.
+#ifdef TEXT
+# undef TEXT
+#endif
+
+
namespace vmime {
namespace net {
namespace imap {