summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2010-01-16 19:34:13 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2010-01-16 19:37:06 -0800
commitdc1ed9952e639f3d5fb41401598d28c4a97f5a1c (patch)
tree2c3e0632d9a8776bfec176e62c1ccca0cb82fa5b
parentb1ce1e6bfbb65cca3230762cf99d4c0775561781 (diff)
Support gcc's __FUNCTION__ for people using other compilers
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--intel/intel_bufmgr_fake.c5
-rw-r--r--tests/drmstat.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c
index 54b3cb80..9914952f 100644
--- a/intel/intel_bufmgr_fake.c
+++ b/intel/intel_bufmgr_fake.c
@@ -51,6 +51,11 @@
#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__); \
diff --git a/tests/drmstat.c b/tests/drmstat.c
index e2e75234..345b8d2c 100644
--- a/tests/drmstat.c
+++ b/tests/drmstat.c
@@ -46,6 +46,11 @@
#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)