From c152b07e661cbc274cd4979e6b5e053a64656476 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 29 Aug 2008 22:55:39 +0000 Subject: Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27496 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, 15 insertions(+), 115 deletions(-) (limited to 'stream') diff --git a/stream/asf_mmst_streaming.c b/stream/asf_mmst_streaming.c index 5874998199..1e3db344b9 100644 --- a/stream/asf_mmst_streaming.c +++ b/stream/asf_mmst_streaming.c @@ -39,12 +39,6 @@ #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 67dc7278b8..7a7ac86e51 100644 --- a/stream/asf_streaming.c +++ b/stream/asf_streaming.c @@ -8,13 +8,6 @@ #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 048edeedca..303db09a47 100644 --- a/stream/http.c +++ b/stream/http.c @@ -11,14 +11,6 @@ #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 5e897ba777..022aebf183 100644 --- a/stream/librtsp/rtsp_session.c +++ b/stream/librtsp/rtsp_session.c @@ -29,17 +29,6 @@ */ #include -#include "config.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#include -#include -#include -#else -#include -#endif - - #include #include #include @@ -47,10 +36,12 @@ #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 3f2391e60f..282c9c2a28 100644 --- a/stream/network.c +++ b/stream/network.c @@ -18,14 +18,6 @@ #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 b3d6abc8c4..5ec0233648 100644 --- a/stream/network.h +++ b/stream/network.h @@ -17,6 +17,10 @@ #include #include #include +#define closesocket close +#else +#include +#include #endif #include "url.h" diff --git a/stream/pnm.c b/stream/pnm.c index d9d9513897..946d9273c2 100644 --- a/stream/pnm.c +++ b/stream/pnm.c @@ -35,17 +35,9 @@ #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 f4b84fc3b4..c2a3857651 100644 --- a/stream/rtp.c +++ b/stream/rtp.c @@ -12,17 +12,9 @@ #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" /* MPEG-2 TS RTP stack */ diff --git a/stream/stream.c b/stream/stream.c index 9b58c670f2..c71ff28477 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -13,17 +13,10 @@ #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 814d7d0083..253bf057fb 100644 --- a/stream/stream_ftp.c +++ b/stream/stream_ftp.c @@ -9,14 +9,9 @@ #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 4a3d2f04ed..36bb72ccc2 100644 --- a/stream/stream_netstream.c +++ b/stream/stream_netstream.c @@ -42,15 +42,6 @@ #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 d5c02852c1..9cf877a11a 100644 --- a/stream/stream_rtsp.c +++ b/stream/stream_rtsp.c @@ -27,18 +27,10 @@ #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 7eb5fc11b8..e75e89d609 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -19,18 +19,7 @@ #include "mp_msg.h" #include "help_mp.h" - -#ifndef HAVE_WINSOCK2_H -#include -#include -#include -#include -#define closesocket close -#else -#include -#include -#endif - +#include "network.h" #include "stream.h" #include "tcp.h" diff --git a/stream/udp.c b/stream/udp.c index 52d47a0991..eaa0128b0c 100644 --- a/stream/udp.c +++ b/stream/udp.c @@ -31,18 +31,8 @@ #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