diff --git a/src/core/file_unix.cpp b/src/core/file_unix.cpp index 963bc9e..8144aa0 100644 --- a/src/core/file_unix.cpp +++ b/src/core/file_unix.cpp @@ -94,7 +94,7 @@ cFile_i::~cFile_i() fclose( mpCurrStream ); mpCurrStream = NULL; -#if IS_AROS || IS_RISCOS +#if !CAN_UNLINK_WHILE_OPEN // so unlink after close instead if( mFlags & cFile::OPEN_LOCKED_TEMP ) { // unlink this file @@ -209,7 +209,7 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags ) } mpData->m_fd = fh; -#if !IS_AROS && !IS_RISCOS +#if CAN_UNLINK_WHILE_OPEN if( flags & OPEN_LOCKED_TEMP ) { // unlink this file diff --git a/src/core/platform.h b/src/core/platform.h index 87a904f..7faeb7e 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -328,6 +328,9 @@ #define SUPPORTS_TERMIOS (!IS_RTEMS && !IS_REDOX) // RTEMS errors are probably just a buildsys issue & this will change or go away. +// Redox will probably implement this in the future. + +#define CAN_UNLINK_WHILE_OPEN (!IS_AROS && !IS_RISCOS && !IS_REDOX) #define SUPPORTS_DOUBLE_SLASH_PATH (IS_CYGWIN) // POSIX standard says paths beginning with 2 slashes are "implementation defined"