Hello community,
here is the log from the commit of package libzio for openSUSE:Factory checked in at 2015-02-27 10:55:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzio (Old)
and /work/SRC/openSUSE:Factory/.libzio.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libzio"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libzio/libzio.changes 2013-04-17 23:06:03.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzio.new/libzio.changes 2015-02-27 10:55:57.000000000 +0100
@@ -1,0 +2,8 @@
+Thu Feb 19 21:52:33 UTC 2015 - p.drouand@gmail.com
+
+- Update to version 1.02
+ * Fixed version: handle fseek() correct for bzip2 and lzma/xz
+- Spec file cleanup
+- Remove libzio-1.00.dif; fixed on upstream release
+
+-------------------------------------------------------------------
Old:
----
libzio-1.00.dif
libzio-1.00.tar.bz2
New:
----
libzio-1.02.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libzio.spec ++++++
--- /var/tmp/diff_new_pack.iRNOpb/_old 2015-02-27 10:55:58.000000000 +0100
+++ /var/tmp/diff_new_pack.iRNOpb/_new 2015-02-27 10:55:58.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package libzio
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
Name: libzio
%define lname libzio1
-Version: 1.00
+Version: 1.02
Release: 0
Summary: A Library for Accessing Compressed Text Files
License: GPL-2.0+
@@ -26,31 +26,15 @@
Url: http://libzio.sourceforge.net/
Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.bz2
Source1: baselibs.conf
-# PATCH-FIX-UPSTREAM: handle fseek() correct for bzip2 and lzma/xz
-Patch0: libzio-1.00.dif
BuildRequires: libbz2-devel
BuildRequires: zlib-devel
-%if %suse_version <= 1110
-BuildRequires: lzma
-BuildRequires: lzma-devel
-%else
-BuildRequires: xz
BuildRequires: xz-devel
-%endif
-# bug437293
-%ifarch ppc64
-Obsoletes: libzio-64bit
-%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Libzio provides a wrapper function for reading or writing gzip or bzip2
files with FILE streams.
-Author:
---------
- Werner Fink
-
%package -n %lname
Summary: A Library for Accessing Compressed Text Files
Group: System/Libraries
@@ -61,33 +45,18 @@
Libzio provides a wrapper function for reading or writing gzip or bzip2
files with FILE streams.
-Author:
---------
- Werner Fink
-
%package devel
Summary: Libzio development files
Group: Development/Libraries/C and C++
Requires: %lname = %{version}
# bug437293
-%ifarch ppc64
-Obsoletes: libzio-devel-64bit
-%endif
-#
%description devel
Libzio development files including zio.h, the manual page fzopen(3),
and static library.
-
-
-Authors:
---------
- Werner Fink
-
%prep
%setup -q
-%patch0
%build
make %{?_smp_mflags} noweak
@@ -95,11 +64,7 @@
%check
make testt
make tests
-%if %suse_version <= 1110
-for comp in gzip bzip2 lzma
-%else
for comp in gzip bzip2 lzma xz
-%endif
do
$comp -c < fzopen.3.in > fzopen.test
./testt fzopen.test | cmp fzopen.3.in -
@@ -124,6 +89,6 @@
%{_libdir}/libzio.a
%{_libdir}/libzio.so
%{_mandir}/man3/fzopen.3*
-/usr/include/zio.h
+%{_includedir}/zio.h
%changelog
++++++ libzio-1.00.tar.bz2 -> libzio-1.02.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/COPYING new/libzio-1.02/COPYING
--- old/libzio-1.00/COPYING 2007-12-07 17:39:15.000000000 +0100
+++ new/libzio-1.02/COPYING 2013-02-27 12:09:25.000000000 +0100
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -15,7 +15,7 @@
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
@@ -55,8 +55,8 @@
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
+
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -110,7 +110,7 @@
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
-
+
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
+
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
+
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
@@ -255,7 +255,7 @@
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
@@ -291,7 +291,7 @@
the "copyright" line and a pointer to where the full notice is found.
- Copyright (C) 19yy <name of author>
+ Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -303,17 +303,16 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
@@ -336,5 +335,5 @@
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
+library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/Makefile new/libzio-1.02/Makefile
--- old/libzio-1.00/Makefile 2012-10-04 15:34:02.000000000 +0200
+++ new/libzio-1.02/Makefile 2013-02-27 12:49:55.000000000 +0100
@@ -8,7 +8,7 @@
CFLAGS = $(RPM_OPT_FLAGS) -pipe -Wall -D_GNU_SOURCE -D_REENTRANT $(LARGE)
CC = gcc
MAJOR = 1
-MINOR = 00
+MINOR = 02
VERSION = $(MAJOR).$(MINOR)
SONAME = libzio.so.$(MAJOR)
LDMAP = -Wl,--version-script=zio.map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/unlzw.c new/libzio-1.02/unlzw.c
--- old/libzio-1.00/unlzw.c 2007-12-07 17:39:15.000000000 +0100
+++ new/libzio-1.02/unlzw.c 2013-02-27 12:09:25.000000000 +0100
@@ -12,7 +12,7 @@
* to be able to read during the main loop in unlzw() does its work. For this
* nearly _all_ variables affected by the context switch are forward to this
* structure, even the stack and the context type its self.
- * The oringal source was adopted from the gzip version 1.3.7.
+ * The original source was adopted from the gzip version 1.3.7.
*/
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/zio.c new/libzio-1.02/zio.c
--- old/libzio-1.00/zio.c 2009-02-23 15:54:21.000000000 +0100
+++ new/libzio-1.02/zio.c 2013-02-27 12:09:25.000000000 +0100
@@ -4,11 +4,20 @@
* Copyright 2004 Werner Fink, 2004 SuSE LINUX AG, Germany.
* Copyright 2006 Werner Fink, 2006 SuSE Products GmbH, Germany.
* Copyright 2009 Werner Fink, 2009 SuSE Products GmbH, Germany.
+ * Copyright 2013 Werner Fink, 2013 SuSE Products GmbH, Germany.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation; version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author: Werner Fink
*/
@@ -42,6 +51,7 @@
errno = EINVAL;
return -1;
}
+ off_t offset = (off_t)*poffset;
return (zio_int_t)gzseek((gzFile)cookie, (z_off_t)(*poffset), whence);
}
@@ -74,8 +84,9 @@
# endif
typedef struct bzfile_s {
- size_t total_out;
+ size_t position;
BZFILE *file;
+ FILE *stdio;
char *mode;
char *path;
int fd;
@@ -90,7 +101,7 @@
if (bzf->file)
len = (ssize_t)BZ2_bzread(bzf->file, (void*)buf, count);
if (len > 0)
- bzf->total_out += len;
+ bzf->position += len;
out:
if (len < 0)
errno = EINVAL;
@@ -104,9 +115,9 @@
if (!bzf)
goto out;
if (bzf->file)
- len = (ssize_t)BZ2_bzread(bzf->file, (void*)buf, count);
+ len = (ssize_t)BZ2_bzwrite(bzf->file, (void*)buf, count);
if (len > 0)
- bzf->total_out += len;
+ bzf->position += len;
out:
if (len < 0)
errno = EINVAL;
@@ -116,24 +127,29 @@
static zio_int_t bzseek(void *cookie, zio_off_t *poffset, int whence)
{
bzfile_t *bzf = (bzfile_t*)cookie;
- off_t offset = (off_t)*poffset;
- off_t oldpos, newpos;
+ off_t offset, curpos, newpos;
if (!bzf) {
errno = EINVAL;
return -1;
}
- oldpos = (off_t)bzf->total_out;
+ offset = (off_t)*poffset;
+ curpos = (off_t)bzf->position;
+
switch (whence) {
case SEEK_SET:
- if (offset < 0)
+ if (offset < 0) {
+ errno = EINVAL;
return -1;
+ }
newpos = offset;
break;
case SEEK_CUR:
- if ((offset < 0 && (off_t)(-1 * offset) > oldpos) || (offset > 0 && (offset+oldpos) < oldpos))
+ if ((offset < 0 && (off_t)(-1 * offset) > curpos) || (offset > 0 && (offset+curpos) < curpos)) {
+ errno = EINVAL;
return -1;
- newpos = (off_t)bzf->total_out + offset;
+ }
+ newpos = curpos + offset;
break;
case SEEK_END:
newpos = -1;
@@ -143,7 +159,7 @@
return -1;
}
- if (whence != SEEK_END && newpos < oldpos) {
+ if (whence != SEEK_END && newpos < curpos) {
int status = BZ2_bzflush(bzf->file);
BZ2_bzclose(bzf->file);
if (status < 0) {
@@ -163,27 +179,36 @@
errno = EINVAL;
return -1;
}
- bzf->total_out = 0;
+ curpos = (off_t)0;
+ bzf->position = curpos;
}
- if (newpos == oldpos)
- return oldpos;
- else {
+ if (newpos == curpos)
+ goto out;
+ if (newpos == -1) {
+ char buf[1<<12];
+ while (1) {
+ ssize_t got_size = BZ2_bzread(bzf->file, buf, sizeof(buf));
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
+ }
+ } else {
char buf[1<<12];
- while (newpos > oldpos || newpos == -1) {
- size_t req_size = MIN(sizeof(buf), newpos - oldpos);
+ while (newpos > curpos) {
+ size_t req_size = MIN(sizeof(buf), newpos - curpos);
ssize_t got_size = BZ2_bzread(bzf->file, buf, req_size);
- if (got_size != (ssize_t)(req_size)) {
- if (got_size < 0)
- return -1;
- else {
- newpos = oldpos + got_size;
- break;
- }
- }
- oldpos += got_size;
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
}
- return newpos;
}
+out:
+ bzf->position = curpos;
+ return curpos;
}
static int bzclose(void *cookie)
@@ -223,6 +248,7 @@
uint8_t buf[1<<12];
lzma_stream strm;
FILE *file;
+ FILE *stdio;
int encoding;
int level;
int what;
@@ -291,9 +317,9 @@
lzfile_t *lzma = (lzfile_t*)cookie;
lzma_stream *strm;
if (!lzma || !lzma->encoding)
- return -1;
+ return -1;
if (!count)
- return 0;
+ return 0;
strm = &lzma->strm;
strm->next_in = (uint8_t*)buf;
@@ -318,24 +344,31 @@
static zio_int_t lzmaseek(void *cookie, zio_off_t *poffset, int whence)
{
lzfile_t *lzma = (lzfile_t*)cookie;
- off_t offset = (off_t)*poffset;
lzma_stream *strm;
- off_t oldpos, newpos;
- if (!lzma)
+ off_t offset, curpos, newpos;
+ if (!lzma) {
+ errno = EINVAL;
return -1;
+ }
+
strm = &lzma->strm;
+ offset = (off_t)*poffset;
+ curpos = (off_t)strm->total_out;
- oldpos = (off_t)strm->total_out;
switch (whence) {
case SEEK_SET:
- if (offset < 0)
+ if (offset < 0) {
+ errno = EINVAL;
return -1;
+ }
newpos = offset;
break;
case SEEK_CUR:
- if ((offset < 0 && (off_t)(-1 * offset) > oldpos) || (offset > 0 && (offset+oldpos) < oldpos))
+ if ((offset < 0 && (off_t)(-1 * offset) > curpos) || (offset > 0 && (offset+curpos) < curpos)) {
+ errno = EINVAL;
return -1;
- newpos = (off_t)strm->total_out + offset;
+ }
+ newpos = curpos + offset;
break;
case SEEK_END:
newpos = -1;
@@ -344,37 +377,51 @@
errno = EINVAL;
return -1;
}
-
- if (whence != SEEK_END && newpos < oldpos) {
+ if (whence != SEEK_END && newpos < curpos) {
lzma_ret ret;
+
lzma_end(strm);
+ lzma->strm = (lzma_stream)LZMA_STREAM_INIT;
+ strm = &lzma->strm;
+
rewind(lzma->file);
+ clearerr(lzma->file);
+ lzma->eof = 0;
+
ret = lzmaopen(strm, lzma->encoding ? 'w' : 'r', lzma->what, lzma->level);
if (ret != LZMA_OK || strm->total_out != 0) {
fclose(lzma->file);
errno = EINVAL;
return -1;
}
+ curpos = (off_t)0;
}
- if (newpos == oldpos)
- return oldpos;
- else {
+ if (newpos == curpos)
+ goto out;
+ if (newpos == -1) {
char buf[sizeof(lzma->buf)];
- while (newpos > oldpos || newpos == -1) {
- size_t req_size = MIN(sizeof(buf), newpos - oldpos);
+ while (1) {
+ ssize_t got_size = lzmaread(cookie, buf, sizeof(buf));
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
+ }
+ } else {
+ char buf[sizeof(lzma->buf)];
+ while (newpos > curpos) {
+ size_t req_size = MIN(sizeof(buf), newpos - curpos);
ssize_t got_size = lzmaread(cookie, buf, req_size);
- if (got_size != (ssize_t)(req_size)) {
- if (got_size < 0)
- return -1;
- else {
- newpos = oldpos + got_size;
- break;
- }
- }
- oldpos += got_size;
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
}
- return newpos;
}
+out:
+ return curpos;
}
static int lzmaclose(void *cookie)
@@ -466,8 +513,9 @@
#endif /* !HAS_LZMA_H */
typedef struct lzwfile_s {
- size_t total_out;
+ size_t position;
LZW_t *file;
+ FILE *stdio;
char *mode;
char *path;
int fd;
@@ -482,7 +530,7 @@
if (lzw->file)
len = readlzw(lzw->file, buf, count);
if (len > 0)
- lzw->total_out += len;
+ lzw->position += len;
out:
if (len < 0)
errno = EINVAL;
@@ -498,24 +546,29 @@
static zio_int_t lzwseek(void *cookie, zio_off_t *poffset, int whence)
{
lzwfile_t *lzw = (lzwfile_t*)cookie;
- off_t offset = (off_t)*poffset;
- off_t oldpos, newpos;
+ off_t offset, curpos, newpos;
if (!lzw) {
errno = EINVAL;
return -1;
}
- oldpos = (off_t)lzw->total_out;
+ offset = (off_t)*poffset;
+ curpos = (off_t)lzw->position;
+
switch (whence) {
case SEEK_SET:
- if (offset < 0)
+ if (offset < 0) {
+ errno = EINVAL;
return -1;
+ }
newpos = offset;
break;
case SEEK_CUR:
- if ((offset < 0 && (off_t)(-1 * offset) > oldpos) || (offset > 0 && (offset+oldpos) < oldpos))
+ if ((offset < 0 && (off_t)(-1 * offset) > curpos) || (offset > 0 && (offset+curpos) < curpos)) {
+ errno = EINVAL;
return -1;
- newpos = (off_t)lzw->total_out + offset;
+ }
+ newpos = curpos + offset;
break;
case SEEK_END:
newpos = -1;
@@ -525,7 +578,7 @@
return -1;
}
- if (whence != SEEK_END && newpos < oldpos) {
+ if (whence != SEEK_END && newpos < curpos) {
closelzw(lzw->file);
if (lzw->fd >= 0) {
lseek(lzw->fd, 0, SEEK_SET);
@@ -540,27 +593,36 @@
errno = EINVAL;
return -1;
}
- lzw->total_out = 0;
+ curpos = (off_t)0;
+ lzw->position = curpos;
}
- if (newpos == oldpos)
- return oldpos;
- else {
+ if (newpos == curpos)
+ goto out;
+ if (newpos == -1) {
char buf[1<<12];
- while (newpos > oldpos || newpos == -1) {
- size_t req_size = MIN(sizeof(buf), newpos - oldpos);
+ while (1) {
+ ssize_t got_size = readlzw(lzw->file, buf, sizeof(buf));
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
+ }
+ } else {
+ char buf[1<<12];
+ while (newpos > curpos) {
+ size_t req_size = MIN(sizeof(buf), newpos - curpos);
ssize_t got_size = readlzw(lzw->file, buf, req_size);
- if (got_size != (ssize_t)(req_size)) {
- if (got_size < 0)
- return -1;
- else {
- newpos = oldpos + got_size;
- break;
- }
- }
- oldpos += got_size;
+ if (got_size < 0)
+ return -1;
+ if (got_size == 0)
+ break;
+ curpos += got_size;
}
- return newpos;
}
+out:
+ lzw->position = curpos;
+ return curpos;
}
static int lzwclose(void *cookie)
@@ -787,6 +849,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
break;
case 'b':
@@ -834,6 +897,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
#else /* !HAS_BZLIB_H */
errno = ENOTSUP;
@@ -892,6 +956,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
break;
#else /* !HAS_LZMA_H */
@@ -928,6 +993,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
# else /* !HAS_LZMADEC_H */
errno = ENOTSUP;
@@ -1048,6 +1114,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
break;
case 'b':
@@ -1097,6 +1164,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
#else /* !HAS_BZLIB_H */
errno = ENOTSUP;
@@ -1137,6 +1205,7 @@
cookie->level = level;
cookie->encoding = (check[0] == 'w') ? 1 : 0;
lret = lzmaopen(&cookie->strm, check[0], *what, level);
+
if (lret != LZMA_OK) {
fclose(cookie->file);
free(cookie);
@@ -1154,6 +1223,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
break;
#else /* !HAS_LZMA_H */
@@ -1190,6 +1260,7 @@
if (ret->_fileno < 0)
ret->_fileno = 0;
# endif
+ cookie->stdio = ret;
}
# else /* !HAS_LZMADEC_H */
errno = ENOTSUP;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/zio.h.in new/libzio-1.02/zio.h.in
--- old/libzio-1.00/zio.h.in 2007-12-07 17:39:15.000000000 +0100
+++ new/libzio-1.02/zio.h.in 2013-02-27 12:09:25.000000000 +0100
@@ -1,12 +1,21 @@
/*
- * zio.h Provide an streamable interface to gziped/bzip2ed files
+ * zio.h Provide an streamable interface to gziped/bzip2ed/LZW/LZMA files
*
* Copyright 2004 Werner Fink, 2004 SuSE LINUX AG, Germany.
+ * Copyright 2013 Werner Fink, 2013 SuSE LINUX AG, Germany.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation; version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author: Werner Fink
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libzio-1.00/zioP.h new/libzio-1.02/zioP.h
--- old/libzio-1.00/zioP.h 2009-02-23 14:54:34.000000000 +0100
+++ new/libzio-1.02/zioP.h 2013-02-27 12:09:25.000000000 +0100
@@ -1,15 +1,24 @@
/*
- * zioP.h Internal header for libzio, including required
- * standard glibc header, zlib.h, and bzlib.h.
- * Making the used libz and bzlib functions weak symbols.
+ * zioP.h Internal header for libzio, including required standard glibc
+ * header, zlib.h, lzma.h or lzmadec.h, and bzlib.h.
+ * Making the used libz, liblzma, and bzlib functions weak symbols.
*
* Copyright 2004 Werner Fink, 2004 SuSE LINUX AG, Germany.
* Copyright 2006 Werner Fink, 2006 SuSE Products GmbH, Germany.
+ * Copyright 2013 Werner Fink, 2013 SuSE Products GmbH, Germany.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation; version 2.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Author: Werner Fink
*/