diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h index d982c101d..4562bea66 100644 --- a/src/cairo-compiler-private.h +++ b/src/cairo-compiler-private.h @@ -201,10 +201,12 @@ #define hypot _hypot #define pclose _pclose #define popen _popen -#define snprintf _snprintf #define strdup _strdup #define unlink _unlink -#define vsnprintf _vsnprintf +#if _MSC_VER < 1900 + #define vsnprintf _vsnprintf + #define snprintf _snprintf +#endif #endif #ifdef _MSC_VER diff --git a/test/bitmap-font.c b/test/bitmap-font.c index 525bafb2a..f9d753954 100644 --- a/test/bitmap-font.c +++ b/test/bitmap-font.c @@ -27,7 +27,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include @@ -73,6 +75,10 @@ check_font_extents (const cairo_test_context_t *ctx, cairo_t *cr, const char *co return CAIRO_TEST_SUCCESS; } +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { diff --git a/test/cairo-test.h b/test/cairo-test.h index 767c1ddf5..6d423ba01 100644 --- a/test/cairo-test.h +++ b/test/cairo-test.h @@ -58,7 +58,9 @@ typedef unsigned __int64 uint64_t; #define _USE_MATH_DEFINES #include +#if _MSC_VER <= 1600 #define isnan(x) _isnan(x) +#endif #endif