diff options
| author | saturneric <[email protected]> | 2026-09-12 22:50:52 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-12 22:50:52 +0200 |
| commit | a28c7efd4c8b23c596ed34dcdebaa06834f621cf (patch) | |
| tree | 0f818fed2aaa4cd8c63c38e72883612c5b048fe7 /src | |
| parent | fix(tls): enforce minimum TLS 1.2 protocol version (diff) | |
| download | vmime-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.hpp | 8 |
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 { |
