Windows build targets have socklen_t definition in ws2tcpip.h but some
versions of ws2tcpip.h do not have the definition. It seems that when the socklen_t definition is missing from ws2tcpip.h the definition for INET_ADDRSTRLEN is also missing, and that when one definition is present the other one also is available.
This commit is contained in:
Родитель
c67c54d4b3
Коммит
08c5e2a194
|
@ -146,11 +146,6 @@
|
|||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
/* Define to 'int' if socklen_t is not an available 'typedefed' type */
|
||||
#ifndef HAVE_WS2TCPIP_H
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* STRUCT RELATED */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -97,10 +97,6 @@
|
|||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WS2TCPIP_H
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
/*
|
||||
|
|
|
@ -91,6 +91,24 @@ struct timeval {
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Windows build targets have socklen_t definition in
|
||||
* ws2tcpip.h but some versions of ws2tcpip.h do not
|
||||
* have the definition. It seems that when the socklen_t
|
||||
* definition is missing from ws2tcpip.h the definition
|
||||
* for INET_ADDRSTRLEN is also missing, and that when one
|
||||
* definition is present the other one also is available.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) && !defined(HAVE_SOCKLEN_T)
|
||||
# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \
|
||||
(!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) )
|
||||
# define socklen_t int
|
||||
# define HAVE_SOCKLEN_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__minix)
|
||||
/* Minix doesn't support recv on TCP sockets */
|
||||
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
|
||||
|
|
|
@ -290,11 +290,6 @@
|
|||
#define _SSIZE_T_DEFINED
|
||||
#endif
|
||||
|
||||
/* Define to 'int' if socklen_t is not an available 'typedefed' type */
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1400)
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* TYPE SIZES */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -273,11 +273,6 @@
|
|||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
/* Define to 'int' if socklen_t is not an available 'typedefed' type */
|
||||
#ifndef HAVE_WS2TCPIP_H
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* TYPE SIZES */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -98,6 +98,24 @@ struct timeval {
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Windows build targets have socklen_t definition in
|
||||
* ws2tcpip.h but some versions of ws2tcpip.h do not
|
||||
* have the definition. It seems that when the socklen_t
|
||||
* definition is missing from ws2tcpip.h the definition
|
||||
* for INET_ADDRSTRLEN is also missing, and that when one
|
||||
* definition is present the other one also is available.
|
||||
*/
|
||||
|
||||
#if defined(WIN32) && !defined(HAVE_SOCKLEN_T)
|
||||
# if ( defined(_MSC_VER) && !defined(INET_ADDRSTRLEN) ) || \
|
||||
(!defined(_MSC_VER) && !defined(HAVE_WS2TCPIP_H) )
|
||||
# define socklen_t int
|
||||
# define HAVE_SOCKLEN_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__minix)
|
||||
/* Minix doesn't support recv on TCP sockets */
|
||||
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
|
||||
|
|
|
@ -149,11 +149,6 @@
|
|||
#define ssize_t int
|
||||
#endif
|
||||
|
||||
/* Define to 'int' if socklen_t is not an available 'typedefed' type */
|
||||
#ifndef HAVE_WS2TCPIP_H
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
/* STRUCT RELATED */
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
|
Загрузка…
Ссылка в новой задаче