On linux ostream and endl need prefixing into the std namespace.
This commit is contained in:
@@ -95,15 +95,32 @@ TTFile & TTFile::operator=
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
std::ostream & operator<<
|
||||||
|
(
|
||||||
|
std::ostream & os,
|
||||||
|
TTFile & file
|
||||||
|
)
|
||||||
|
#else
|
||||||
ostream & operator<<
|
ostream & operator<<
|
||||||
(
|
(
|
||||||
ostream & os,
|
ostream & os,
|
||||||
TTFile & file
|
TTFile & file
|
||||||
)
|
)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (file.ttFileOpFailed())
|
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 = "
|
return os << "Error in filename mapping; status = "
|
||||||
<< file.getStatus() << endl;
|
<< file.getStatus() << endl;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
|
#if defined(linux)
|
||||||
|
return os << file.data() << std::endl;
|
||||||
|
#else
|
||||||
return os << file.data() << endl;
|
return os << file.data() << endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,11 @@ class TTFile : public CString {
|
|||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
void TT_Exception (char *);
|
void TT_Exception (char *);
|
||||||
|
#if defined(linux)
|
||||||
|
friend std::ostream & operator<< (std::ostream &, TTFile &);
|
||||||
|
#else
|
||||||
friend ostream & operator<< (ostream &, TTFile &);
|
friend ostream & operator<< (ostream &, TTFile &);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ttFileOpFailed () { return status != TT_OK; }
|
int ttFileOpFailed () { return status != TT_OK; }
|
||||||
|
|||||||
@@ -72,7 +72,11 @@ class CString {
|
|||||||
int isNull() const;
|
int isNull() const;
|
||||||
void replace (const CString &, const CString &);
|
void replace (const CString &, const CString &);
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
friend std::ostream & operator<< (std::ostream &, const CString &);
|
||||||
|
#else
|
||||||
friend ostream & operator<< (ostream &, const CString &);
|
friend ostream & operator<< (ostream &, const CString &);
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char * contents;
|
char * contents;
|
||||||
|
|||||||
Reference in New Issue
Block a user