[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 666a2cadfbe84edbd8d52291c032c7841b479436..b93fcf666f015ee8624de8b63ce3140c89cff243 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 d6d6a4a49da099f003824217f10965d26e871ab6..ad31492f17b0451b968c2ce828ee3b870f16b61a 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