From 17c3a897974556572f0163d52da4fd4ef12b106a Mon Sep 17 00:00:00 2001 From: Yogi Girdhar Date: Thu, 5 Jan 2006 13:25:16 -0500 Subject: [PATCH] BUG: libtar now compiles in VJ and works with vtkzlib --- Utilities/cmtar/config.h.in | 3 +++ Utilities/cmtar/libtar.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/Utilities/cmtar/config.h.in b/Utilities/cmtar/config.h.in index ce87858fb..948afde5a 100644 --- a/Utilities/cmtar/config.h.in +++ b/Utilities/cmtar/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the `z' library (-lz). */ #cmakedefine HAVE_LIBZ @HAVE_LIBZ@ +/* Define to 1 if you have the VTK's `z' library */ +#cmakedefine HAVE_VTK_LIBZ @HAVE_VTK_LIBZ@ + /* Define to 1 if the system has the type `major_t'. */ #cmakedefine HAVE_MAJOR_T @HAVE_MAJOR_T@ diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c index e470da59a..9131512d9 100644 --- a/Utilities/cmtar/libtar.c +++ b/Utilities/cmtar/libtar.c @@ -36,8 +36,17 @@ #endif #ifdef HAVE_LIBZ +#ifdef HAVE_VTK_LIBZ +# include +# define cm_zlib_gzdopen gzdopen +# define cm_zlib_gzclose gzclose +# define cm_zlib_gzread gzread +# define cm_zlib_gzwrite gzwrite + +#else # include #endif +#endif #include