Selaa lähdekoodia

BUG: libtar now compiles in VJ and works with vtkzlib

Yogi Girdhar 20 vuotta sitten
vanhempi
sitoutus
17c3a89797
2 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. 3 0
      Utilities/cmtar/config.h.in
  2. 9 0
      Utilities/cmtar/libtar.c

+ 3 - 0
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@
 

+ 9 - 0
Utilities/cmtar/libtar.c

@@ -36,8 +36,17 @@
 #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 <libtar/compat.h>