Browse Source

Fix compilation on Visual Studio 2015

v1.x
Radosław Eichler 9 years ago
parent
commit
9e7c44b4e0
  1. 1
      binding.gyp
  2. 5
      src/color.cc
  3. 5
      src/init.cc

1
binding.gyp

@ -62,7 +62,6 @@
'<(GTK_Root)/include/cairo',
],
'defines': [
'snprintf=_snprintf',
'_USE_MATH_DEFINES' # for M_PI
],
'configurations': {

5
src/color.cc

@ -10,6 +10,11 @@
#include <cmath>
#include <limits>
// Compatibility with Visual Studio versions prior to VS2015
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
/*
* Parse integer value
*/

5
src/init.cc

@ -17,6 +17,11 @@
#include "FontFace.h"
#endif
// Compatibility with Visual Studio versions prior to VS2015
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
NAN_MODULE_INIT(init) {
Canvas::Initialize(target);
Image::Initialize(target);

Loading…
Cancel
Save