Simplify AI_NUMERICSERV usage

This commit is contained in:
Rémi Denis-Courmont 2008-06-01 20:52:20 +03:00
parent 3527f69d9f
commit fe1fdaf598
2 changed files with 1 additions and 7 deletions

View File

@ -40,7 +40,6 @@
# include <ws2tcpip.h>
# define ENETUNREACH WSAENETUNREACH
# define net_errno (WSAGetLastError())
# define AI_NUMERICSERV 0
extern const char *net_strerror( int val );
struct iovec
@ -274,9 +273,8 @@ struct addrinfo
# define AI_NUMERICHOST 4
# endif /* if !HAVE_STRUCT_ADDRINFO */
/* Mac OS X doesn't define that one */
#ifndef AI_NUMERICSERV
#define AI_NUMERICSERV 0
# define AI_NUMERICSERV 0
#endif
VLC_EXPORT( const char *, vlc_gai_strerror, ( int ) );

View File

@ -591,9 +591,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
AI_PASSIVE |
AI_CANONNAME |
AI_NUMERICHOST |
#ifdef AI_NUMERICSERV
AI_NUMERICSERV |
#endif
#ifdef AI_ALL
AI_ALL |
#endif
@ -615,10 +613,8 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
hints.ai_flags = p_hints->ai_flags & safe_flags;
}
#ifdef AI_NUMERICSERV
/* We only ever use port *numbers* */
hints.ai_flags |= AI_NUMERICSERV;
#endif
if( hints.ai_family == AF_UNSPEC )
{