Support gcc's __FUNCTION__ for people using other compilers
authorAlan Coopersmith <alan.coopersmith@sun.com>
Sun, 17 Jan 2010 03:34:13 +0000 (19:34 -0800)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Sun, 17 Jan 2010 03:37:06 +0000 (19:37 -0800)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
intel/intel_bufmgr_fake.c
tests/drmstat.c

index 54b3cb8..9914952 100644 (file)
 #include "mm.h"
 #include "libdrm_lists.h"
 
+/* Support gcc's __FUNCTION__ for people using other compilers */
+#if !defined(__GNUC__) && !defined(__FUNCTION__)
+# define __FUNCTION__ __func__ /* C99 */
+#endif
+
 #define DBG(...) do {                                  \
        if (bufmgr_fake->bufmgr.debug)                  \
                drmMsg(__VA_ARGS__);                    \
index e2e7523..345b8d2 100644 (file)
 #endif
 #include "xf86drm.h"
 
+/* Support gcc's __FUNCTION__ for people using other compilers */
+#if !defined(__GNUC__) && !defined(__FUNCTION__)
+# define __FUNCTION__ __func__ /* C99 */
+#endif
+
 int sigio_fd;
 
 static double usec(struct timeval *end, struct timeval *start)