Skip to content

Commit

Permalink
Cleanup possible due to abstracting compression code.
Browse files Browse the repository at this point in the history
Now that the compression code is mostly in the shared library we no
longer need to include zlib headers etc all over the place as all
code accessing any compression specific interface is abstracted now we
can cleanup the header files and the Makefiles. This way we also don't
leak to many global stuff into our namespace which will never be used
anyway.
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 5dab02c commit 3d0c1d1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 25 deletions.
4 changes: 4 additions & 0 deletions src/filed/compression.c
Expand Up @@ -31,6 +31,10 @@

#if defined(HAVE_LZO) || defined(HAVE_LIBZ) || defined(HAVE_FASTLZ)

#if defined(HAVE_LIBZ)
#include <zlib.h>
#endif

#if defined(HAVE_LZO)
#include <lzo/lzoconf.h>
#include <lzo/lzo1x.h>
Expand Down
5 changes: 0 additions & 5 deletions src/filed/filed.h
Expand Up @@ -32,11 +32,6 @@
#include "lib/htable.h"
#include "lib/runscript.h"
#include "findlib/find.h"
#ifdef HAVE_LIBZ
#include <zlib.h> /* compression headers */
#else
#define uLongf uint32_t
#endif
#include "ch.h"
#include "backup.h"
#include "restore.h"
Expand Down
6 changes: 0 additions & 6 deletions src/stored/Makefile.in
Expand Up @@ -68,8 +68,6 @@ COPYSRCS = acquire.c ansi_label.c autochanger.c bcopy.c block.c bsr.c \
spool.c stored_conf.c vol_mgr.c vtape.c wait.c
COPYOBJS = $(COPYSRCS:.c=.o)

COMPRESS_CPPFLAGS += @ZLIB_INC@ @LZO_INC@ @FASTLZ_INC@

SD_LIBS += @CAP_LIBS@
BEXTRACT_LIBS += @ZLIB_LIBS_NONSHARED@
BEXTRACT_LIBS += @LZO_LIBS_NONSHARED@
Expand Down Expand Up @@ -130,10 +128,6 @@ bls: Makefile $(BLSOBJS) ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) ../lib/
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BLSOBJS) $(DLIB) \
-lbareosfind -lbareoscfg -lbareos -lm $(LIBS) $(GETTEXT_LIBS)

bextract.o: bextract.c
@echo "Compiling $<"
$(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(COMPRESS_CPPFLAGS) $(INCLUDES) $(DINCLUDE) $(CXXFLAGS) $<

bextract: Makefile $(BEXTOBJS) ../findlib/libbareosfind$(DEFAULT_ARCHIVE_TYPE) ../lib/libbareoscfg$(DEFAULT_ARCHIVE_TYPE) ../lib/libbareos$(DEFAULT_ARCHIVE_TYPE)
@echo "Compiling $<"
$(LIBTOOL_LINK) $(CXX) $(TTOOL_LDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(BEXTOBJS) $(DLIB) \
Expand Down
9 changes: 0 additions & 9 deletions src/stored/bextract.c
Expand Up @@ -32,15 +32,6 @@
#include "lib/crypto_cache.h"
#include "findlib/find.h"

#ifdef HAVE_LZO
#include <lzo/lzoconf.h>
#include <lzo/lzo1x.h>
#endif

#ifdef HAVE_FASTLZ
#include <fastlzlib.h>
#endif

extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code);

static void do_extract(char *devname);
Expand Down
5 changes: 0 additions & 5 deletions src/stored/stored.h
Expand Up @@ -59,11 +59,6 @@ const int sd_dbglvl = 300;
#include "vol_mgr.h"
#include "reserve.h"
#include "protos.h"
#ifdef HAVE_LIBZ
#include <zlib.h> /* compression headers */
#else
#define uLongf uint32_t
#endif
#ifdef HAVE_FNMATCH
#include <fnmatch.h>
#else
Expand Down

0 comments on commit 3d0c1d1

Please sign in to comment.