summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2016-01-11 05:52:18 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2016-01-11 05:52:18 -0500
commit7661f1c2bf2b45603264076fabce2eb42373cd18 (patch)
treecf26bc7090aa90db5ccd5342c1bbf902a839b0cf /src/base
parentc965ca96cccb91632d11f43f24e7a2c5039206d2 (diff)
downloadgem5-7661f1c2bf2b45603264076fabce2eb42373cd18.tar.xz
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.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/output.cc6
1 files changed, 3 insertions, 3 deletions
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 <cstdlib>
#include <fstream>
-#include <gzstream.hh>
+#include <zfstream.h>
#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<ogzstream*>(i->second);
+ gzofstream *gfs = dynamic_cast<gzofstream*>(i->second);
if (gfs) {
gfs->close();
delete i->second;