[MPlayer-cygwin] Re: [MPlayer-dev-eng] [PATCH] network support for cygwin
Sycotic Smith
sycotic at linuxmail.org
Wed Aug 7 23:40:38 CEST 2002
Hello,
> > Attached below is a patch that will allow mplayer to fall back
> > on inet_aton() when inet_pton() is not present. If neither is
> > available, then streaming is disabled as before. This will
> > allow cygwin to have streaming video support. I don't know
> > what other systems will benefit from this.
[...]
> --Joey
> --- configure Mon Aug 5 13:14:16 2002
> +++ configure Mon Aug 5 13:48:20 2002
> @@ -1518,6 +1518,7 @@
> fi
>
>
> +_use_aton=no
> echocheck "inet_pton()"
> cat > $TMPC << EOF
> #include <sys/types.h>
> @@ -1534,10 +1535,35 @@
> _ld_sock="$_ld_sock -lresolv"
> echores "yes (using $_ld_sock)"
> else
> - echores "no (=> streaming support disabled)"
> - _streaming=no
> + echores "no (=> i'll try inet_aton next)"
> +
> + echocheck "inet_aton()"
> + cat > $TMPC << EOF
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <arpa/inet.h>
> +int main(void) { (void) inet_aton(0, 0); return 0; }
> +EOF
> + _use_aton=yes
> + if cc_check $_ld_sock ; then
> + # NOTE: Linux has libresolv but does not need it
> + :
> + echores "yes (using $_ld_sock)"
> + elif cc_check $_ld_sock -lresolv ; then
> + # NOTE: needed for SunOS at least
> + _ld_sock="$_ld_sock -lresolv"
> + echores "yes (using $_ld_sock)"
> + else
> + _use_aton=no
> + _streaming=no
> + echores "no (=> streaming support disabled)"
> + fi
> fi
>
> +_def_use_aton='#undef USE_ATON'
> +if test "$_use_aton" != no; then
> + _def_use_aton='#define USE_ATON 1'
> +fi
>
> echocheck "inttypes.h (required)"
> cat > $TMPC << EOF
> @@ -4523,6 +4549,9 @@
>
> /* enable streaming */
> $_def_streaming
> +
> +/* define this to use inet_aton instead of inet_pton */
> +$_def_use_aton
>
> /* enables / disables cdparanoia support */
> $_def_cdparanoia
Shouldn't this be changed to maybe be an 'if cygwin ; then' instead? Would cut down on lines of code ran maybe, and wouldn't even run the check for pton, which IIRC isn't implemented on cygwin anyhow.
> --- libmpdemux/network.h Thu Jul 4 21:35:19 2002
> +++ libmpdemux/network.h Mon Aug 5 13:50:03 2002
> @@ -52,4 +52,8 @@
> int http_send_request(URL_t *url);
> HTTP_header_t *http_read_response(int fd);
>
> +#ifdef USE_ATON
> +# define inet_pton(a, b, c) inet_aton(b, c)
> +#endif
> +
> #endif
>
/S. Smith
PS. We now have a cygwin mailing list to use, I have cross-posted this to that list in case anyone else not on dev-eng wants to look it over.
--
Get your free email from www.linuxmail.org
Powered by Outblaze
More information about the MPlayer-cygwin
mailing list