ws2_32: Add support for FROM_PROTOCOL_INFO to WSASocket()

Francois Gouget fgouget at free.fr
Mon May 26 05:14:03 CDT 2008


On Sun, 25 May 2008, Kai Blin wrote:
[...]
> > > --- a/include/winsock.h
> > > +++ b/include/winsock.h
> > > @@ -146,6 +146,7 @@ extern "C" {
> > >  /* proper 4-byte packing */
> > >  #include <pshpack4.h>
> > >
> > > +#define FROM_PROTOCOL_INFO (-1)
> >
> > PSDK has it in winsock2.h
> 
> PSDK has the AF_*, PF_*, SOCK_* and IPPROTO_* defines in winsock2.h as well, 
> Wine hasn't.

That's because MS likes to duplicate things a lot. So in the PSDK AF_*, 
PF_*, SOCK_* and IPPROTO_* are defined in _both_ winsock.h and 
winsock2.h. In Wine we're defining them in winsock.h only, but we're 
then #including winsock.h in winsock2.h, using __WINE_WINSOCK2__ to 
solve the handful of incompatibilities.

But the PSDK defines FROM_PROTOCOL_INFO _only_ in winsock2.h so it's 
important to do the same in Wine.


> I preferred to keep them together.

It's important that the Wine headers match the PSDK ones as best as 
possible. Differences usually result in Windows code that does not 
compile with Wine, bad for Winelib, or in the Wine conformance tests 
that don't compile with the PSDK.


Anyway, I'm sending a patch to add FROM_PROTOCOL_INFO to winsock2.h...


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
                     f u kn rd ts, ur wy 2 gky 4 ur wn gd.



More information about the wine-devel mailing list