pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: libarchive-2.8.4 for testing
On Thu, Jun 17, 2010 at 09:14:26PM +0200, Hauke Fath wrote:
> At 1:30 Uhr +0200 17.6.2010, Joerg Sonnenberger wrote:
> >Hi all,
> >I have a pending update for libarchive and would like to see some wide
> >spread testing to prevent any regressions. [...] I'm interesting in feedback
> >especially from the more exotic platforms.
>
> [...]
> source='libarchive/archive_read_support_compression_bzip2.c'
> object='libarchive/archive_read_support_compression_bzip2.lo' libtool=yes
> DEPDIR=.deps depmode=gcc /bin/ksh ./build/autoconf/depcomp /bin/ksh
> ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -c
> -o libarchive/archive_read_support_compression_bzip2.lo
> libarchive/archive_read_support_compression_bzip2.c
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -c
> libarchive/archive_read_support_compression_bzip2.c
> -Wp,-MD,libarchive/.deps/archive_read_support_compression_bzip2.TPlo -fPIC
> -DPIC -o libarchive/.libs/archive_read_support_compression_bzip2.o
> libarchive/archive_read_support_compression_bzip2.c: In function
> `bzip2_filter_read':
> libarchive/archive_read_support_compression_bzip2.c:260: `BZ_CONFIG_ERROR'
> undeclared (first use in this function)
> libarchive/archive_read_support_compression_bzip2.c:260: (Each undeclared
> identifier is reported only once
> libarchive/archive_read_support_compression_bzip2.c:260: for each function
> it appears in.)
> *** Error code 1
> [hauke@mara] ~/src/libarchive-2.8.4 > uname -psr
> NetBSD 1.5.4 m68k
> [hauke@mara] ~/src/libarchive-2.8.4 >
Try the attached patch.
Joerg
Index: libarchive/archive_read_support_format_xar.c
===================================================================
--- libarchive/archive_read_support_format_xar.c (revision 2485)
+++ libarchive/archive_read_support_format_xar.c (working copy)
@@ -323,7 +323,7 @@
enum enctype rd_encoding;
z_stream stream;
int stream_valid;
-#ifdef HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
bz_stream bzstream;
int bzstream_valid;
#endif
@@ -1323,7 +1323,7 @@
xar->stream.total_in = 0;
xar->stream.total_out = 0;
break;
-#ifdef HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
case BZIP2:
if (xar->bzstream_valid) {
BZ2_bzDecompressEnd(&(xar->bzstream));
@@ -1436,7 +1436,7 @@
* Unsupported compression.
*/
default:
-#ifndef HAVE_BZLIB_H
+#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
case BZIP2:
#endif
#if !defined(HAVE_LZMA_H) || !defined(HAVE_LIBLZMA)
@@ -1496,7 +1496,7 @@
*used = avail_in - xar->stream.avail_in;
*outbytes = avail_out - xar->stream.avail_out;
break;
-#ifdef HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
case BZIP2:
xar->bzstream.next_in = (char *)(uintptr_t)b;
xar->bzstream.avail_in = avail_in;
@@ -1587,7 +1587,7 @@
*outbytes = avail_out - xar->lzstream.avail_out;
break;
#endif
-#ifndef HAVE_BZLIB_H
+#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
case BZIP2:
#endif
#if !defined(HAVE_LZMA_H) || !defined(HAVE_LIBLZMA)
@@ -1630,7 +1630,7 @@
r = ARCHIVE_FATAL;
}
}
-#ifdef HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
if (xar->bzstream_valid) {
if (BZ2_bzDecompressEnd(&(xar->bzstream)) != BZ_OK) {
archive_set_error(&a->archive,
Index: libarchive/archive_write_set_compression_bzip2.c
===================================================================
--- libarchive/archive_write_set_compression_bzip2.c (revision 2485)
+++ libarchive/archive_write_set_compression_bzip2.c (working copy)
@@ -45,7 +45,7 @@
#include "archive_private.h"
#include "archive_write_private.h"
-#ifndef HAVE_BZLIB_H
+#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
int
archive_write_set_compression_bzip2(struct archive *a)
{
@@ -405,4 +405,4 @@
}
}
-#endif /* HAVE_BZLIB_H */
+#endif /* HAVE_BZLIB_H && BZ_CONFIG_ERROR */
Index: libarchive/archive_read_support_compression_bzip2.c
===================================================================
--- libarchive/archive_read_support_compression_bzip2.c (revision 2485)
+++ libarchive/archive_read_support_compression_bzip2.c (working copy)
@@ -48,7 +48,7 @@
#include "archive_private.h"
#include "archive_read_private.h"
-#if HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
struct private_data {
bz_stream stream;
char *out_block;
@@ -86,7 +86,7 @@
reader->init = bzip2_reader_init;
reader->options = NULL;
reader->free = bzip2_reader_free;
-#if HAVE_BZLIB_H
+#if defined(HAVE_BZLIB_H) && defined(BZ_CONFIG_ERROR)
return (ARCHIVE_OK);
#else
archive_set_error(_a, ARCHIVE_ERRNO_MISC,
@@ -146,7 +146,7 @@
return (bits_checked);
}
-#ifndef HAVE_BZLIB_H
+#if !defined(HAVE_BZLIB_H) || !defined(BZ_CONFIG_ERROR)
/*
* If we don't have the library on this system, we can't actually do the
@@ -350,4 +350,4 @@
return (ret);
}
-#endif /* HAVE_BZLIB_H */
+#endif /* HAVE_BZLIB_H && BZ_CONFIG_ERROR */
Home |
Main Index |
Thread Index |
Old Index