Module: wine Branch: master Commit: 1c21aeeebc698abf366a7611fef8e9eeee27b2d6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c21aeeebc698abf366a7611fe...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Sun Jan 4 16:57:47 2015 -0200
include: Add support for WS_ prefixed IPX names in wsnwlink.h.
---
dlls/ws2_32/socket.c | 10 +++++----- include/wsnwlink.h | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index f81f842..873d3de 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -3377,7 +3377,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, int namelen; switch(optname) { - case IPX_PTYPE: + case WS_IPX_PTYPE: if ((fd = get_sock_fd( s, 0, NULL )) == -1) return SOCKET_ERROR; #ifdef SOL_IPX if(getsockopt(fd, SOL_IPX, IPX_TYPE, optval, (socklen_t *)optlen) == -1) @@ -3398,7 +3398,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, release_sock_fd( s, fd ); return ret;
- case IPX_ADDRESS: + case WS_IPX_ADDRESS: /* * On a Win2000 system with one network card there are usually * three ipx devices one with a speed of 28.8kbps, 10Mbps and 100Mbps. @@ -3423,7 +3423,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level, * note 1MB = 1000kB in this case */ return 0;
- case IPX_MAX_ADAPTER_NUM: + case WS_IPX_MAX_ADAPTER_NUM: FIXME("IPX_MAX_ADAPTER_NUM\n"); *(int*)optval = 1; /* As noted under IPX_ADDRESS we have just one card. */ return 0; @@ -4984,10 +4984,10 @@ int WINAPI WS_setsockopt(SOCKET s, int level, int optname, case WS_NSPROTO_IPX: switch(optname) { - case IPX_PTYPE: + case WS_IPX_PTYPE: return set_ipx_packettype(s, *(int*)optval);
- case IPX_FILTERPTYPE: + case WS_IPX_FILTERPTYPE: /* Sets the receive filter packet type, at the moment we don't support it */ FIXME("IPX_FILTERPTYPE: %x\n", *optval); /* Returning 0 is better for now than returning a SOCKET_ERROR */ diff --git a/include/wsnwlink.h b/include/wsnwlink.h index 5a5bb8b..f237f0d 100644 --- a/include/wsnwlink.h +++ b/include/wsnwlink.h @@ -19,6 +19,13 @@ #ifndef _WSNWLINK_ #define _WSNWLINK_
+#ifdef USE_WS_PREFIX +#define WS(x) WS_##x +#else +#define WS(x) x +#endif + +#ifndef USE_WS_PREFIX #define IPX_PTYPE 0x4000 #define IPX_FILTERPTYPE 0x4001 #define IPX_DSTYPE 0x4002 @@ -35,6 +42,24 @@ #define IPX_RERIPNETNUMBER 0x400e #define IPX_RECEIVE_BROADCAST 0x400f #define IPX_IMMEDIATESPXACK 0x4010 +#else +#define WS_IPX_PTYPE 0x4000 +#define WS_IPX_FILTERPTYPE 0x4001 +#define WS_IPX_DSTYPE 0x4002 +#define WS_IPX_STOPFILTERPTYPE 0x4003 +#define WS_IPX_EXTENDED_ADDRESS 0x4004 +#define WS_IPX_RECVHDR 0x4005 +#define WS_IPX_MAXSIZE 0x4006 +#define WS_IPX_ADDRESS 0x4007 +#define WS_IPX_GETNETINFO 0x4008 +#define WS_IPX_GETNETINFO_NORIP 0x4009 +#define WS_IPX_SPXGETCONNECTIONSTATUS 0x400b +#define WS_IPX_ADDRESS_NOTIFY 0x400c +#define WS_IPX_MAX_ADAPTER_NUM 0x400d +#define WS_IPX_RERIPNETNUMBER 0x400e +#define WS_IPX_RECEIVE_BROADCAST 0x400f +#define WS_IPX_IMMEDIATESPXACK 0x4010 +#endif /* USE_WS_PREFIX */
typedef struct _IPX_ADDRESS_DATA { INT adapternum;