From a28c7efd4c8b23c596ed34dcdebaa06834f621cf Mon Sep 17 00:00:00 2001 From: saturneric Date: Sat, 12 Sep 2026 22:50:52 +0200 Subject: 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 --- src/vmime/net/imap/IMAPSearchAttributes.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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" +// (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 { -- cgit