Commits

gyulalaszlo committed 2a46093 Draft

fix: make the library & unit test compile on MSVC 2010

  • Participants
  • Parent commits c9fd3c4
  • Branches gyulalaszlo/mkz-patches

Comments (0)

Files changed (1)

 #include <string.h>
 #include <stdio.h>
 
+
+// snprintf is not part of C89. It's standard only in C99. Microsoft has no plan supporting C99.
+// http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010
+// 
+// This definition results in a warning on MSVC.
+#if _MSC_VER
+#define snprintf _snprintf
+#endif
+
+
 namespace foundation
 {
 	/// Functions for operating on an Array<char> as a stream of characters,