* net.cc (cygwin_sendto): Define appropriate parameters using

socklen_t type according to SUSv3.
	(cygwin_recvfrom): Ditto.
	(cygwin_setsockopt): Ditto.
	(cygwin_getsockopt): Ditto.
	(cygwin_connect): Ditto.
	(cygwin_accept): Ditto.
	(cygwin_bind): Ditto.
	(cygwin_getsockname): Ditto.
	(cygwin_getpeername): Ditto.
	(cygwin_recv): Ditto.
	(cygwin_send): Ditto.
	* include/cygwin/socket.h (socklen_t): Typedef and define.
	* include/sys/socket.h: Declare socket functions using socklen_t type.
This commit is contained in:
Corinna Vinschen
2006-07-03 11:31:56 +00:00
parent 37b43cde0c
commit 78db7dff2c
4 changed files with 50 additions and 27 deletions

View File

@ -17,8 +17,11 @@ extern "C" {
#include <stdint.h>
/* Not unsigned for backward compatibility. Keep #define for backward
compatibility. */
#ifndef socklen_t
#define socklen_t int /* Not unsigned for backward compat. */
typedef int socklen_t;
#define socklen_t socklen_t
#endif
typedef uint16_t sa_family_t;