Mesa (master): gallium: Define __func__ on MSVC.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Mar 4 11:55:41 UTC 2011
Module: Mesa
Branch: master
Commit: d40b868db5b82529cbe07598b2ebef23cc31a7fa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d40b868db5b82529cbe07598b2ebef23cc31a7fa
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Mar 4 11:46:13 2011 +0000
gallium: Define __func__ on MSVC.
---
src/gallium/include/pipe/p_compiler.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 3d6b5b5..3441db6 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -171,6 +171,18 @@ typedef unsigned char boolean;
# define __FUNCTION__ "<unknown>"
# 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
More information about the mesa-commit
mailing list