[Piglit] [PATCH 6/7] tests/util: Define snprintf as _snprintf on MSVC.

jfonseca at vmware.com jfonseca at vmware.com
Fri Nov 7 06:21:29 PST 2014


From: José Fonseca <jfonseca at vmware.com>

As the semantics of sprintf_s's arguments are quite different, so code
that relies on it might misbehave.
---
 tests/util/piglit-util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index 0238b7f..84e2066 100755
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -58,7 +58,7 @@ extern "C" {
 #define inline __inline
 #endif
 
-#define snprintf sprintf_s
+#define snprintf _snprintf
 
 #endif /* defined(_MSC_VER) */
 
-- 
1.9.1



More information about the Piglit mailing list