2011-05-14 20:10:21 +02:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
2011-08-09 13:27:58 +02:00
|
|
|
// Copyright (c) 2011 The Bitcoin developers
|
2011-05-14 20:10:21 +02:00
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(disable:4786)
|
|
|
|
#pragma warning(disable:4804)
|
|
|
|
#pragma warning(disable:4805)
|
|
|
|
#pragma warning(disable:4717)
|
|
|
|
#endif
|
|
|
|
#ifdef _WIN32_WINNT
|
|
|
|
#undef _WIN32_WINNT
|
|
|
|
#endif
|
2012-01-03 23:33:31 +01:00
|
|
|
#define _WIN32_WINNT 0x0501
|
2011-05-14 20:10:21 +02:00
|
|
|
#ifdef _WIN32_IE
|
|
|
|
#undef _WIN32_IE
|
|
|
|
#endif
|
|
|
|
#define _WIN32_IE 0x0400
|
|
|
|
#define WIN32_LEAN_AND_MEAN 1
|
2011-10-10 18:08:05 +02:00
|
|
|
|
|
|
|
// Include boost/foreach here as it defines __STDC_LIMIT_MACROS on some systems.
|
|
|
|
#include <boost/foreach.hpp>
|
|
|
|
|
2011-05-14 20:10:21 +02:00
|
|
|
#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
|
|
#include <sys/param.h> // to get BSD define
|
|
|
|
#endif
|
2011-10-07 17:02:21 +02:00
|
|
|
#ifdef MAC_OSX
|
2011-05-14 20:10:21 +02:00
|
|
|
#ifndef BSD
|
|
|
|
#define BSD 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#include <openssl/buffer.h>
|
|
|
|
#include <openssl/ecdsa.h>
|
|
|
|
#include <openssl/evp.h>
|
|
|
|
#include <openssl/rand.h>
|
|
|
|
#include <openssl/sha.h>
|
|
|
|
#include <openssl/ripemd.h>
|
|
|
|
#include <db_cxx.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <float.h>
|
|
|
|
#include <assert.h>
|
|
|
|
#include <iostream>
|
|
|
|
#include <sstream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
|
|
|
#include <deque>
|
|
|
|
#include <map>
|
2011-06-18 18:46:01 +02:00
|
|
|
|
2011-10-07 17:02:21 +02:00
|
|
|
#ifdef WIN32
|
2011-05-14 20:10:21 +02:00
|
|
|
#include <windows.h>
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <mswsock.h>
|
|
|
|
#include <shlobj.h>
|
|
|
|
#include <shlwapi.h>
|
|
|
|
#include <io.h>
|
|
|
|
#include <process.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
#else
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/resource.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <net/if.h>
|
|
|
|
#include <ifaddrs.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#endif
|
|
|
|
#ifdef BSD
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include "serialize.h"
|
|
|
|
#include "uint256.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "bignum.h"
|
|
|
|
#include "base58.h"
|
|
|
|
#include "main.h"
|
2011-06-22 20:11:12 +02:00
|
|
|
#ifdef QT_GUI
|
|
|
|
#include "qtui.h"
|
|
|
|
#else
|
|
|
|
#include "noui.h"
|
|
|
|
#endif
|