2005-02-20 14:27:00 +00:00
|
|
|
#ifndef WIN32_SOCKET_H
|
|
|
|
#define WIN32_SOCKET_H
|
2016-03-19 15:14:35 +00:00
|
|
|
#include "first.h"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
#ifdef __WIN32
|
|
|
|
|
|
|
|
#include <winsock2.h>
|
|
|
|
|
|
|
|
#define ECONNRESET WSAECONNRESET
|
|
|
|
#define EINPROGRESS WSAEINPROGRESS
|
|
|
|
#define EALREADY WSAEALREADY
|
2007-04-09 20:31:03 +00:00
|
|
|
#define ECONNABORTED WSAECONNABORTED
|
2017-04-03 18:50:14 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
#else
|
2017-04-03 18:50:14 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netinet/tcp.h>
|
2017-10-29 05:23:19 +00:00
|
|
|
#ifdef HAVE_SYS_UN_H
|
2005-02-20 14:27:00 +00:00
|
|
|
#include <sys/un.h>
|
2017-10-29 05:23:19 +00:00
|
|
|
#endif
|
2017-04-03 18:50:14 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef INET_ADDRSTRLEN
|
|
|
|
#define INET_ADDRSTRLEN 16
|
|
|
|
#endif
|
|
|
|
#ifndef INET6_ADDRSTRLEN
|
|
|
|
#define INET6_ADDRSTRLEN 46
|
|
|
|
#endif
|
|
|
|
#ifndef UNIX_PATH_MAX
|
|
|
|
#define UNIX_PATH_MAX 108
|
2005-02-20 14:27:00 +00:00
|
|
|
#endif
|
|
|
|
|
2018-03-25 07:45:05 +00:00
|
|
|
/* for solaris 2.5 and NetBSD 1.3.x */
|
|
|
|
#ifndef HAVE_SOCKLEN_T
|
|
|
|
typedef int socklen_t;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SHUT_WR
|
|
|
|
#define SHUT_WR 1
|
|
|
|
#endif
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
#endif
|