[rt #71642] make vsnprintf() available on Win32
authorTony Cook <tony@develop-help.com>
Mon, 17 Oct 2011 05:27:31 +0000 (16:27 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 17 Oct 2011 05:31:45 +0000 (16:31 +1100)
Changes
imdatatypes.h

diff --git a/Changes b/Changes
index 666a2ca..b93fcf6 100644 (file)
--- a/Changes
+++ b/Changes
@@ -60,6 +60,12 @@ Bug fixes:
    perl could order it differently.
    https://rt.cpan.org/Ticket/Display.html?id=71675
 
+ - we rely on Config.pm's d_vsnprintf as to whether we use
+   vsnprintf/snprintf, which is defined in the Win32 Config.pm even
+   though it only has _ prefixed versions of these.  Define our own
+   prefixed names on Win32.
+   https://rt.cpan.org/Ticket/Display.html?id=71642
+
 Imager 0.85_01 - 10 Oct 2011
 ==============
 
index d6d6a4a..ad31492 100644 (file)
@@ -669,6 +669,15 @@ typedef struct i_render_tag i_render;
 #define I_FORMAT_ATTR(format_index, va_index)
 #endif
 
+#ifdef _MSC_VER
+#  ifndef vsnprintf
+#  define vsnprintf _vsnprintf
+#  endif
+#  ifndef snprintf
+#  define snprintf _snprintf
+#  endif
+#endif
+
 /*
 =item i_DF
 =category Data Types