mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Move '#define closesocket close' preprocessor directive to a common place
and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27505 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f27f04a53d
commit
788a4d5f91
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#ifndef HAVE_WINSOCK2_H
|
||||
#define closesocket close
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -22,6 +22,10 @@
|
||||
#include "url.h"
|
||||
#include "http.h"
|
||||
|
||||
#ifndef HAVE_CLOSESOCKET
|
||||
#define closesocket close
|
||||
#endif
|
||||
|
||||
#define BUFFER_SIZE 2048
|
||||
|
||||
typedef struct {
|
||||
|
@ -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"
|
||||
|
@ -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 */
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user