aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream
diff options
context:
space:
mode:
authorGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-31 13:59:54 +0000
committerGravatar diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-31 13:59:54 +0000
commitf27f04a53d56a5b6ca89e80a67c140b6f009c439 (patch)
treea3c6f6918c8acb0d6788041fed312c78f00b5f11 /stream
parent133f1f8872559f88dcd557af9122e7acece169ac (diff)
Revert moving closesocket definition and network headers to network.h.
This caused lots of trouble on MinGW, we need a different solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27504 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/asf_mmst_streaming.c6
-rw-r--r--stream/asf_streaming.c7
-rw-r--r--stream/http.c8
-rw-r--r--stream/librtsp/rtsp_session.c13
-rw-r--r--stream/network.c8
-rw-r--r--stream/network.h4
-rw-r--r--stream/pnm.c10
-rw-r--r--stream/rtp.c12
-rw-r--r--stream/stream.c9
-rw-r--r--stream/stream_ftp.c7
-rw-r--r--stream/stream_netstream.c9
-rw-r--r--stream/stream_rtsp.c12
-rw-r--r--stream/tcp.c13
-rw-r--r--stream/udp.c12
14 files changed, 115 insertions, 15 deletions
diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c
index 1e3db344b9..5874998199 100644
--- a/stream/asf_mmst_streaming.c
+++ b/stream/asf_mmst_streaming.c
@@ -39,6 +39,12 @@
#include "mp_msg.h"
#include "help_mp.h"
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#else
+#include <winsock2.h>
+#endif
+
#ifndef CONFIG_SETLOCALE
#undef CONFIG_ICONV
#endif
diff --git a/stream/asf_streaming.c b/stream/asf_streaming.c
index 7a7ac86e51..67dc7278b8 100644
--- a/stream/asf_streaming.c
+++ b/stream/asf_streaming.c
@@ -8,6 +8,13 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
+
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#else
+#include <winsock2.h>
+#endif
+
#include "url.h"
#include "http.h"
#include "libmpdemux/asf.h"
diff --git a/stream/http.c b/stream/http.c
index 303db09a47..048edeedca 100644
--- a/stream/http.c
+++ b/stream/http.c
@@ -11,6 +11,14 @@
#include <string.h>
#include <unistd.h>
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
+#include "http.h"
#include "url.h"
#include "mp_msg.h"
diff --git a/stream/librtsp/rtsp_session.c b/stream/librtsp/rtsp_session.c
index 022aebf183..5e897ba777 100644
--- a/stream/librtsp/rtsp_session.c
+++ b/stream/librtsp/rtsp_session.c
@@ -29,6 +29,17 @@
*/
#include <sys/types.h>
+#include "config.h"
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#else
+#include <winsock2.h>
+#endif
+
+
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
@@ -36,12 +47,10 @@
#include <string.h>
#include <inttypes.h>
-#include "config.h"
#include "mp_msg.h"
#include "rtsp.h"
#include "rtsp_rtp.h"
#include "rtsp_session.h"
-#include "stream/network.h"
#include "stream/url.h"
#include "stream/rtp.h"
#include "stream/realrtsp/real.h"
diff --git a/stream/network.c b/stream/network.c
index 282c9c2a28..3f2391e60f 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -18,6 +18,14 @@
#include "mp_msg.h"
#include "help_mp.h"
+
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
#include "stream.h"
#include "libmpdemux/demuxer.h"
#include "m_config.h"
diff --git a/stream/network.h b/stream/network.h
index 5ec0233648..b3d6abc8c4 100644
--- a/stream/network.h
+++ b/stream/network.h
@@ -17,10 +17,6 @@
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
-#define closesocket close
-#else
-#include <winsock2.h>
-#include <ws2tcpip.h>
#endif
#include "url.h"
diff --git a/stream/pnm.c b/stream/pnm.c
index 946d9273c2..d9d9513897 100644
--- a/stream/pnm.c
+++ b/stream/pnm.c
@@ -35,9 +35,17 @@
#include <stdlib.h>
#include <sys/time.h>
#include <inttypes.h>
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#include <sys/socket.h>
+//#include <netinet/in.h>
+//#include <netdb.h>
+#else
+#include <winsock2.h>
+#endif
#include "libavutil/intreadwrite.h"
-#include "network.h"
+
#include "stream.h"
#include "libmpdemux/demuxer.h"
#include "help_mp.h"
diff --git a/stream/rtp.c b/stream/rtp.c
index c2a3857651..f4b84fc3b4 100644
--- a/stream/rtp.c
+++ b/stream/rtp.c
@@ -12,9 +12,17 @@
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
-#include <errno.h>
#include "config.h"
-#include "network.h"
+#ifndef HAVE_WINSOCK2_H
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#include <errno.h>
#include "stream.h"
/* MPEG-2 TS RTP stack */
diff --git a/stream/stream.c b/stream/stream.c
index c71ff28477..9b58c670f2 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -13,10 +13,17 @@
#include <strings.h>
#include "config.h"
+
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#else
+#include <winsock2.h>
+#endif
+
#include "mp_msg.h"
#include "help_mp.h"
#include "osdep/shmem.h"
-#include "network.h"
+
#include "stream.h"
#include "libmpdemux/demuxer.h"
diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c
index 253bf057fb..814d7d0083 100644
--- a/stream/stream_ftp.c
+++ b/stream/stream_ftp.c
@@ -9,9 +9,14 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
+#ifndef HAVE_WINSOCK2_H
+#include <sys/socket.h>
+#define closesocket close
+#else
+#include <winsock2.h>
+#endif
#include "mp_msg.h"
-#include "network.h"
#include "stream.h"
#include "help_mp.h"
#include "m_option.h"
diff --git a/stream/stream_netstream.c b/stream/stream_netstream.c
index 36bb72ccc2..4a3d2f04ed 100644
--- a/stream/stream_netstream.c
+++ b/stream/stream_netstream.c
@@ -42,6 +42,15 @@
#include <inttypes.h>
#include <errno.h>
+#ifndef HAVE_WINSOCK2_H
+#define closesocket close
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#else
+#include <winsock2.h>
+#endif
+
#include "mp_msg.h"
#include "stream.h"
#include "help_mp.h"
diff --git a/stream/stream_rtsp.c b/stream/stream_rtsp.c
index 9cf877a11a..d5c02852c1 100644
--- a/stream/stream_rtsp.c
+++ b/stream/stream_rtsp.c
@@ -27,10 +27,18 @@
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
+#include "config.h"
+#ifndef HAVE_WINSOCK2_H
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
#include <errno.h>
-#include "config.h"
-#include "network.h"
#include "stream.h"
#include "tcp.h"
#include "librtsp/rtsp.h"
diff --git a/stream/tcp.c b/stream/tcp.c
index e75e89d609..7eb5fc11b8 100644
--- a/stream/tcp.c
+++ b/stream/tcp.c
@@ -19,7 +19,18 @@
#include "mp_msg.h"
#include "help_mp.h"
-#include "network.h"
+
+#ifndef HAVE_WINSOCK2_H
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
#include "stream.h"
#include "tcp.h"
diff --git a/stream/udp.c b/stream/udp.c
index eaa0128b0c..52d47a0991 100644
--- a/stream/udp.c
+++ b/stream/udp.c
@@ -31,8 +31,18 @@
#include <sys/time.h>
#include <ctype.h>
+#ifndef HAVE_WINSOCK2_H
+#include <netdb.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#define closesocket close
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
#include "mp_msg.h"
-#include "network.h"
#include "url.h"
#include "udp.h"