(socklen_t): make independent of sockaddr_storage
(AI_*, NI_*, EAI_*): move to roken-common.h git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7505 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -430,16 +430,16 @@ struct hostent *
|
|||||||
copyhostent (const struct hostent *h);
|
copyhostent (const struct hostent *h);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_SOCKLEN_T
|
||||||
|
typedef int socklen_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
|
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
|
|
||||||
#ifndef HAVE_SA_FAMILY_T
|
#ifndef HAVE_SA_FAMILY_T
|
||||||
typedef unsigned short sa_family_t;
|
typedef unsigned short sa_family_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SOCKLEN_T
|
|
||||||
typedef int socklen_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_STRUCT_SOCKADDR_SA_LEN
|
#if HAVE_STRUCT_SOCKADDR_SA_LEN
|
||||||
|
|
||||||
struct sockaddr_storage {
|
struct sockaddr_storage {
|
||||||
@@ -484,48 +484,6 @@ struct addrinfo {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EAI_NOERROR
|
|
||||||
#define EAI_NOERROR 0 /* no error */
|
|
||||||
#endif
|
|
||||||
#ifndef EAI_ADDRFAMILY
|
|
||||||
#define EAI_ADDRFAMILY 1 /* address family for nodename not supported */
|
|
||||||
#define EAI_AGAIN 2 /* temporary failure in name resolution */
|
|
||||||
#define EAI_BADFLAGS 3 /* invalid value for ai_flags */
|
|
||||||
#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
|
|
||||||
#define EAI_FAMILY 5 /* ai_family not supported */
|
|
||||||
#define EAI_MEMORY 6 /* memory allocation failure */
|
|
||||||
#define EAI_NODATA 7 /* no address associated with nodename */
|
|
||||||
#define EAI_NONAME 8 /* nodename nor servname provided, or not known */
|
|
||||||
#define EAI_SERVICE 9 /* servname not supported for ai_socktype */
|
|
||||||
#define EAI_SOCKTYPE 10 /* ai_socktype not supported */
|
|
||||||
#define EAI_SYSTEM 11 /* system error returned in errno */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* flags for getaddrinfo() */
|
|
||||||
|
|
||||||
#ifndef AI_PASSIVE
|
|
||||||
|
|
||||||
#define AI_PASSIVE 0x01
|
|
||||||
#define AI_CANONNAME 0x02
|
|
||||||
#define AI_NUMERICHOST 0x04
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* flags for getnameinfo() */
|
|
||||||
|
|
||||||
#ifndef NI_DGRAM
|
|
||||||
#define NI_DGRAM 0x01
|
|
||||||
#define NI_NAMEREQD 0x02
|
|
||||||
#define NI_NOFQDN 0x04
|
|
||||||
#define NI_NUMERICHOST 0x08
|
|
||||||
#define NI_NUMERICSERV 0x10
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NI_MAXHOST
|
|
||||||
#define NI_MAXHOST 1025
|
|
||||||
#define NI_MAXSERV 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_GETADDRINFO
|
#ifndef HAVE_GETADDRINFO
|
||||||
int
|
int
|
||||||
getaddrinfo(const char *nodename,
|
getaddrinfo(const char *nodename,
|
||||||
|
Reference in New Issue
Block a user