Fixed compilation error on POSIX
Former-commit-id: 92c425519f250d15f4fe71d2e08e987b965dac70
This commit is contained in:
parent
d97d4b62e4
commit
cb007b48fd
|
|
@ -45,7 +45,7 @@ bool NzDirectoryImpl::NextResult()
|
|||
else
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
NazaraError("Unable to get next result: " + NzGetLastSystemError());
|
||||
NazaraError("Unable to get next result: " + NzError::GetLastSystemError());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ bool NzDirectoryImpl::Open(const NzString& dirPath)
|
|||
m_handle = opendir(dirPath.GetConstBuffer());
|
||||
if (!m_handle)
|
||||
{
|
||||
NazaraError("Unable to open directory: " + NzGetLastSystemError());
|
||||
NazaraError("Unable to open directory: " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ NzString NzDirectoryImpl::GetCurrent()
|
|||
if (getcwd(path, _PC_PATH_MAX))
|
||||
currentPath = path;
|
||||
else
|
||||
NazaraError("Unable to get current directory: " + NzGetLastSystemError());
|
||||
NazaraError("Unable to get current directory: " + NzError::GetLastSystemError());
|
||||
|
||||
delete[] path;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ bool NzFileImpl::EndOfFile() const
|
|||
void NzFileImpl::Flush()
|
||||
{
|
||||
if (fsync(m_fileDescriptor) == -1)
|
||||
NazaraError("Unable to flush file: " + NzGetLastSystemError());
|
||||
NazaraError("Unable to flush file: " + NzError::GetLastSystemError());
|
||||
}
|
||||
|
||||
nzUInt64 NzFileImpl::GetCursorPos() const
|
||||
|
|
@ -143,7 +143,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath)
|
|||
int fd1 = open64(sourcePath.GetConstBuffer(), O_RDONLY);
|
||||
if (fd1 == -1)
|
||||
{
|
||||
NazaraError("Fail to open input file (" + sourcePath + "): " + NzGetLastSystemError());
|
||||
NazaraError("Fail to open input file (" + sourcePath + "): " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath)
|
|||
int fd2 = open64(targetPath.GetConstBuffer(), O_WRONLY | O_TRUNC, permissions);
|
||||
if (fd2 == -1)
|
||||
{
|
||||
NazaraError("Fail to open output file (" + targetPath + "): " + NzGetLastSystemError()); // TODO: more info ?
|
||||
NazaraError("Fail to open output file (" + targetPath + "): " + NzError::GetLastSystemError()); // TODO: more info ?
|
||||
close(fd1);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ bool NzFileImpl::Copy(const NzString& sourcePath, const NzString& targetPath)
|
|||
{
|
||||
close(fd1);
|
||||
close(fd2);
|
||||
NazaraError("An error occured from copy : " + NzGetLastSystemError());
|
||||
NazaraError("An error occured from copy : " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
write(fd2,buffer,bytes);
|
||||
|
|
@ -185,7 +185,7 @@ bool NzFileImpl::Delete(const NzString& filePath)
|
|||
return true;
|
||||
else
|
||||
{
|
||||
NazaraError("Failed to delete file (" + filePath + "): " + NzGetLastSystemError());
|
||||
NazaraError("Failed to delete file (" + filePath + "): " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ bool NzFileImpl::Rename(const NzString& sourcePath, const NzString& targetPath)
|
|||
return true;
|
||||
else
|
||||
{
|
||||
NazaraError("Unable to rename file: " + NzGetLastSystemError());
|
||||
NazaraError("Unable to rename file: " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
NzSemaphoreImpl::NzSemaphoreImpl(unsigned int count)
|
||||
{
|
||||
if(sem_init(&m_semaphore, 0, count) != 0)
|
||||
NazaraError("Failed to create semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to create semaphore: " + NzError::GetLastSystemError());
|
||||
}
|
||||
|
||||
NzSemaphoreImpl::~NzSemaphoreImpl()
|
||||
|
|
@ -31,7 +31,7 @@ void NzSemaphoreImpl::Post()
|
|||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (sem_post(&m_semaphore)==-1)
|
||||
NazaraError("Failed to release semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to release semaphore: " + NzError::GetLastSystemError());
|
||||
#else
|
||||
sem_post(&m_semaphore);
|
||||
#endif
|
||||
|
|
@ -41,7 +41,7 @@ void NzSemaphoreImpl::Wait()
|
|||
{
|
||||
#if NAZARA_CORE_SAFE
|
||||
if (sem_wait(&m_semaphore) == -1 )
|
||||
NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError());
|
||||
#else
|
||||
sem_wait(&m_semaphore);
|
||||
#endif
|
||||
|
|
@ -60,7 +60,7 @@ bool NzSemaphoreImpl::Wait(nzUInt32 timeout)
|
|||
#if NAZARA_CORE_SAFE
|
||||
if (sem_timedwait(&m_semaphore, &ti) != 0)
|
||||
{
|
||||
NazaraError("Failed to wait for semaphore: " + NzGetLastSystemError());
|
||||
NazaraError("Failed to wait for semaphore: " + NzError::GetLastSystemError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ NzThreadImpl::NzThreadImpl(NzFunctor* functor)
|
|||
{
|
||||
int error = pthread_create(&m_handle, nullptr, &NzThreadImpl::ThreadProc, functor);
|
||||
if (error != 0)
|
||||
NazaraInternalError("Failed to create thread: " + NzGetLastSystemError());
|
||||
NazaraInternalError("Failed to create thread: " + NzError::GetLastSystemError());
|
||||
}
|
||||
|
||||
void NzThreadImpl::Detach()
|
||||
|
|
|
|||
Loading…
Reference in New Issue