New mason-based build system

This commit is contained in:
Konstantin Käfer
2014-10-22 15:13:35 +02:00
37 changed files with 311 additions and 519 deletions

View File

@@ -18,7 +18,7 @@ std::string compress(const std::string &raw) {
}
deflate_stream.next_in = (Bytef *)raw.data();
deflate_stream.avail_in = raw.size();
deflate_stream.avail_in = uInt(raw.size());
std::string result;
char out[16384];
@@ -53,7 +53,7 @@ std::string decompress(const std::string &raw) {
}
inflate_stream.next_in = (Bytef *)raw.data();
inflate_stream.avail_in = raw.size();
inflate_stream.avail_in = uInt(raw.size());
std::string result;
char out[15384];

View File

@@ -208,7 +208,7 @@ int raw_equal(const char *first, const char *second)
int clamp_to_int(long slnum)
{
return slnum > INT_MAX ? INT_MAX : slnum < INT_MIN ? INT_MIN : slnum;
return slnum > INT_MAX ? INT_MAX : slnum < INT_MIN ? INT_MIN : (int)slnum;
}

View File

@@ -8,7 +8,15 @@ typedef struct {
void *queue[2];
} uv__messenger_item_t;
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
void uv__messenger_callback(uv_async_t *async, int status) {
#pragma clang diagnostic pop
#else
void uv__messenger_callback(uv_async_t *async) {
#endif
uv_messenger_t *msgr = (uv_messenger_t *)async->data;
uv__messenger_item_t *item;

View File

@@ -5,6 +5,11 @@
namespace uv {
std::string cwd() {
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
char dir[512];
uv_cwd(dir, 512);
return dir;
#else
size_t max = 0;
std::string dir;
do {
@@ -14,6 +19,7 @@ std::string cwd() {
} while (max == dir.size());
dir.resize(max - 1);
return dir;
#endif
}
void deleter::operator()(uv_async_t *async) {