Mercurial > mplayer.hg
changeset 9890:237fcb766110
removed some wrappers, now the configure checks for inet_pton. patch by Joey Parrish <joey@nicewarrior.org>
author | alex |
---|---|
date | Wed, 09 Apr 2003 16:21:42 +0000 |
parents | 9dc39697e3b3 |
children | 150d1ef4204d |
files | libmpdemux/network.c libmpdemux/network.h |
diffstat | 2 files changed, 4 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/network.c Wed Apr 09 16:07:45 2003 +0000 +++ b/libmpdemux/network.c Wed Apr 09 16:21:42 2003 +0000 @@ -888,7 +888,11 @@ } memcpy( (void*)&server_address.sin_addr.s_addr, (void*)hp->h_addr, hp->h_length ); } else { +#ifdef USE_ATON + inet_aton(url->hostname, &server_address.sin_addr); +#else inet_pton(AF_INET, url->hostname, &server_address.sin_addr); +#endif } server_address.sin_family=AF_INET; server_address.sin_port=htons(url->port);
--- a/libmpdemux/network.h Wed Apr 09 16:07:45 2003 +0000 +++ b/libmpdemux/network.h Wed Apr 09 16:21:42 2003 +0000 @@ -54,18 +54,4 @@ int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry); -/* - * Joey Parrish <joey@yunamusic.com>: - * - * This define is to allow systems without inet_pton() to fallback on - * inet_aton(). The difference between the two is that inet_aton() is - * strictly for IPv4 networking, while inet_pton() is for IPv4 and IPv6 - * both. Slightly limited network functionality seems better than no - * network functionality to me, and as all systems (Cygwin) start to - * implement inet_pton(), configure will decide not to use this code. - */ -#ifdef USE_ATON -# define inet_pton(a, b, c) inet_aton(b, c) #endif - -#endif