s/ARABICA_WINDOWS/ARABICA_USE_WINSOCK

This commit is contained in:
jez 2006-12-13 19:18:31 +00:00
parent eb65f43391
commit 35851a0417
3 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@
///////////////////////////////////////////////////////////////////////
#include <SAX/ArabicaConfig.h>
#ifndef ARABICA_WINDOWS
#ifndef ARABICA_USE_WINSOCK
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@ -90,7 +90,7 @@ class basic_socketbuf : public std::basic_streambuf<charT, traitsT>
static const size_t bufferSize_;
static const size_t pbSize_;
#ifndef ARABICA_WINDOWS
#ifndef ARABICA_USE_WINSOCK
static const int INVALID_SOCKET;
static const int SOCKET_ERROR;
#endif
@ -101,7 +101,7 @@ const size_t basic_socketbuf<charT, traitsT>::bufferSize_ = 1024;
template<class charT, class traitsT>
const size_t basic_socketbuf<charT, traitsT>::pbSize_ = 4;
// why 4? both Josuttis and Langer&Kreft use 4.
#ifndef ARABICA_WINDOWS
#ifndef ARABICA_USE_WINSOCK
template<class charT, class traitsT>
const int basic_socketbuf<charT, traitsT>::INVALID_SOCKET = -1;
template<class charT, class traitsT>
@ -302,7 +302,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
} // if(res == 0)
else if(res == SOCKET_ERROR)
{
#ifdef ARABICA_WINDOWS
#ifdef ARABICA_USE_WINSOCK
if(GetLastError() == WSAEMSGSIZE)
{
// buffer was too small, so make it bigger
@ -325,7 +325,7 @@ int basic_socketbuf<charT, traitsT>::readSocket()
template <class charT, class traitsT>
int basic_socketbuf<charT, traitsT>::closeSocket(int sock) const
{
#ifdef ARABICA_WINDOWS
#ifdef ARABICA_USE_WINSOCK
return closesocket(sock);
#else
return ::close(sock);

View file

@ -115,7 +115,7 @@ namespace
std::istream* httpResolver(const std::string& httpURL)
{
#ifdef ARABICA_WINDOWS
#ifdef ARABICA_USE_WINSOCK
WORD wVersionRequested;
WSADATA wsaData;
int err;

View file

@ -31,7 +31,7 @@ define ARABICA_NO_CODECVT_SPECIALISATIONS
define HAVE_BOOST
#endif
define ARABICA_WINDOWS
define ARABICA_USE_WINSOCK
#if defined(_DEBUG) || (__DEBUG__)
define ARABICA_DEBUG