aboutsummaryrefslogtreecommitdiff
path: root/libstore/gunzip.c
diff options
context:
space:
mode:
authorIgnazio Sgalmuzzo <ignaker@gmail.com>2014-02-17 22:21:31 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-02-18 21:33:42 -0800
commit2a685b05f91f71c3b00ee8890ebaed16839b0cd0 (patch)
treea9e96668322523efc5ca6bbeadee63fc609ed594 /libstore/gunzip.c
parent8132295cfd2d26a13a6cd2f61b7f5c56ea5efaa7 (diff)
downloadhurd-2a685b05f91f71c3b00ee8890ebaed16839b0cd0.tar.gz
hurd-2a685b05f91f71c3b00ee8890ebaed16839b0cd0.tar.bz2
hurd-2a685b05f91f71c3b00ee8890ebaed16839b0cd0.zip
libstore: replaced gz decompression code with libz
Note: dropped .zip support configure.ac: added check for libz ext2fs/Makefile: linked libz fatfs/Makefile: linked libz isofs/Makefile: linked libz libstore/Makefile: linked libz libstore/do-gunzip.c: new decompression function using libz calls. libstore/gunzip.c: removed no longer needed code replaced by do_gunzip() libstore/gzip.h: deleted, no longer needed libstore/inflate.c: deleted: no longer needed libstore/tailor.h: deleted: no longer needed libstore/unzip.c: deleted: no longer needed libstore/util.c: removed no longer needed code.
Diffstat (limited to 'libstore/gunzip.c')
-rw-r--r--libstore/gunzip.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/libstore/gunzip.c b/libstore/gunzip.c
index 7c449403..f47c0b2b 100644
--- a/libstore/gunzip.c
+++ b/libstore/gunzip.c
@@ -18,35 +18,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-#include <stdio.h>
-#include <string.h>
-#include <setjmp.h>
-#include <sys/mman.h>
+#include <errno.h>
-#include "store.h"
-
-/* gzip.h makes several annoying defines & decls, which we have to work
- around. */
-#define file_t gzip_file_t
-#include "gzip.h"
-#undef file_t
-#undef head
+extern void do_gunzip (void); /* Entry point to gunzip engine. */
static error_t
DO_UNZIP (void)
{
- /* Entry points to unzip engine. */
- int get_method (int);
- extern long int bytes_out;
-
- if (get_method (0) != 0)
- /* Not a happy gzip file. */
- return EINVAL;
-
- /* Matched gzip magic number. Ready to unzip.
- Set up the output stream and let 'er rip. */
- bytes_out = 0;
- unzip (17, 23); /* Arguments ignored. */
+ do_gunzip ();
return 0;
}