diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2002-03-06 11:31:47 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2002-03-06 11:31:47 +0000 |
commit | b7410006b900f996e5cca6a977f0ca20cfa216fb (patch) | |
tree | 414ed2bfe3592c45f0b1c4e7610ff55e5155854f /winsup/w32api/include/mswsock.h | |
parent | 55f26f11945e4cbacfdaff197ff5220ee7417e9f (diff) | |
download | cygnal-b7410006b900f996e5cca6a977f0ca20cfa216fb.tar.gz cygnal-b7410006b900f996e5cca6a977f0ca20cfa216fb.tar.bz2 cygnal-b7410006b900f996e5cca6a977f0ca20cfa216fb.zip |
* include/mswsock.h: Group winsock2 dependants
together and protect with #ifdef _WINSOCK2_H.
* lib/test.c: Only test ws2tcpip.h if winsock2.h
has been included.
Diffstat (limited to 'winsup/w32api/include/mswsock.h')
-rw-r--r-- | winsup/w32api/include/mswsock.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/winsup/w32api/include/mswsock.h b/winsup/w32api/include/mswsock.h index 88f7037b5..7926a13a9 100644 --- a/winsup/w32api/include/mswsock.h +++ b/winsup/w32api/include/mswsock.h @@ -1,6 +1,6 @@ /* * mswsock.h - * MS-specific extensions to Windows Sockets 1.1, exported from mswsock.dll. + * MS-specific extensions to Windows Sockets, exported from mswsock.dll. * These functions are N/A on Windows9x. * * This file is part of a free library for the Win32 API. @@ -40,10 +40,6 @@ extern "C" { #define TF_USE_SYSTEM_THREAD 16 #define TF_USE_KERNEL_APC 32 -#define TP_ELEMENT_FILE 1 -#define TP_ELEMENT_MEMORY 2 -#define TP_ELEMENT_EOP 4 - typedef struct _TRANSMIT_FILE_BUFFERS { PVOID Head; DWORD HeadLength; @@ -51,6 +47,17 @@ typedef struct _TRANSMIT_FILE_BUFFERS { DWORD TailLength; } TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, *LPTRANSMIT_FILE_BUFFERS; +int PASCAL WSARecvEx(SOCKET,char*,int,int*); +BOOL PASCAL TransmitFile(SOCKET,HANDLE,DWORD,DWORD,LPOVERLAPPED,LPTRANSMIT_FILE_BUFFERS,DWORD); +BOOL PASCAL AcceptEx(SOCKET,SOCKET,PVOID,DWORD,DWORD,DWORD,LPDWORD,LPOVERLAPPED); +VOID PASCAL GetAcceptExSockaddrs(PVOID,DWORD,DWORD,DWORD,struct sockaddr**, LPINT, struct sockaddr**, LPINT); + +#ifdef WINSOCK2_H /* These require the winsock2 interface. */ + +#define TP_ELEMENT_FILE 1 +#define TP_ELEMENT_MEMORY 2 +#define TP_ELEMENT_EOP 4 + typedef struct _TRANSMIT_PACKETS_ELEMENT { ULONG dwElFlags; ULONG cLength; @@ -92,13 +99,11 @@ typedef struct wsacmsghdr { #define WSA_CMSG_LEN(length) #endif -int PASCAL WSARecvEx(SOCKET,char*,int,int*); -BOOL PASCAL TransmitFile(SOCKET,HANDLE,DWORD,DWORD,LPOVERLAPPED,LPTRANSMIT_FILE_BUFFERS,DWORD); -BOOL PASCAL AcceptEx(SOCKET,SOCKET,PVOID,DWORD,DWORD,DWORD,LPDWORD,LPOVERLAPPED); -VOID PASCAL GetAcceptExSockaddrs(PVOID,DWORD,DWORD,DWORD,struct sockaddr**, LPINT, struct sockaddr**, LPINT); BOOL PASCAL DisconnectEx(SOCKET,LPOVERLAPPED,DWORD,DWORD); int PASCAL WSARecvMsg(SOCKET,LPWSAMSG,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE); +#endif /* WINSOCK2_H */ + #ifdef __cplusplus } #endif |