You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Chris Stylianou (JIRA)" <ji...@apache.org> on 2013/08/26 15:54:52 UTC

[jira] [Comment Edited] (THRIFT-2150) Should windows/config.h define WIN32_LEAN_AND_MEAN?

    [ https://issues.apache.org/jira/browse/THRIFT-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13750092#comment-13750092 ] 

Chris Stylianou edited comment on THRIFT-2150 at 8/26/13 1:53 PM:
------------------------------------------------------------------

Fair enough, might be worth documenting somewhere that the thrift cpp library use Winsock2 and therefore users should be aware of the fact that their own code (and other third-party libraries like Qt) might cause issues if they include Windows.h before the thrift headers.
                
      was (Author: chris5287):
    Fair enough, might be worth documenting somewhere that thrift cpp library use Winsock2 and therefore users should be aware of their code (and other third-party libraries like Qt) might cause issues if they include Windows.h before the thrift headers.
                  
> 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