# HG changeset patch # User diego # Date 1220191194 0 # Node ID c0b233cd30cacae702b25ffad9d32ea34ffdb52a # Parent d9c662edc34794114db9c677444624bb2ba63cde Revert moving closesocket definition and network headers to network.h. This caused lots of trouble on MinGW, we need a different solution. diff -r d9c662edc347 -r c0b233cd30ca stream/asf_mmst_streaming.c --- a/stream/asf_mmst_streaming.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/asf_mmst_streaming.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/asf_streaming.c --- a/stream/asf_streaming.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/asf_streaming.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/http.c --- a/stream/http.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/http.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/librtsp/rtsp_session.c --- a/stream/librtsp/rtsp_session.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/librtsp/rtsp_session.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/network.c --- a/stream/network.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/network.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/network.h --- a/stream/network.h Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/network.h Sun Aug 31 13:59:54 2008 +0000 @@ -17,10 +17,6 @@ #include #include #include -#define closesocket close -#else -#include -#include #endif #include "url.h" diff -r d9c662edc347 -r c0b233cd30ca stream/pnm.c --- a/stream/pnm.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/pnm.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/rtp.c --- a/stream/rtp.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/rtp.c Sun Aug 31 13:59:54 2008 +0000 @@ -12,9 +12,17 @@ #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 -r d9c662edc347 -r c0b233cd30ca stream/stream.c --- a/stream/stream.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/stream.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/stream_ftp.c --- a/stream/stream_ftp.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/stream_ftp.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/stream_netstream.c --- a/stream/stream_netstream.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/stream_netstream.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/stream_rtsp.c --- a/stream/stream_rtsp.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/stream_rtsp.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/tcp.c --- a/stream/tcp.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/tcp.c Sun Aug 31 13:59:54 2008 +0000 @@ -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 -r d9c662edc347 -r c0b233cd30ca stream/udp.c --- a/stream/udp.c Sun Aug 31 13:56:18 2008 +0000 +++ b/stream/udp.c Sun Aug 31 13:59:54 2008 +0000 @@ -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"