aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--src/fs/io/GunzipReader.cxx3
-rw-r--r--src/fs/io/GunzipReader.hxx2
-rw-r--r--src/fs/io/GzipOutputStream.cxx3
-rw-r--r--src/fs/io/GzipOutputStream.hxx2
-rw-r--r--src/lib/zlib/Domain.cxx24
-rw-r--r--src/lib/zlib/Domain.hxx27
7 files changed, 54 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index b8179b31a..d28e6b599 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -529,6 +529,7 @@ libfs_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS)
if HAVE_ZLIB
libfs_a_SOURCES += \
+ src/lib/zlib/Domain.cxx src/lib/zlib/Domain.hxx \
src/fs/io/GunzipReader.cxx src/fs/io/GunzipReader.hxx \
src/fs/io/GzipOutputStream.cxx src/fs/io/GzipOutputStream.hxx
FS_LIBS += $(ZLIB_LIBS)
diff --git a/src/fs/io/GunzipReader.cxx b/src/fs/io/GunzipReader.cxx
index 388b26412..ad5e41784 100644
--- a/src/fs/io/GunzipReader.cxx
+++ b/src/fs/io/GunzipReader.cxx
@@ -19,11 +19,10 @@
#include "config.h"
#include "GunzipReader.hxx"
+#include "lib/zlib/Domain.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
-const Domain zlib_domain("zlib");
-
GunzipReader::GunzipReader(Reader &_next, Error &error)
:next(_next), eof(false)
{
diff --git a/src/fs/io/GunzipReader.hxx b/src/fs/io/GunzipReader.hxx
index 689125a6a..34fc653fa 100644
--- a/src/fs/io/GunzipReader.hxx
+++ b/src/fs/io/GunzipReader.hxx
@@ -29,8 +29,6 @@
class Error;
class Domain;
-extern const Domain zlib_domain;
-
/**
* A filter that decompresses data using zlib.
*/
diff --git a/src/fs/io/GzipOutputStream.cxx b/src/fs/io/GzipOutputStream.cxx
index d05645d9e..27ae6b2ad 100644
--- a/src/fs/io/GzipOutputStream.cxx
+++ b/src/fs/io/GzipOutputStream.cxx
@@ -19,11 +19,10 @@
#include "config.h"
#include "GzipOutputStream.hxx"
+#include "lib/zlib/Domain.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
-const Domain zlib_domain("zlib");
-
GzipOutputStream::GzipOutputStream(OutputStream &_next, Error &error)
:next(_next)
{
diff --git a/src/fs/io/GzipOutputStream.hxx b/src/fs/io/GzipOutputStream.hxx
index 4f6d8b357..e23835de8 100644
--- a/src/fs/io/GzipOutputStream.hxx
+++ b/src/fs/io/GzipOutputStream.hxx
@@ -29,8 +29,6 @@
class Error;
class Domain;
-extern const Domain zlib_domain;
-
/**
* A filter that compresses data written to it using zlib, forwarding
* compressed data in the "gzip" format.
diff --git a/src/lib/zlib/Domain.cxx b/src/lib/zlib/Domain.cxx
new file mode 100644
index 000000000..96aad1350
--- /dev/null
+++ b/src/lib/zlib/Domain.cxx
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "Domain.hxx"
+#include "util/Domain.hxx"
+
+const Domain zlib_domain("zlib");
diff --git a/src/lib/zlib/Domain.hxx b/src/lib/zlib/Domain.hxx
new file mode 100644
index 000000000..653ac0209
--- /dev/null
+++ b/src/lib/zlib/Domain.hxx
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.
+ */
+
+#ifndef MPD_ZLIB_DOMAIN_HXX
+#define MPD_ZLIB_DOMAIN_HXX
+
+class Domain;
+
+extern const Domain zlib_domain;
+
+#endif