8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:43:02 +01:00

Enable unlink of temporary trace files for WINNT only. This is temporary solution.

This commit is contained in:
hvlad 2009-02-02 16:24:33 +00:00
parent 9d377001a7
commit bdcdb6a328
2 changed files with 9 additions and 3 deletions

View File

@ -85,7 +85,7 @@ ConfigStorage::~ConfigStorage()
::close(m_cfg_file);
m_cfg_file = -1;
#ifdef WIN_NT
// unlink((char*) &m_base->cfg_file_name[0]);
unlink((char*) &m_base->cfg_file_name[0]);
#endif
ISC_STATUS_ARRAY status;
@ -125,6 +125,7 @@ void ConfigStorage::initShMem(void* arg, SH_MEM_T* shmemData, bool initialize)
header->version = 1;
header->change_number = 0;
header->session_number = 1;
memset(header->cfg_file_name, 0, sizeof(header->cfg_file_name));
#ifndef WIN_NT
checkMutex("init", ISC_mutex_init(&header->mutex));
#endif

View File

@ -101,7 +101,9 @@ TraceLogImpl::~TraceLogImpl()
ISC_unmap_file(status, &m_handle);
if (m_reader || readerDone) {
// unlink(m_baseFileName.c_str());
#ifdef WIN_NT
unlink(m_baseFileName.c_str());
#endif
}
}
@ -126,8 +128,11 @@ int TraceLogImpl::removeFile(int fileNum)
{
PathName fileName;
fileName.printf("%s.%07ld", m_baseFileName.c_str(), fileNum);
// return unlink(fileName.c_str());
#ifdef WIN_NT
return unlink(fileName.c_str());
#else
return 0;
#endif
}
size_t TraceLogImpl::read(void* buf, size_t size)