# HG changeset patch # User diego # Date 1220050539 0 # Node ID be85aae103f2abfaec6e128433d940cd1db513b8 # Parent e16088a911c19f9166ddbeb982beeda42bc9e71c Move duplicated '#define closesocket close' into network.h along with network-related #include #ifdeffery. diff -r e16088a911c1 -r be85aae103f2 stream/asf_mmst_streaming.c --- a/stream/asf_mmst_streaming.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/asf_mmst_streaming.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/asf_streaming.c --- a/stream/asf_streaming.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/asf_streaming.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/http.c --- a/stream/http.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/http.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/librtsp/rtsp_session.c --- a/stream/librtsp/rtsp_session.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/librtsp/rtsp_session.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/network.c --- a/stream/network.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/network.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/network.h --- a/stream/network.h Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/network.h Fri Aug 29 22:55:39 2008 +0000 @@ -17,6 +17,10 @@ #include #include #include +#define closesocket close +#else +#include +#include #endif #include "url.h" diff -r e16088a911c1 -r be85aae103f2 stream/pnm.c --- a/stream/pnm.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/pnm.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/rtp.c --- a/stream/rtp.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/rtp.c Fri Aug 29 22:55:39 2008 +0000 @@ -12,17 +12,9 @@ #include #include #include +#include #include "config.h" -#ifndef HAVE_WINSOCK2_H -#include -#include -#include -#define closesocket close -#else -#include -#include -#endif -#include +#include "network.h" #include "stream.h" /* MPEG-2 TS RTP stack */ diff -r e16088a911c1 -r be85aae103f2 stream/stream.c --- a/stream/stream.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/stream.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/stream_ftp.c --- a/stream/stream_ftp.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/stream_ftp.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/stream_netstream.c --- a/stream/stream_netstream.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/stream_netstream.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/stream_rtsp.c --- a/stream/stream_rtsp.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/stream_rtsp.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/tcp.c --- a/stream/tcp.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/tcp.c Fri Aug 29 22:55:39 2008 +0000 @@ -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 -r e16088a911c1 -r be85aae103f2 stream/udp.c --- a/stream/udp.c Fri Aug 29 22:29:27 2008 +0000 +++ b/stream/udp.c Fri Aug 29 22:55:39 2008 +0000 @@ -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"