compilation fix for HP-UX CC

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19042 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-31 22:56:49 +00:00
parent 2dc4e0b986
commit 83c627bba3

View File

@@ -71,19 +71,23 @@ size_t wxFileInputStream::OnSysRead(void *buffer, size_t size)
{
off_t ret = m_file->Read(buffer, size);
switch ( ret )
// NB: we can't use a switch here because HP-UX CC doesn't allow
// switching over long long (which off_t is in 64bit mode)
if ( !ret )
{
case 0:
m_lasterror = wxSTREAM_EOF;
break;
case wxInvalidOffset:
m_lasterror = wxSTREAM_READ_ERROR;
ret = 0;
break;
default:
m_lasterror = wxSTREAM_NO_ERROR;
// nothing read, so nothing more to read
m_lasterror = wxSTREAM_EOF;
}
else if ( ret == wxInvalidOffset )
{
m_lasterror = wxSTREAM_READ_ERROR;
ret = 0;
}
else
{
// normal case
m_lasterror = wxSTREAM_NO_ERROR;
}
return ret;