summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-09-06 13:56:07 +0100
committerJosé Fonseca <[email protected]>2010-09-06 13:57:44 +0100
commit079c8840609f1277320bd85c3e9568179e30bfd3 (patch)
tree4aff6c903d48c0d9aa309e6d4cae9d21c10fce1f /src/mesa
parent35e01b79cb576503fc6c7cd5759b379c26ecb5ee (diff)
mesa: Define C99's __func__ macro on MSVC.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/compiler.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index ded69c3106c..800eb839005 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -224,6 +224,18 @@ extern "C" {
# endif
# endif
#endif
+#ifndef __func__
+# if (__STDC_VERSION__ >= 199901L) || \
+ (defined(__SUNPRO_C) && defined(__C99FEATURES__))
+ /* __func__ is part of C99 */
+# elif defined(_MSC_VER)
+# if _MSC_VER >= 1300
+# define __func__ __FUNCTION__
+# else
+# define __func__ "<unknown>"
+# endif
+# endif
+#endif
/**