From owner-cvs-all Wed Apr 3 21:30:59 2002 Delivered-To: cvs-all@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 06FAA37B416; Wed, 3 Apr 2002 21:30:51 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g345OSL16212; Thu, 4 Apr 2002 00:24:28 -0500 (EST) (envelope-from mike) Date: Thu, 4 Apr 2002 00:24:28 -0500 From: Mike Barcroft To: Trevor Johnson Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Garrett Wollman Subject: Re: malloc.h--cheaper by the dozen? Message-ID: <20020404002428.B93859@espresso.q9media.com> References: <20020331023459.G81971@espresso.q9media.com> <20020331033829.Q20524-100000@blues.jpj.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020331033829.Q20524-100000@blues.jpj.net>; from trevor@jpj.net on Wed, Apr 03, 2002 at 06:23:01PM -0500 Organization: The FreeBSD Project Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Trevor Johnson writes: > Mike Barcroft wrote: > > We don't support pre-ANSI C in 5.0-CURRENT. > > Not supporting is one thing; actively sabotaging is another. Simply not > having the header would be a more friendly way to not support it. Is > there an advantage to generating an error? I don't see it. We don't even > save the one inode that we would save by not having a malloc.h at all. We are actively removing __P(), or as you put it, actively sabotaging K&R C. It's easy enough to port old source to modern systems anyway. C has changed very little in the last few decades. > > Software developers have had over a decade to update their software to > > more modern versions of C; I have no sympathy for them. > > There's every likelihood that the authors of those programs no longer > maintain them, that they don't care whether their code complies with > standards, or that they don't care about FreeBSD. Still, their work may > be of use to FreeBSD users, who are the ones getting the error. I have even less sympathy for these developers. :) I think Kris has finished correcting the ports collection, so only developers are affected now. > The Solaris version I mentioned dates from 1996. The header is present in > post-C89 versions of HP/UX > (http://www.informatik.uni-frankfurt.de/doc/man/hpux/malloc.3c.html) and > Tru64 (http://btrcx1.cip.uni-bayreuth.de/cgi-bin/manpages/malloc/3) as > well as BSD/OS and FreeBSD 4.X. The GNU libc contains it to this day > (http://www.delorie.com/gnu/docs/glibc/libc_29.html). They say it is from > the SVID and XPG standards (although I could not find it in the SVID which > Caldera offers for download). Programs which do > > #if HAVE_USR_INCLUDE_MALLOC_H > #include "/usr/include/malloc.h" > > are likely to fall into the booby trap. If the header were just removed > entirely, they could recover. I agree with removing the header completely. The additional diagnostics probably don't assist many C programmers. /usr/include/malloc.h:3: #error " has been replaced by " vs. test.c:1: malloc.h: No such file or directory Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message