]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/libdrm.git/commitdiff
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 54b3cb80415b358ac45bdce359d530cafb80d0d8..9914952f1660ffd8427f8e634b28c98ec943b28f 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 e2e7523476de61f589196ddfaa836e6d542aaa40..345b8d2cda31f0ffc42624f5dcffd4166b098d53 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)