mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 02:52:30 +02:00
Removed header because "HTTP.cpp" was the only source that included it, and that source was removed.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@455 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
7beada8f54
commit
4952852799
@ -1,55 +0,0 @@
|
||||
// Under MIT licence from http://www.mindcontrol.org/~hplus/http-get.html
|
||||
// We only use a subset of the definitions in the original source.
|
||||
|
||||
#if !defined( sock_port_h )
|
||||
#define sock_port_h
|
||||
|
||||
// There are differences between Linux/Berkeley sockets and WinSock2
|
||||
// This file wraps some of the more common ones (as used by this library).
|
||||
|
||||
#if defined(_WIN32)
|
||||
// Windows features go here
|
||||
|
||||
#include <Winsock2.h>
|
||||
|
||||
typedef int socklen_t;
|
||||
#define MAKE_SOCKET_NONBLOCKING(x,r) \
|
||||
do { u_long _x = 1; (r) = ioctlsocket( (x), FIONBIO, &_x ); } while(0)
|
||||
#define NONBLOCK_MSG_SEND 0
|
||||
#define INIT_SOCKET_LIBRARY() \
|
||||
do { WSADATA wsaData; WSAStartup( MAKEWORD(2,2), &wsaData ); } while(0)
|
||||
|
||||
#define BAD_SOCKET_FD 0xffffffffU
|
||||
|
||||
#define SOCKET_ERRNO WSAGetLastError()
|
||||
inline bool SOCKET_WOULDBLOCK_ERROR(int e) { return e == WSAEWOULDBLOCK; }
|
||||
inline bool SOCKET_NEED_REOPEN(int e) { return e == WSAECONNRESET; }
|
||||
|
||||
#else
|
||||
// POSIX features go here
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#include <cerrno>
|
||||
|
||||
#if !defined(SOCKET)
|
||||
#define SOCKET int
|
||||
#endif
|
||||
|
||||
// hack -- I don't make it non-blocking; instead, I pass
|
||||
// NONBLOCK_MSG_SEND for each call to sendto()
|
||||
#define MAKE_SOCKET_NONBLOCKING(x,r) do { (r) = 0; } while(0)
|
||||
#define NONBLOCK_MSG_SEND MSG_DONTWAIT
|
||||
#define INIT_SOCKET_LIBRARY() do {} while(0)
|
||||
|
||||
#define BAD_SOCKET_FD -1
|
||||
|
||||
#define closesocket close
|
||||
|
||||
#define SOCKET_ERRNO errno
|
||||
inline bool SOCKET_WOULDBLOCK_ERROR(int e) { return e == EWOULDBLOCK; }
|
||||
inline bool SOCKET_NEED_REOPEN(int e) { return false; }
|
||||
|
||||
#endif
|
||||
|
||||
#endif // sock_port_h
|
Loading…
Reference in New Issue
Block a user