[MPlayer-cvslog] r27505 - in trunk/stream: asf_mmst_streaming.c asf_streaming.c http.c librtsp/rtsp_session.c network.c network.h pnm.c rtp.c stream.c stream_ftp.c stream_netstream.c stream_rtsp.c tcp.c udp.c

diego subversion at mplayerhq.hu
Mon Sep 1 09:31:58 CEST 2008


Author: diego
Date: Mon Sep  1 09:31:57 2008
New Revision: 27505

Log:
Move '#define closesocket close' preprocessor directive to a common place
and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition.


Modified:
   trunk/stream/asf_mmst_streaming.c
   trunk/stream/asf_streaming.c
   trunk/stream/http.c
   trunk/stream/librtsp/rtsp_session.c
   trunk/stream/network.c
   trunk/stream/network.h
   trunk/stream/pnm.c
   trunk/stream/rtp.c
   trunk/stream/stream.c
   trunk/stream/stream_ftp.c
   trunk/stream/stream_netstream.c
   trunk/stream/stream_rtsp.c
   trunk/stream/tcp.c
   trunk/stream/udp.c

Modified: trunk/stream/asf_mmst_streaming.c
==============================================================================
--- trunk/stream/asf_mmst_streaming.c	(original)
+++ trunk/stream/asf_mmst_streaming.c	Mon Sep  1 09:31:57 2008
@@ -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
 

Modified: trunk/stream/asf_streaming.c
==============================================================================
--- trunk/stream/asf_streaming.c	(original)
+++ trunk/stream/asf_streaming.c	Mon Sep  1 09:31:57 2008
@@ -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
 

Modified: trunk/stream/http.c
==============================================================================
--- trunk/stream/http.c	(original)
+++ trunk/stream/http.c	Mon Sep  1 09:31:57 2008
@@ -12,7 +12,6 @@
 #include <unistd.h>
 
 #ifndef HAVE_WINSOCK2_H
-#define closesocket close
 #else
 #include <winsock2.h>
 #include <ws2tcpip.h>

Modified: trunk/stream/librtsp/rtsp_session.c
==============================================================================
--- trunk/stream/librtsp/rtsp_session.c	(original)
+++ trunk/stream/librtsp/rtsp_session.c	Mon Sep  1 09:31:57 2008
@@ -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"

Modified: trunk/stream/network.c
==============================================================================
--- trunk/stream/network.c	(original)
+++ trunk/stream/network.c	Mon Sep  1 09:31:57 2008
@@ -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

Modified: trunk/stream/network.h
==============================================================================
--- trunk/stream/network.h	(original)
+++ trunk/stream/network.h	Mon Sep  1 09:31:57 2008
@@ -22,6 +22,10 @@
 #include "url.h"
 #include "http.h"
 
+#ifndef HAVE_CLOSESOCKET
+#define closesocket close
+#endif
+
 #define BUFFER_SIZE		2048
 
 typedef struct {

Modified: trunk/stream/pnm.c
==============================================================================
--- trunk/stream/pnm.c	(original)
+++ trunk/stream/pnm.c	Mon Sep  1 09:31:57 2008
@@ -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"

Modified: trunk/stream/rtp.c
==============================================================================
--- trunk/stream/rtp.c	(original)
+++ trunk/stream/rtp.c	Mon Sep  1 09:31:57 2008
@@ -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 */

Modified: trunk/stream/stream.c
==============================================================================
--- trunk/stream/stream.c	(original)
+++ trunk/stream/stream.c	Mon Sep  1 09:31:57 2008
@@ -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"
 

Modified: trunk/stream/stream_ftp.c
==============================================================================
--- trunk/stream/stream_ftp.c	(original)
+++ trunk/stream/stream_ftp.c	Mon Sep  1 09:31:57 2008
@@ -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"

Modified: trunk/stream/stream_netstream.c
==============================================================================
--- trunk/stream/stream_netstream.c	(original)
+++ trunk/stream/stream_netstream.c	Mon Sep  1 09:31:57 2008
@@ -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"
 

Modified: trunk/stream/stream_rtsp.c
==============================================================================
--- trunk/stream/stream_rtsp.c	(original)
+++ trunk/stream/stream_rtsp.c	Mon Sep  1 09:31:57 2008
@@ -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"

Modified: trunk/stream/tcp.c
==============================================================================
--- trunk/stream/tcp.c	(original)
+++ trunk/stream/tcp.c	Mon Sep  1 09:31:57 2008
@@ -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"
 

Modified: trunk/stream/udp.c
==============================================================================
--- trunk/stream/udp.c	(original)
+++ trunk/stream/udp.c	Mon Sep  1 09:31:57 2008
@@ -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"
 



More information about the MPlayer-cvslog mailing list