Author: wyoung
Date: Thu Apr  7 15:50:30 2016
New Revision: 2782

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2782&view=rev
Log:
Made the _snprintf() #define for VC++ conditional, so it no longer
occurs for VC++ 2015 and newer, which *finally* provide snprintf() in
stdio.h.  Fix pointed out by "dan g" on the mailing list.

Modified:
    trunk/lib/common.h

Modified: trunk/lib/common.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/common.h?rev=2782&r1=2781&r2=2782&view=diff
==============================================================================
--- trunk/lib/common.h  (original)
+++ trunk/lib/common.h  Thu Apr  7 15:50:30 2016
@@ -88,8 +88,11 @@
 #              pragma warning(disable: 4800)
                // Disable nagging about new "secure" functions like strncpy_s()
 #              pragma warning(disable: 4996)
-               // Call _snprintf() for VC++ version of snprintf() function
-#              define snprintf _snprintf
+
+               // Prior to Visual C++ 2015, we must use _snprintf()
+#              if _MSC_VER < 1900
+#                      define snprintf _snprintf
+#              endif
 #      endif
 
        // Define DLL import/export tags for Windows compilers, where we build


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to