Mercurial > mplayer.hg
changeset 27473:ae5da477539e
Move '#define closesocket close' preprocessor directive to a common place
and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition.
author | diego |
---|---|
date | Mon, 01 Sep 2008 07:31:57 +0000 |
parents | c0b233cd30ca |
children | fbef1306dab4 |
files | stream/asf_mmst_streaming.c stream/asf_streaming.c stream/http.c stream/librtsp/rtsp_session.c stream/network.c stream/network.h stream/pnm.c stream/rtp.c stream/stream.c stream/stream_ftp.c stream/stream_netstream.c stream/stream_rtsp.c stream/tcp.c stream/udp.c |
diffstat | 14 files changed, 17 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/asf_mmst_streaming.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/asf_mmst_streaming.c Mon Sep 01 07:31:57 2008 +0000 @@ -39,9 +39,7 @@ #include "mp_msg.h" #include "help_mp.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else +#ifdef HAVE_WINSOCK2_H #include <winsock2.h> #endif
--- a/stream/asf_streaming.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/asf_streaming.c Mon Sep 01 07:31:57 2008 +0000 @@ -9,9 +9,7 @@ #include "mp_msg.h" #include "help_mp.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else +#ifdef HAVE_WINSOCK2_H #include <winsock2.h> #endif
--- a/stream/http.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/http.c Mon Sep 01 07:31:57 2008 +0000 @@ -12,7 +12,6 @@ #include <unistd.h> #ifndef HAVE_WINSOCK2_H -#define closesocket close #else #include <winsock2.h> #include <ws2tcpip.h>
--- a/stream/librtsp/rtsp_session.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/librtsp/rtsp_session.c Mon Sep 01 07:31:57 2008 +0000 @@ -31,7 +31,6 @@ #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> @@ -51,6 +50,7 @@ #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"
--- a/stream/network.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/network.c Mon Sep 01 07:31:57 2008 +0000 @@ -19,9 +19,7 @@ #include "mp_msg.h" #include "help_mp.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else +#ifdef HAVE_WINSOCK2_H #include <winsock2.h> #include <ws2tcpip.h> #endif
--- a/stream/network.h Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/network.h Mon Sep 01 07:31:57 2008 +0000 @@ -22,6 +22,10 @@ #include "url.h" #include "http.h" +#ifndef HAVE_CLOSESOCKET +#define closesocket close +#endif + #define BUFFER_SIZE 2048 typedef struct {
--- a/stream/pnm.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/pnm.c Mon Sep 01 07:31:57 2008 +0000 @@ -36,7 +36,6 @@ #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> @@ -50,7 +49,7 @@ #include "libmpdemux/demuxer.h" #include "help_mp.h" #include "osdep/timer.h" - +#include "network.h" #include "pnm.h" #include "tcp.h" //#include "libreal/rmff.h"
--- a/stream/rtp.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/rtp.c Mon Sep 01 07:31:57 2008 +0000 @@ -17,12 +17,12 @@ #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 "network.h" #include "stream.h" /* MPEG-2 TS RTP stack */
--- a/stream/stream.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/stream.c Mon Sep 01 07:31:57 2008 +0000 @@ -14,16 +14,14 @@ #include "config.h" -#ifndef HAVE_WINSOCK2_H -#define closesocket close -#else +#ifdef HAVE_WINSOCK2_H #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"
--- a/stream/stream_ftp.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/stream_ftp.c Mon Sep 01 07:31:57 2008 +0000 @@ -11,12 +11,12 @@ #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"
--- a/stream/stream_netstream.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/stream_netstream.c Mon Sep 01 07:31:57 2008 +0000 @@ -43,7 +43,6 @@ #include <errno.h> #ifndef HAVE_WINSOCK2_H -#define closesocket close #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -59,6 +58,7 @@ #include "libavutil/common.h" #include "mpbswap.h" +#include "network.h" #include "netstream.h" #include "tcp.h"
--- a/stream/stream_rtsp.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/stream_rtsp.c Mon Sep 01 07:31:57 2008 +0000 @@ -32,13 +32,13 @@ #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 "network.h" #include "stream.h" #include "tcp.h" #include "librtsp/rtsp.h"
--- a/stream/tcp.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/tcp.c Mon Sep 01 07:31:57 2008 +0000 @@ -25,12 +25,12 @@ #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> -#define closesocket close #else #include <winsock2.h> #include <ws2tcpip.h> #endif +#include "network.h" #include "stream.h" #include "tcp.h"
--- a/stream/udp.c Sun Aug 31 13:59:54 2008 +0000 +++ b/stream/udp.c Mon Sep 01 07:31:57 2008 +0000 @@ -36,13 +36,13 @@ #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"