compilation fix for HP-UX CC

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

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;