[PATCH] 2.4.21 zlib merge #1 turboc

From: Jörn Engel (joern@wohnheim.fh-wedel.de)
Date: Sat Jun 14 2003 - 08:47:08 EST


Hi Marcelo!

This patchset hat already made it into Linus' tree. It merges the
interesting bits from zlib 1.1.4 into the kernel zlib, which is based
on 1.1.3.

Remove Turbo C workaround and fix modulo operation.

Jörn

-- 
If you're willing to restrict the flexibility of your approach,
you can almost always do something better.
-- John Carmack

--- linux-2.4.20/lib/zlib_inflate/infcodes.c~zlib_merge_turboc 2002-11-29 00:53:15.000000000 +0100 +++ linux-2.4.20/lib/zlib_inflate/infcodes.c 2003-06-10 16:59:38.000000000 +0200 @@ -146,15 +146,9 @@ DUMPBITS(j) c->mode = COPY; case COPY: /* o: copying bytes in window, waiting for space */ -#ifndef __TURBOC__ /* Turbo C bug for following expression */ - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; -#else f = q - c->sub.copy.dist; - if ((uInt)(q - s->window) < c->sub.copy.dist) - f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); -#endif + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ while (c->len) { NEEDOUT - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:39 EST