--- zzzz-none-000/linux-2.4.17/fs/jffs2/compr_zlib.c 2001-10-04 22:13:18.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/fs/jffs2/compr_zlib.c 2004-11-24 13:22:18.000000000 +0000 @@ -1,7 +1,7 @@ /* * JFFS2 -- Journalling Flash File System, Version 2. * - * Copyright (C) 2001 Red Hat, Inc. + * Copyright (C) 2001, 2002 Red Hat, Inc. * * Created by David Woodhouse * @@ -31,13 +31,13 @@ * provisions above, a recipient may use your version of this file * under either the RHEPL or the GPL. * - * $Id: compr_zlib.c,v 1.8 2001/09/20 15:28:31 dwmw2 Exp $ + * $Id: compr_zlib.c,v 1.1.1.1 2003/06/23 22:18:37 jharrell Exp $ * */ -#include "zlib.h" #ifdef __KERNEL__ +#include #include #include /* for min() */ #include @@ -54,6 +54,12 @@ { kfree(addr); } +#ifdef CONFIG_ZLIB /* 2.5 kernels will have a shared zlib, at last. */ +#include +#else +#include "zlib.h" +#endif + #else #define min(x,y) ((x)<(y)?(x):(y)) #ifndef D1 @@ -63,8 +69,9 @@ #define KERN_NOTICE #define KERN_WARNING #define printk printf +#include #include -#include +#include #endif /* Plan: call deflate() with avail_in == *sourcelen, @@ -77,7 +84,7 @@ #define STREAM_END_SPACE 12 int zlib_compress(unsigned char *data_in, unsigned char *cpage_out, - __u32 *sourcelen, __u32 *dstlen) + uint32_t *sourcelen, uint32_t *dstlen) { z_stream strm; int ret; @@ -93,7 +100,7 @@ strm.zfree = (void *)0; #endif - if (Z_OK != deflateInit(&strm, 3)) { + if (Z_OK != deflateInit(&strm, 9)) { printk(KERN_WARNING "deflateInit failed\n"); return -1; } @@ -139,7 +146,7 @@ } void zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, - __u32 srclen, __u32 destlen) + uint32_t srclen, uint32_t destlen) { z_stream strm; int ret;