summaryrefslogtreecommitdiff
path: root/src/qcommon/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon/files.c')
-rw-r--r--src/qcommon/files.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/qcommon/files.c b/src/qcommon/files.c
index 53385244..6b407c20 100644
--- a/src/qcommon/files.c
+++ b/src/qcommon/files.c
@@ -299,6 +299,11 @@ char lastValidGame[MAX_OSPATH];
FILE* missingFiles = NULL;
#endif
+/* C99 defines __func__ */
+#ifndef __func__
+#define __func__ "(unknown)"
+#endif
+
/*
==============
FS_Initialized
@@ -527,7 +532,7 @@ static void FS_CopyFile( char *fromOSPath, char *toOSPath ) {
Com_Printf( "copy %s to %s\n", fromOSPath, toOSPath );
- FS_FilenameIsExecutable( toOSPath, __FUNCTION__ );
+ FS_FilenameIsExecutable( toOSPath, __func__ );
if (strstr(fromOSPath, "journal.dat") || strstr(fromOSPath, "journaldata.dat")) {
Com_Printf( "Ignoring journal files\n");
@@ -570,7 +575,7 @@ FS_Remove
===========
*/
void FS_Remove( const char *osPath ) {
- FS_FilenameIsExecutable( osPath, __FUNCTION__ );
+ FS_FilenameIsExecutable( osPath, __func__ );
remove( osPath );
}
@@ -582,7 +587,7 @@ FS_HomeRemove
===========
*/
void FS_HomeRemove( const char *homePath ) {
- FS_FilenameIsExecutable( homePath, __FUNCTION__ );
+ FS_FilenameIsExecutable( homePath, __func__ );
remove( FS_BuildOSPath( fs_homepath->string,
fs_gamedir, homePath ) );
@@ -661,7 +666,7 @@ fileHandle_t FS_SV_FOpenFileWrite( const char *filename ) {
Com_Printf( "FS_SV_FOpenFileWrite: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;
@@ -772,7 +777,7 @@ void FS_SV_Rename( const char *from, const char *to ) {
Com_Printf( "FS_SV_Rename: %s --> %s\n", from_ospath, to_ospath );
}
- FS_FilenameIsExecutable( to_ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( to_ospath, __func__ );
if (rename( from_ospath, to_ospath )) {
// Failed, try copying it and deleting the original
@@ -806,7 +811,7 @@ void FS_Rename( const char *from, const char *to ) {
Com_Printf( "FS_Rename: %s --> %s\n", from_ospath, to_ospath );
}
- FS_FilenameIsExecutable( to_ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( to_ospath, __func__ );
if (rename( from_ospath, to_ospath )) {
// Failed, try copying it and deleting the original
@@ -869,7 +874,7 @@ fileHandle_t FS_FOpenFileWrite( const char *filename ) {
Com_Printf( "FS_FOpenFileWrite: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;
@@ -917,7 +922,7 @@ fileHandle_t FS_FOpenFileAppend( const char *filename ) {
Com_Printf( "FS_FOpenFileAppend: %s\n", ospath );
}
- FS_FilenameIsExecutable( ospath, __FUNCTION__ );
+ FS_FilenameIsExecutable( ospath, __func__ );
if( FS_CreatePath( ospath ) ) {
return 0;