On linux ostream and endl need prefixing into the std namespace.

This commit is contained in:
Peter Howkins
2012-03-13 17:40:21 +00:00
parent adf14ccd77
commit 5d76061f5d
3 changed files with 25 additions and 0 deletions

View File

@@ -95,15 +95,32 @@ TTFile & TTFile::operator=
return *this;
}
#if defined(linux)
std::ostream & operator<<
(
std::ostream & os,
TTFile & file
)
#else
ostream & operator<<
(
ostream & os,
TTFile & file
)
#endif
{
if (file.ttFileOpFailed())
#if defined(linux)
return os << "Error in filename mapping; status = "
<< file.getStatus() << std::endl;
#else
return os << "Error in filename mapping; status = "
<< file.getStatus() << endl;
#endif
else
#if defined(linux)
return os << file.data() << std::endl;
#else
return os << file.data() << endl;
#endif
}