summaryrefslogtreecommitdiff
path: root/src/qcommon/files.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-04-20 21:28:21 -0500
committerTim Angus <tim@ngus.net>2013-05-03 16:10:50 +0100
commit92e917ca500b226bf8d18b47c85ede2f6c8aa62b (patch)
tree3e9735c8de76785b2009350f772c8e700c344a5d /src/qcommon/files.c
parent1f6f1c7f6f7843b745e2e6d6a67cd9bf3671d319 (diff)
Add fallback for __func__ (ioq3 isn't compiled as c99 by default)
Using Debian gcc version 4.7.2 and clang 3.0-6.1 anyway.
Diffstat (limited to 'src/qcommon/files.c')
-rw-r--r--src/qcommon/files.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index 59f60bc2..815953e8 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -287,8 +287,12 @@ FILE* missingFiles = NULL;
#endif
/* C99 defines __func__ */
-#ifndef __func__
-#define __func__ "(unknown)"
+#if __STDC_VERSION__ < 199901L
+# if __GNUC__ >= 2 || _MSC_VER >= 1300
+# define __func__ __FUNCTION__
+# else
+# define __func__ "(unknown)"
+# endif
#endif
/*