[
https://issues.apache.org/jira/browse/THRIFT-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13750083#comment-13750083
]
Ben Craig commented on THRIFT-2150:
-----------------------------------
I would prefer not to add #define WIN32_LEAN_AND_MEAN to an externally visible
header file. This doesn't fix the Winsock / Winsock2 incompatibility in all
the cases, as the including code could have pulled in Windows.h before pulling
in any thrift headers. In addition, putting the #define in windows/config.h
will likely break code that was relying on the non-lean_and_mean headers.
It is possible to add #define WIN32_LEAN_AND_MEAN to thrift's .cpp files, but
that doesn't get much of an improvement in build times.
> Should windows/config.h define WIN32_LEAN_AND_MEAN?
> ---------------------------------------------------
>
> Key: THRIFT-2150
> URL: https://issues.apache.org/jira/browse/THRIFT-2150
> Project: Thrift
> Issue Type: Improvement
> Components: C++ - Library
> Affects Versions: 0.9.1
> Environment: MSVC
> Reporter: Chris Stylianou
> Labels: c++, msvc, thrift, windows
>
> As "windows/config.h" includes Winsock2.h, is it not best practise to define
> before it:
> {code}WIN32_LEAN_AND_MEAN{code}
> This is in case someone includes Windows.h, which automatically includes the
> incompatible Winsock.h. It also reduces the size of the Win32 header files
> which helps compilation speeds :)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira