Skip to content

Commit

Permalink
Add fallback for __func__ (ioq3 isn't compiled as c99 by default)
Browse files Browse the repository at this point in the history
Using Debian gcc version 4.7.2 and clang 3.0-6.1 anyway.
  • Loading branch information
zturtleman committed Apr 21, 2013
1 parent 1c66e30 commit a7317ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions code/qcommon/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,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

/*
Expand Down

0 comments on commit a7317ac

Please sign in to comment.