2012/6/28 Corinna Vinschen <[email protected]>:
> On Jun 28 17:24, Ozkan Sezer wrote:
>> On Thu, Jun 28, 2012 at 5:18 PM, Corinna Vinschen <[email protected]> 
>> wrote:
>> > On second thought, this #undef/#ifndef juggle is only necessary for
>> > FD_SET, given that the other three macros are identical between
>> > winsock.h and winsock2.h, isn't it?
>> >
>>
>> Can't remember which, but some other macros have different
>> values in ws1 and ws2
>>
>> BTW, we may conditionally include ws1undef.h, too, like:
>>
>> --- winsock2.h~
>> +++ winsock2.h
>> @@ -13,6 +13,7 @@
>>  #define _WINSOCKAPI_
>>  #else
>>  #warning Please include winsock2.h before windows.h
>> +#define DO_INCLUDE_WS1UNDEF
>>  #endif
>>
>>  #ifndef INCL_WINSOCK_API_TYPEDEFS
>> @@ -41,7 +42,9 @@
>>  #define WSAAPI                       WINAPI
>>
>>  /* undefine macros from winsock.h */
>> +#ifdef DO_INCLUDE_WS1UNDEF
>>  #include <psdk_inc/_ws1_undef.h>
>> +#endif
>>
>>  #include <_timeval.h>
>>  #include <_bsd_types.h>
>>
>> Just cooked this up in a few seconds, without much thinking.
>> If that's OK, you can also retain your ifdefs around those FD_*
>> macros too
>
> As far as I can see that wouldn't help much since it would still
> potentially undef third party (probably Cygwin) FD_xxx macros.
> I think I'd rather go with a _fd_types.h-only solution.
>
> Here's my complete proposal for the fd_set patch again.  It includes the
> psdk_inc/_fd_types.h file and the psdk_inc/_ws1_undef.h file.  The
> #undef's are removed from the latter.  The FD_xxx macros are still
> guarded with #ifndef's.  Only the FD_SET handling got more complicated.
> Hope that's ok.
>
>
> Thanks,
> Corinna

Yes, solutiion is plausible.  I am fine by this solution. Ozkan?

Regards,
Kai

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to