[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C99ism in gzip 1.4 inflate.c
From: |
Jay K |
Subject: |
C99ism in gzip 1.4 inflate.c |
Date: |
Sun, 18 Jul 2010 12:51:26 +0000 |
C99ism in gzip 1.4 inflate.c:
inflate.c: In function `inflate_codes':
inflate.c:592: parse error before `unsigned'
inflate.c:593: `delta' undeclared (first use in this function)
inflate.c:593: (Each undeclared identifier is reported only once
inflate.c:593: for each function it appears in.)
make[1]: *** [inflate.o] Error 1
make[1]: Leaving directory `/usr/users/m3build/src/gzip-1.4'
bash-3.2$ diff -c inflate.c.orig inflate.c
*** inflate.c.orig Sun Jul 18 13:45:14 2010
--- inflate.c Sun Jul 18 13:46:17 2010
***************
*** 587,595 ****
/* do the copy */
do {
n -= (e = (e = WSIZE - ((d &= WSIZE-1) > w ? d : w)) > n ? n : e);
#if !defined(NOMEMCPY) && !defined(DEBUG)
! unsigned int delta = w > d ? w - d : d - w;
if (delta >= e)
{
memcpy(slide + w, slide + d, e);
--- 587,598 ----
/* do the copy */
do {
+ #if !defined(NOMEMCPY) && !defined(DEBUG)
+ unsigned delta;
+ #endif
n -= (e = (e = WSIZE - ((d &= WSIZE-1) > w ? d : w)) > n ? n : e);
#if !defined(NOMEMCPY) && !defined(DEBUG)
! delta = w > d ? w - d : d - w;
if (delta >= e)
{
memcpy(slide + w, slide + d, e);
I suggest maybe use autoconf to pass -std=c89 to gcc if it accepts it.
Thanks,
- Jay
- C99ism in gzip 1.4 inflate.c,
Jay K <=