Add a platform macro indicating whether OS lets temp files be unlinked while open

This commit is contained in:
Brian Cox 2017-09-23 13:19:40 -07:00
parent ea885446c2
commit 99641c468f
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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"