Detect which stdiostream implementation to use From: Lukas Nellen The HAVE_BOOT_IOSTREAMS detection is broken, since root's config.h gets loaded, no the one from fdeventlib. --- FdUtil/src/FdStdioStream.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FdUtil/src/FdStdioStream.hh b/FdUtil/src/FdStdioStream.hh index 9bcdf43..decaa58 100644 --- a/FdUtil/src/FdStdioStream.hh +++ b/FdUtil/src/FdStdioStream.hh @@ -30,7 +30,7 @@ #include #else // provide a compatible solution for gcc >= 3.0 - #if (!defined DPA && defined(__GNUC__)) || (HAVE_BOOST_IOSTREAMS == 0) + #if (!defined DPA && defined(__GNUC__)) || (!defined(__clang__) && HAVE_BOOST_IOSTREAMS == 0) // use GNU extension to 'fake' stdiostream. #include #include @@ -55,7 +55,7 @@ typedef std::ostdiostream OstdioStream; #else - #if (!defined DPA && defined(__GNUC__)) || (HAVE_BOOST_IOSTREAMS == 0) + #if (!defined DPA && defined(__GNUC__)) || (!defined(__clang__) && HAVE_BOOST_IOSTREAMS == 0) /** This class implements a backward compatible ostdiostream. * @@ -65,7 +65,7 @@ typedef std::ostdiostream OstdioStream; */ class OstdioStream : public std::ostream { public: - OstdioStream(FILE* f) : + OstdioStream(FILE* f) : std::ostream( &fFilebuf ), fFilebuf(f, ios_base::out) {} private: OstdioStream(); @@ -107,7 +107,7 @@ private: */ typedef boost::iostreams::stream OstdioStream; #endif // (!DPA && __GNUCC__) || (HAVE_BOOST_IOSTREAMS == 0) - + #endif // __GNUC__ } // namespace FdUtil