[vlc-devel] commit: Simplify AI_NUMERICSERV usage ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jun 1 21:31:49 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Jun 1 20:52:20 2008 +0300| [fe1fdaf598d73a3cabe417ae85a6132623a10466]
Simplify AI_NUMERICSERV usage
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe1fdaf598d73a3cabe417ae85a6132623a10466
---
include/vlc_network.h | 4 +---
src/network/getaddrinfo.c | 4 ----
2 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/include/vlc_network.h b/include/vlc_network.h
index 972090d..363f5e9 100644
--- a/include/vlc_network.h
+++ b/include/vlc_network.h
@@ -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 ) );
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c
index 4294bce..b57f8ca 100644
--- a/src/network/getaddrinfo.c
+++ b/src/network/getaddrinfo.c
@@ -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 )
{
More information about the vlc-devel
mailing list