]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/zfstream.hxx
Modified Files:
[simgear.git] / simgear / misc / zfstream.hxx
index cfd7731ac8c17067fb0975bbfb81b9102cfb520f..8e1c16c7edbfd0acd64b183ba2ab8be6e25b9c3d 100644 (file)
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Library General Public License for more details.
 //
-// You should have received a copy of the GNU Library General Public
-// License along with this library; if not, write to the
-// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-// Boston, MA  02111-1307, USA.
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 #ifndef _zfstream_hxx
 #define _zfstream_hxx
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
 #include <simgear/compiler.h>
 
-#ifdef HAVE_ZLIB
-#  include <zlib.h>
-#else
-#  include <simgear/zlib/zlib.h>
-#endif
-
-// At least Irix needs this
-#ifdef SG_HAVE_NATIVE_SGI_COMPILERS
-#include <char_traits.h>
-SG_USING_STD(char_traits);
-#endif
+#include <zlib.h>
 
 #ifdef SG_HAVE_STD_INCLUDES
 
@@ -84,8 +69,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 +85,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 +140,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: