Changeset 28475 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock.h
- Timestamp:
- Apr 19, 2010 3:27:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winsock.h
r23571 r28475 90 90 # define select unix_select 91 91 # define socklen_t unix_socklen_t 92 # define u_long unix_u_long 92 93 # include <sys/types.h> 93 94 # include <time.h> … … 97 98 # undef select 98 99 # undef socklen_t 100 # undef u_long 99 101 # undef FD_SETSIZE 100 102 # undef FD_CLR … … 128 130 typedef unsigned short WS_u_short; 129 131 typedef unsigned int WS_u_int; 130 #ifdef _MSC_VER 131 typedef unsigned long WS_u_long; 132 #else 133 typedef unsigned int WS_u_long; 134 #endif 132 typedef ULONG WS_u_long; 135 133 #elif (defined(_MSC_VER) || defined(__MINGW32__) || defined(__WATCOMC__)) && !defined(_BSDTYPES_DEFINED) 136 134 /* MinGW doesn't define the u_xxx types */ … … 138 136 typedef unsigned short u_short; 139 137 typedef unsigned int u_int; 140 #ifdef _MSC_VER 141 typedef unsigned long u_long; 142 #else 143 typedef unsigned int u_long; 144 #endif 138 typedef ULONG u_long; 145 139 #define _BSDTYPES_DEFINED 140 #else 141 #define u_long ULONG /* make sure we don't use the system u_long */ 146 142 #endif 147 143 … … 311 307 char** n_aliases; /* alias list */ 312 308 short n_addrtype; /* net address type */ 313 WS(u_long) n_net;/* network # */309 ULONG n_net; /* network # */ 314 310 }; 315 311 … … 533 529 #ifdef WORDS_BIGENDIAN 534 530 535 #define htonl(l) (( u_long)(l))531 #define htonl(l) ((ULONG)(l)) 536 532 #define htons(s) ((u_short)(s)) 537 #define ntohl(l) (( u_long)(l))533 #define ntohl(l) ((ULONG)(l)) 538 534 #define ntohs(s) ((u_short)(s)) 539 535 … … 544 540 return (s >> 8) | (s << 8); 545 541 } 546 static inline u_long __wine_ulong_swap(u_longl)547 { 548 return (( u_long)__wine_ushort_swap((u_short)l) << 16) | __wine_ushort_swap((u_short)(l >> 16));542 static inline ULONG __wine_ulong_swap(ULONG l) 543 { 544 return ((ULONG)__wine_ushort_swap((u_short)l) << 16) | __wine_ushort_swap((u_short)(l >> 16)); 549 545 } 550 546 #define htonl(l) __wine_ulong_swap(l) … … 594 590 595 591 #ifndef USE_WS_PREFIX 596 #define INADDR_ANY (( u_long)0x00000000)592 #define INADDR_ANY ((ULONG)0x00000000) 597 593 #define INADDR_LOOPBACK 0x7f000001 598 #define INADDR_BROADCAST (( u_long)0xffffffff)594 #define INADDR_BROADCAST ((ULONG)0xffffffff) 599 595 #define INADDR_NONE 0xffffffff 600 596 #else 601 #define WS_INADDR_ANY (( WS_u_long)0x00000000)597 #define WS_INADDR_ANY ((ULONG)0x00000000) 602 598 #define WS_INADDR_LOOPBACK 0x7f000001 603 #define WS_INADDR_BROADCAST (( WS_u_long)0xffffffff)599 #define WS_INADDR_BROADCAST ((ULONG)0xffffffff) 604 600 #define WS_INADDR_NONE 0xffffffff 605 601 #endif /* USE_WS_PREFIX */ … … 614 610 WS(u_short) s_w1,s_w2; 615 611 } S_un_w; 616 WS(u_long)S_addr;612 ULONG S_addr; 617 613 } S_un; 618 614 #ifndef USE_WS_PREFIX … … 788 784 */ 789 785 #ifndef USE_WS_PREFIX 790 #define FIONREAD _IOR('f', 127, u_long)791 #define FIONBIO _IOW('f', 126, u_long)792 #define FIOASYNC _IOW('f', 125, u_long)793 #define SIOCSHIWAT _IOW('s', 0, u_long)794 #define SIOCGHIWAT _IOR('s', 1, u_long)795 #define SIOCSLOWAT _IOW('s', 2, u_long)796 #define SIOCGLOWAT _IOR('s', 3, u_long)797 #define SIOCATMARK _IOR('s', 7, u_long)798 #else 799 #define WS_FIONREAD WS__IOR('f', 127, WS_u_long)800 #define WS_FIONBIO WS__IOW('f', 126, WS_u_long)801 #define WS_FIOASYNC WS__IOW('f', 125, WS_u_long)802 #define WS_SIOCSHIWAT WS__IOW('s', 0, WS_u_long)803 #define WS_SIOCGHIWAT WS__IOR('s', 1, WS_u_long)804 #define WS_SIOCSLOWAT WS__IOW('s', 2, WS_u_long)805 #define WS_SIOCGLOWAT WS__IOR('s', 3, WS_u_long)806 #define WS_SIOCATMARK WS__IOR('s', 7, WS_u_long)786 #define FIONREAD _IOR('f', 127, ULONG) 787 #define FIONBIO _IOW('f', 126, ULONG) 788 #define FIOASYNC _IOW('f', 125, ULONG) 789 #define SIOCSHIWAT _IOW('s', 0, ULONG) 790 #define SIOCGHIWAT _IOR('s', 1, ULONG) 791 #define SIOCSLOWAT _IOW('s', 2, ULONG) 792 #define SIOCGLOWAT _IOR('s', 3, ULONG) 793 #define SIOCATMARK _IOR('s', 7, ULONG) 794 #else 795 #define WS_FIONREAD WS__IOR('f', 127, ULONG) 796 #define WS_FIONBIO WS__IOW('f', 126, ULONG) 797 #define WS_FIOASYNC WS__IOW('f', 125, ULONG) 798 #define WS_SIOCSHIWAT WS__IOW('s', 0, ULONG) 799 #define WS_SIOCGHIWAT WS__IOR('s', 1, ULONG) 800 #define WS_SIOCSLOWAT WS__IOW('s', 2, ULONG) 801 #define WS_SIOCGLOWAT WS__IOR('s', 3, ULONG) 802 #define WS_SIOCATMARK WS__IOR('s', 7, ULONG) 807 803 #endif 808 804 … … 863 859 /* 864 860 * All Windows Sockets error constants are biased by WSABASEERR from 865 * the "normal" 861 * the "normal". They are also defined in winerror.h. 866 862 */ 867 863 #define WSABASEERR 10000 … … 1061 1057 int WINAPI WS(getsockname)(SOCKET,struct WS(sockaddr)*,int*); 1062 1058 int WINAPI WS(getsockopt)(SOCKET,int,int,char*,int*); 1063 WS(u_long)WINAPI WS(inet_addr)(const char*);1059 ULONG WINAPI WS(inet_addr)(const char*); 1064 1060 char* WINAPI WS(inet_ntoa)(struct WS(in_addr)); 1065 int WINAPI WS(ioctlsocket)(SOCKET,LONG, WS(u_long)*);1061 int WINAPI WS(ioctlsocket)(SOCKET,LONG,ULONG*); 1066 1062 int WINAPI WS(listen)(SOCKET,int); 1067 1063 int WINAPI WS(recv)(SOCKET,char*,int,int);
Note:
See TracChangeset
for help on using the changeset viewer.