From owner-freebsd-hackers Thu Jun 19 18:18:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA01508 for hackers-outgoing; Thu, 19 Jun 1997 18:18:46 -0700 (PDT) Received: from rf900.physics.usyd.edu.au (rf900.physics.usyd.edu.au [129.78.129.109]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA01501 for ; Thu, 19 Jun 1997 18:18:42 -0700 (PDT) Received: (from dawes@localhost) by rf900.physics.usyd.edu.au (8.8.5/8.8.2) id LAA08562; Fri, 20 Jun 1997 11:18:39 +1000 (EST) Message-ID: <19970620111839.40700@rf900.physics.usyd.edu.au> Date: Fri, 20 Jun 1997 11:18:39 +1000 From: David Dawes To: hackers@freebsd.org Subject: Re: xperfmon++ problem (again) References: <33956BBB.1BB@nospam.com> <5n7bk7$osi@uriah.heep.sax.de> <339863C7.1DF5@nospam.com> <5nbrkn$2h6@uriah.heep.sax.de> <339D9548.7B07@nospam.com> <5ob5e7$31j@ui-gate.utell.co.uk> <5obor4$58o@ui-gate.utell.co.uk> <199706191725.SAA00390@utell.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199706191725.SAA00390@utell.co.uk>; from Brian Somers on Thu, Jun 19, 1997 at 06:25:50PM +0100 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Thu, Jun 19, 1997 at 06:25:50PM +0100, Brian Somers wrote: >[cc'd to jmz@FreeBSD.org] >[cc'd to freebsd-hackers@FreeBSD.org] >[posted to comp.unix.bsd.freebsd.misc] >> Now this is *really* bad news AFAIK. X provides the following in >> FreeBSD.cf: >> #define Malloc0ReturnsNull NO >> >> but I don't know of any provisions for malloc returning a pointer >> and realloc returning NULL :( >> >> We could always do a simple patch to this file, but is this the >> right way to go ? > >FWIW, this is the patch - it solves my knews problem, but isn't >*really* the right answer :| Copy it to >/usr/ports/x11/XFree86/patches/patch-af, and just "make". The right answer in my opinion is to change the definition of Malloc0ReturnsNULL back to YES in FreeBSD.cf. That won't cause any problems for the case where malloc(0) returns a non-NULL pointer. David