On 04/03/13 21:44, Pete Batard wrote:
> On 2013.03.04 14:38, Toby Gray wrote:
>> Why winsock.h and not winsock2.h?
> Simple. I tried winsock2 and got plenty of conflicts.
> And since I didn't have time to invest resolving them, I went with winsock.

Understandable. It turns out that it's the best thing to do as 
winsock2.h stops winsock.h from including any code, but including 
winsock.h first doesn't stop winsock2.h from including any code.

>> This is going to be a bit annoying for us as we already use winsock2.h
>> in some files which also include libusb.h. However I believe the fix is
>> to just #include <winsock2.h> before we #include <libusb.h> it shouldn't
>> be too bad.
> Well, my current understanding is that anybody who uses libusb and wants
> to use winsock2.h has to take some action, due to libusb.h inluding
> windows.h including winsock.h.

Agreed. I was concerned about code that compiled under 1.0.14 stopping 
compiling with 1.0.15 without modification. However I don't think this 
is the case as code would either have to not be defining 
WIN32_LEAN_AND_MEAN or defining it and #including winsock.h or 
winsock2.h before libusb.h.

Your changes now also enable the case where you can just #include 
libusb.h when WIN32_LEAN_AND_MEAN is defined.

> Again, with winsock.h being included from windows.h by default, I don't
> think us adding the extra winsock.h include should matter much to
> current users. But sure, we can add a note.
>

You've convinced me that I'm wrong; the changes actually allow libusb.h 
to be used in more situations so I don't see any need for a note.

Regards,

Toby

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to