Miguel Freitas 2014-01-24 10:39:35 -02:00
parent 440525ebaa
commit e3f7dfe811
8 changed files with 19 additions and 7 deletions

View File

@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define Protocol Protocol_
#endif
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -33,6 +33,11 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef TORRENT_CONFIG_HPP_INCLUDED
#define TORRENT_CONFIG_HPP_INCLUDED
#if defined __CYGWIN__
#define __STDC_LIMIT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#endif
#include <boost/config.hpp>
#include <boost/version.hpp>
#include <stdio.h> // for snprintf
@ -235,6 +240,13 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_USE_EXECINFO 1
#endif
// ==== CYGWIN ===
#elif defined __CYGWIN__
#define TORRENT_CYGWIN
#define TORRENT_USE_IFADDRS 1
#define TORRENT_USE_IFCONF 1
#define TORRENT_HAS_SALEN 0
// ==== MINGW ===
#elif defined __MINGW32__
#define TORRENT_MINGW

View File

@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/version.hpp>
#include "libtorrent/config.hpp"
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/version.hpp>
#include "libtorrent/config.hpp"
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/version.hpp>
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -45,7 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define Protocol Protocol_
#endif
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/config.hpp"
#include "libtorrent/time.hpp"
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
// asio assumes that the windows error codes are defined already
#include <winsock2.h>
#endif

View File

@ -46,7 +46,7 @@ namespace libtorrent
{
void sleep(int milliseconds)
{
#if defined TORRENT_WINDOWS || defined TORRENT_CYGWIN
#if defined TORRENT_WINDOWS
Sleep(milliseconds);
#elif defined TORRENT_BEOS
snooze_until(system_time() + boost::int64_t(milliseconds) * 1000, B_SYSTEM_TIMEBASE);