From owner-cvs-all Tue Oct 30 8: 6:43 2001 Delivered-To: cvs-all@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 0084B37B405 for ; Tue, 30 Oct 2001 08:06:28 -0800 (PST) Received: (qmail 52619 invoked from network); 30 Oct 2001 16:06:28 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 30 Oct 2001 16:06:28 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011030164640.C31154@straylight.oblivion.bg> Date: Tue, 30 Oct 2001 08:06:27 -0800 (PST) From: John Baldwin To: Peter Pentchev Subject: Re: cvs commit: src/include malloc.h Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Garrett Wollman 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 On 30-Oct-01 Peter Pentchev wrote: > On Tue, Oct 30, 2001 at 10:57:17AM -0500, Garrett Wollman wrote: >> < >> said: >> >> > Just BTW, what is the correct test to use for malloc.h vs stdlib.h? >> > Will __STDC__ be enough? >> >> #if HAVE_STDLIB_H > > Eep.. :) > >> __STDC__ tells you about the compiler; it doesn't tell you whether the >> compilation environment is actually valid. In FreeBSD, we have always >> had , even when compiling with `gcc -traditional'. > > Well, I figured that much.. but this does not help me much :) > > I'm asking more from the standpoint of submitting fixes back to authors > of various ported software; e.g. right now, I'm struggling with a big > piece of software which has a *lot* of: > >#if defined(BSDI) >#include >#else >#include >#endif > > I could easily change that to defined(BSDI) || defined(__FreeBSD__), > but.. you mean there really is no way to do this better? :\ Err, that code is right. malloc.h is deprecated and stdlib.h should be what is included. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message