summaryrefslogtreecommitdiff
path: root/source/core/slang-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/core/slang-common.h')
-rw-r--r--source/core/slang-common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/core/slang-common.h b/source/core/slang-common.h
index 7fddb067e..cd1490a20 100644
--- a/source/core/slang-common.h
+++ b/source/core/slang-common.h
@@ -120,6 +120,12 @@ template<typename T> void slang_use_obj(T&) {}
#endif
#endif
+#if defined(_MSC_VER)
+# define SLANG_ATTR_PRINTF(string_index, varargs_index)
+#else
+# define SLANG_ATTR_PRINTF(string_index, varargs_index) __attribute__((format(printf, string_index, varargs_index)))
+#endif
+
#ifndef SLANG_RT_API
#define SLANG_RT_API
#endif