Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Oct 2002 04:30:04 -0700 (PDT)
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/43616: static-ize some functions in sys/net/zlib.c
Message-ID:  <200210031130.g93BU4nq084241@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/43616; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@freebsd.org>
To: Matt Emmerton <matt@gsicomp.on.ca>
Cc: bug-followup@freebsd.org
Subject: Re: kern/43616: static-ize some functions in sys/net/zlib.c
Date: Thu, 3 Oct 2002 14:19:53 +0300

 On 2002-10-03 00:28, Matt Emmerton <matt@gsicomp.on.ca> wrote:
 >
 > PHK's JKH TODO List - kernel orphan symbol review
 >
 > This patch makes some symbols in net/zlib.c static as they
 > don't need to be visible outside of this module.
 
 The answer is probably to ignore zlib and replace it with something
 better.  The zlib code (both the one in the kernel, and the one
 distributed as zlib-1.0.4, where the kernel version comes from) is
 fugly in too many places to be listed in a single mail followup.
 
 For the past few days, I've been trying to read through the tangle of
 C source that is zlib-1.0.4.tar.gz and keep notes for the following
 things:
 
   - Generic z-library interface.
   - Code that implements various compression formats.
 
 The best thing to do in zlib code, imho, would be to kill the dreaded
 library by replacing it with another, BSD licensed, replacement.  I'm
 already started towards trying to make something like this.  There are
 many evil things in the source of zlib, but the most notable one is
 the fact that the liberal style of writing has caused errors like the
 following to appear in crucial places, like the zlib.h header (which
 is used by almost *all* the other headers):
 
 : ZEXTERN const char * ZEXPORT zlibVersion OF((void));
 : /* The application can compare zlibVersion and ZLIB_VERSION for
 :  * consistency.
 :  ...
 :  */
 : 
 : /*
 : ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
 : 
 :      Initializes the internal stream state for compression. The fields
 : ...
 : */
 
 Note how the second function is not prototyped, because it's prototype
 is commented out.  This bug is present in today's -current, along with
 many other nearby silliness caused by zlib.h and friends :(
 
 Giorgos.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210031130.g93BU4nq084241>