Initial MSVC support.

This commit is contained in:
XMRig 2017-06-12 16:19:07 +03:00
parent a370b8fd30
commit 3df545cfc5
21 changed files with 845 additions and 96 deletions

View file

@ -28,6 +28,9 @@
#include <stdint.h>
#include "align.h"
class Job
{
public:
@ -52,8 +55,8 @@ public:
private:
int m_poolId;
char m_id[64] __attribute__((aligned(16)));
uint8_t m_blob[84] __attribute__((aligned(16))); // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
VAR_ALIGN(16, char m_id[64]);
VAR_ALIGN(16, uint8_t m_blob[84]); // Max blob size is 84 (75 fixed + 9 variable), aligned to 96. https://github.com/xmrig/xmrig/issues/1 Thanks fireice-uk.
uint32_t m_size;
uint64_t m_diff;
uint64_t m_target;

View file

@ -29,6 +29,11 @@
#include "net/Url.h"
#ifdef _MSC_VER
# define strncasecmp(x,y,z) _strnicmp(x,y,z)
#endif
Url::Url() :
m_host(nullptr),
m_port(3333)
@ -66,7 +71,7 @@ Url::Url(const char *url) :
return;
}
char *port = strchr(base, ':');
const char *port = strchr(base, ':');
if (!port) {
m_host = strdup(base);
return;