Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S265082AbTFEUDa (ORCPT ); Thu, 5 Jun 2003 16:03:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S265089AbTFEUDa (ORCPT ); Thu, 5 Jun 2003 16:03:30 -0400 Received: from chaos.analogic.com ([204.178.40.224]:19328 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S265082AbTFEUD3 convert rfc822-to-8bit (ORCPT ); Thu, 5 Jun 2003 16:03:29 -0400 Date: Thu, 5 Jun 2003 16:17:52 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: =?iso-8859-1?Q?J=F6rn?= Engel cc: Linus Torvalds , Steven Cole , linux-kernel@vger.kernel.org Subject: Re: [Patch] 2.5.70-bk9 kick FAR out of the zlib In-Reply-To: <20030605194644.GA22439@wohnheim.fh-wedel.de> Message-ID: References: <20030605194644.GA22439@wohnheim.fh-wedel.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1982 Lines: 50 On Thu, 5 Jun 2003, [iso-8859-1] J?rn Engel wrote: > A while back: > > On Fri, 30 May 2003 14:38:07 -0700, Linus Torvalds wrote: > > On Fri, 30 May 2003, J?rn Engel wrote: > > > > > > How about an all or nothing approach? If you really want to get rid > > > of K&R, change indentation as well, rip out some of the rather > > > tasteless macros (ZEXPORT, ZEXPORTVA, ZEXTERN, FAR, ...) and so on. > > > > I'd love to, but I suspect we lack the motivation to do so, and there > > aren't any obvious upsides. Yes, the code is ugly, but it's also fairly > > stable so people seldom need to look at it. > > Today was a lazy day and that is often motivation enough. The patch > below removes FAR, the typedefs using FAR (Bytef and friends) and the > function prototypes for zalloc and zfree that should have gone earlier > already. > > Hope you like it. > > J?rn [SNIPPED patch] But you just removed the portability hooks. The current code worked in DOS, on Windows, etc., as will as Linux. This means that if some- body, as unlikely as it may seem, develops a better/quicker version using M$ Visual C/C++, you can't get a patch. In particular, FAR is your friend. A simple #define makes it disappear when you are not using a segmented architecture, but allows the use of large arrays when you are. These kinds of things don't make the code 'pure'. It just prevents future enhancements. Look in the 'C' header files and see all the macros that disappear under the right conditions. Would you justify getting rid of __P in those headers? If not, please don't eliminate FAR. Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it. - 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/