Define __FUNCTION__ as a preprocessor symbol in glheader.h if we're not
authorBrian Paul <brian.paul@tungstengraphics.com>
Sun, 19 Jun 2005 14:57:34 +0000 (14:57 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sun, 19 Jun 2005 14:57:34 +0000 (14:57 +0000)
using GCC or VMS.

src/mesa/main/glheader.h
src/mesa/tnl/t_vp_build.c

index abb858638eba4ed67bf34edda49759269dd7c455..a4dff0fe7f70c524c31a20db80bde622c58692dc 100644 (file)
@@ -285,6 +285,17 @@ int INLINE ffs(int value)
 }
 #endif
 
+
+/* The __FUNCTION__ gcc variable is generally only used for debugging.
+ * If we're not using gcc, define __FUNCTION__ as a cpp symbol here.
+ */
+#if defined(__VMS)
+#define __FUNCTION__ "VMS$NL:"
+#elif !(defined(__GNUC__) && __GNUC__ >= 2)
+#define __FUNCTION__ "unknown"
+#endif
+
+
 #include "config.h"
 
 #endif /* GLHEADER_H */
index 603da765b4a94a18431c7daff7dd77a71ce1ea75..74ab9a689288ca0af4652cddc8bc1a967b5c093c 100644 (file)
@@ -519,10 +519,6 @@ static void emit_op3fn(struct tnl_program *p,
    debug_insn(inst, fn, line);
 }
 
-   
-#ifdef __VMS
-#define __FUNCTION__ "VMS$NL:"
-#endif
 
 #define emit_op3(p, op, dst, mask, src0, src1, src2) \
    emit_op3fn(p, op, dst, mask, src0, src1, src2, __FUNCTION__, __LINE__)