From 2ff0f33b6345f193ef9dbd6547b268c0bc12552a Mon Sep 17 00:00:00 2001 From: Tim Champagne Date: Tue, 20 May 2003 16:23:44 +0000 Subject: This adds http and network input for Win32. I have no idea how to test this under win32 though? CVS patchset: 4889 CVS date: 2003/05/20 16:23:44 --- src/input/input_http.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/input/input_http.c') diff --git a/src/input/input_http.c b/src/input/input_http.c index 09b058a43..d05ae687d 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -31,9 +31,13 @@ #include #include #include + +#ifndef WIN32 #include #include #include +#endif /* WIN32 */ + #include #include "xine_internal.h" @@ -123,8 +127,13 @@ static int http_plugin_host_connect_attempt (struct in_addr ia, int port, sin.sin_family = AF_INET; sin.sin_addr = ia; sin.sin_port = htons(port); - - if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && errno != EINPROGRESS) { + +#ifndef WIN32 + if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && errno != EINPROGRESS) +#else + if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && WSAGetLastError != WSAEINPROGRESS) +#endif /* WIN32 */ + { xine_message(this->stream, XINE_MSG_CONNECTION_REFUSED, "cannot connect to host", NULL); xine_log (this->stream->xine, XINE_LOG_MSG, _("input_http: cannot connect to host\n")); close(s); -- cgit v1.2.3