wok diff module-init-tools/stuff/lzlib.u @ rev 8852

Updated mirror-tools to use slitaz-dev-tools.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Feb 25 00:34:53 2011 +0000 (2011-02-25)
parents 71c7aacfbbb2
children
line diff
     1.1 --- a/module-init-tools/stuff/lzlib.u	Thu Jul 23 11:18:35 2009 +0000
     1.2 +++ b/module-init-tools/stuff/lzlib.u	Fri Feb 25 00:34:53 2011 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  --- module-init-tools-3.10/zlibsupport.c
     1.5  +++ module-init-tools-3.10/zlibsupport.c
     1.6 -@@ -18,60 +18,40 @@
     1.7 +@@ -18,43 +18,23 @@
     1.8   #include "testing.h"
     1.9   
    1.10   #ifdef CONFIG_USE_ZLIB
    1.11 @@ -27,28 +27,6 @@
    1.12  -}
    1.13  +#include <lzlib.h>
    1.14   
    1.15 - void *grab_fd(int fd, unsigned long *size)
    1.16 - {
    1.17 --	gzFile gzfd;
    1.18 -+	lzFile lzfd;
    1.19 - 
    1.20 --	gzfd = gzdopen(fd, "rb");
    1.21 --	if (!gzfd) {
    1.22 -+	lzfd = lzdopen(fd, "rb");
    1.23 -+	if (!lzfd) {
    1.24 - 		if (errno == ENOMEM)
    1.25 - 			fatal("Memory allocation failure in gzdopen\n");
    1.26 - 		return NULL;
    1.27 - 	}
    1.28 - 
    1.29 --	/* gzclose(gzfd) would close fd, which would drop locks.
    1.30 -+	/* lzclose(lzfd) would close fd, which would drop locks.
    1.31 - 	   Don't blame zlib: POSIX locking semantics are so horribly
    1.32 - 	   broken that they should be ripped out. */
    1.33 --	return grab_contents(gzfd, size);
    1.34 -+	return lzgrab(lzfd, size);
    1.35 - }
    1.36 - 
    1.37   /* gzopen handles uncompressed files transparently. */
    1.38   void *grab_file(const char *filename, unsigned long *size)
    1.39   {