From f27f04a53d56a5b6ca89e80a67c140b6f009c439 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 31 Aug 2008 13:59:54 +0000 Subject: 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 --- stream/asf_mmst_streaming.c | 6 ++++++ stream/asf_streaming.c | 7 +++++++ stream/http.c | 8 ++++++++ stream/librtsp/rtsp_session.c | 13 +++++++++++-- stream/network.c | 8 ++++++++ stream/network.h | 4 ---- stream/pnm.c | 10 +++++++++- stream/rtp.c | 12 ++++++++++-- stream/stream.c | 9 ++++++++- stream/stream_ftp.c | 7 ++++++- stream/stream_netstream.c | 9 +++++++++ stream/stream_rtsp.c | 12 ++++++++++-- stream/tcp.c | 13 ++++++++++++- stream/udp.c | 12 +++++++++++- 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 +#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 +#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 #include +#ifndef HAVE_WINSOCK2_H +#define closesocket close +#else +#include +#include +#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 +#include "config.h" +#ifndef HAVE_WINSOCK2_H +#define closesocket close +#include +#include +#include +#else +#include +#endif + + #include #include #include @@ -36,12 +47,10 @@ #include #include -#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 +#include +#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 #include #include -#define closesocket close -#else -#include -#include #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 #include #include +#ifndef HAVE_WINSOCK2_H +#define closesocket close +#include +//#include +//#include +#else +#include +#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 #include #include -#include #include "config.h" -#include "network.h" +#ifndef HAVE_WINSOCK2_H +#include +#include +#include +#define closesocket close +#else +#include +#include +#endif +#include #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 #include "config.h" + +#ifndef HAVE_WINSOCK2_H +#define closesocket close +#else +#include +#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 #include #include +#ifndef HAVE_WINSOCK2_H +#include +#define closesocket close +#else +#include +#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 #include +#ifndef HAVE_WINSOCK2_H +#define closesocket close +#include +#include +#include +#else +#include +#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 #include #include +#include "config.h" +#ifndef HAVE_WINSOCK2_H +#include +#include +#include +#define closesocket close +#else +#include +#include +#endif #include -#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 +#include +#include +#include +#define closesocket close +#else +#include +#include +#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 #include +#ifndef HAVE_WINSOCK2_H +#include +#include +#include +#include +#define closesocket close +#else +#include +#include +#endif + #include "mp_msg.h" -#include "network.h" #include "url.h" #include "udp.h" -- cgit v1.2.3