Commits

gyulalaszlo committed 7f39c9b Draft

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

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,