summaryrefslogtreecommitdiffstats
path: root/Utilities/cmtar/libtar.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-19 19:00:10 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-19 19:00:10 (GMT)
commitf91b3c1daaeacd79b36644ce9a2610b31e9d964c (patch)
treef4d1fb12d71e40359e425cb29fffa783146e45c2 /Utilities/cmtar/libtar.c
parentde007ef199190c84c0f53ac106c282fc190f5df1 (diff)
downloadCMake-f91b3c1daaeacd79b36644ce9a2610b31e9d964c.zip
CMake-f91b3c1daaeacd79b36644ce9a2610b31e9d964c.tar.gz
CMake-f91b3c1daaeacd79b36644ce9a2610b31e9d964c.tar.bz2
ENH: Add options to build with system utility libraries. Organize inclusion of third party libraries into a single header per library. This addresses bug#3653.
Diffstat (limited to 'Utilities/cmtar/libtar.c')
-rw-r--r--Utilities/cmtar/libtar.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/Utilities/cmtar/libtar.c b/Utilities/cmtar/libtar.c
index c918e24..362c105 100644
--- a/Utilities/cmtar/libtar.c
+++ b/Utilities/cmtar/libtar.c
@@ -35,18 +35,7 @@
# include <signal.h>
#endif
-#ifdef HAVE_LIBZ
-#ifdef HAVE_VTK_LIBZ
-# include <vtkzlib/zlib.h>
-# define cm_zlib_gzdopen gzdopen
-# define cm_zlib_gzclose gzclose
-# define cm_zlib_gzread gzread
-# define cm_zlib_gzwrite gzwrite
-
-#else
-# include <cmzlib/zlib.h>
-#endif
-#endif
+#include CMTAR_ZLIB_HEADER
#include <libtar/compat.h>
@@ -117,7 +106,7 @@ static int libtar_gzopen(void* call_data, const char *pathname,
}
#endif
- gzf->GZFile = cm_zlib_gzdopen(fd, gzoflags);
+ gzf->GZFile = gzdopen(fd, gzoflags);
if (!gzf->GZFile)
{
errno = ENOMEM;
@@ -130,19 +119,19 @@ static int libtar_gzopen(void* call_data, const char *pathname,
static int libtar_gzclose(void* call_data)
{
struct gzStruct* gzf = (struct gzStruct*)call_data;
- return cm_zlib_gzclose(gzf->GZFile);
+ return gzclose(gzf->GZFile);
}
static ssize_t libtar_gzread(void* call_data, void* buf, size_t count)
{
struct gzStruct* gzf = (struct gzStruct*)call_data;
- return cm_zlib_gzread(gzf->GZFile, buf, count);
+ return gzread(gzf->GZFile, buf, count);
}
static ssize_t libtar_gzwrite(void* call_data, const void* buf, size_t count)
{
struct gzStruct* gzf = (struct gzStruct*)call_data;
- return cm_zlib_gzwrite(gzf->GZFile, (void*)buf, count);
+ return gzwrite(gzf->GZFile, (void*)buf, count);
}
tartype_t gztype = {