Date: Thu, 4 Apr 2002 00:24:28 -0500 From: Mike Barcroft <mike@FreeBSD.org> To: Trevor Johnson <trevor@jpj.net> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, Garrett Wollman <wollman@FreeBSD.org> Subject: Re: malloc.h--cheaper by the dozen? Message-ID: <20020404002428.B93859@espresso.q9media.com> In-Reply-To: <20020331033829.Q20524-100000@blues.jpj.net>; from trevor@jpj.net on Wed, Apr 03, 2002 at 06:23:01PM -0500 References: <20020331023459.G81971@espresso.q9media.com> <20020331033829.Q20524-100000@blues.jpj.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Trevor Johnson <trevor@jpj.net> 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 "<malloc.h> has been replaced by <stdlib.h>" 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020404002428.B93859>