From 7661f1c2bf2b45603264076fabce2eb42373cd18 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 11 Jan 2016 05:52:18 -0500 Subject: ext: Replace gzstream with iostream3 from zlib to avoid LGPL This patch replaces the gzstream zlib wrapper with the iostream3 wrapper provided as part of zlib contributions. The main reason for the switch is to avoid including LGPL in the default gem5 build. iostream3 is provided under a more permissive license: The code is provided "as is", with the permission to use, copy, modify, distribute and sell it for any purpose without fee. --- src/base/output.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/base/output.cc') diff --git a/src/base/output.cc b/src/base/output.cc index 516a1d05a..c2a37e58e 100644 --- a/src/base/output.cc +++ b/src/base/output.cc @@ -40,7 +40,7 @@ #include #include -#include +#include #include "base/misc.hh" #include "base/output.hh" @@ -82,7 +82,7 @@ OutputDirectory::openFile(const string &filename, bool gz = !no_gz; gz = gz && filename.find(".gz", filename.length()-3) < filename.length(); if (gz) { - ogzstream *file = new ogzstream(filename.c_str(), mode); + gzofstream *file = new gzofstream(filename.c_str(), mode); if (!file->is_open()) fatal("Cannot open file %s", filename); assert(files.find(filename) == files.end()); @@ -111,7 +111,7 @@ OutputDirectory::close(ostream *openStream) { delete i->second; break; } else { - ogzstream *gfs = dynamic_cast(i->second); + gzofstream *gfs = dynamic_cast(i->second); if (gfs) { gfs->close(); delete i->second; -- cgit v1.2.3