X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmisc%2Fzfstream.hxx;h=e226166c985bff5ef7db4ab0da2fbab4796e2061;hb=bb383998bb77002a6d94e83e253de01e116f9268;hp=0b281456549d294b7e7aa152258f31c3985c6636;hpb=5348f4eafe4daea2e110a19cab1c1fb4cbfedda6;p=simgear.git diff --git a/simgear/misc/zfstream.hxx b/simgear/misc/zfstream.hxx index 0b281456..e226166c 100644 --- a/simgear/misc/zfstream.hxx +++ b/simgear/misc/zfstream.hxx @@ -28,23 +28,9 @@ #ifndef _zfstream_hxx #define _zfstream_hxx -#ifdef HAVE_CONFIG_H -# include -#endif - #include -#ifdef HAVE_ZLIB -# include -#else -# include -#endif - -// At least Irix needs this -#ifdef SG_HAVE_NATIVE_SGI_COMPILERS -#include -SG_USING_STD(char_traits); -#endif +#include #ifdef SG_HAVE_STD_INCLUDES @@ -84,8 +70,6 @@ SG_USING_STD(streamoff); #if defined(__GNUC__) && __GNUC_MINOR__ < 8 # define ios_binary ios::bin -#elif defined( SG_HAVE_NATIVE_SGI_COMPILERS ) -# define ios_binary 0 #else # define ios_binary ios::binary #endif @@ -102,7 +86,11 @@ SG_USING_STD(streamoff); /** * A C++ I/O streams interface to the zlib gz* functions. */ +#ifdef SG_NEED_STREAMBUF_HACK +class gzfilebuf : public __streambuf +#else class gzfilebuf : public streambuf +#endif { public: @@ -153,7 +141,11 @@ public: protected: virtual int_type underflow(); +#ifndef SG_HAVE_STD_INCLUDES virtual int_type overflow( int_type c = traits_type::eof() ); +#else + virtual int_type overflow( int_type c = streambuf::traits_type::eof() ); +#endif private: @@ -188,7 +180,7 @@ struct gzifstream_base { gzifstream_base() {} - Gzfilebuf gzbuf; + gzfilebuf gzbuf; }; #endif // _zfstream_hxx