From owner-freebsd-standards@FreeBSD.ORG Tue Feb 21 18:49:49 2006 Return-Path: X-Original-To: freebsd-standards@FreeBSD.org Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79E3F16A420 for ; Tue, 21 Feb 2006 18:49:49 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32906.mail.mud.yahoo.com (web32906.mail.mud.yahoo.com [68.142.206.53]) by mx1.FreeBSD.org (Postfix) with SMTP id 18FE843D49 for ; Tue, 21 Feb 2006 18:49:48 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 9556 invoked by uid 60001); 21 Feb 2006 18:49:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=PW+RNCz93bUES1vEe6pkUctcPW84sLWOXiTYFufXURzTbZyeppR7/Dxqlr9t3xW2UgdUdFfo5dv/Fk09Kn6WJfH4box6GN464rJCaqTMw36j3cFqK5yoC9TfblPNCgXX+hw3zRh8pDzVZ/orPrUeuslwXSECBjIVn8yFhiz5xPU= ; Message-ID: <20060221184948.9554.qmail@web32906.mail.mud.yahoo.com> Received: from [200.118.70.201] by web32906.mail.mud.yahoo.com via HTTP; Tue, 21 Feb 2006 19:49:48 CET Date: Tue, 21 Feb 2006 19:49:48 +0100 (CET) From: To: freebsd-standards@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: Subject: malloc.h is still legitimate after all X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 18:49:49 -0000 Hi; I was porting some parts of COIN-OR (some Operations Research packages opensourced by IBM a while ago), and when I was happily suggesting that all occurences of malloc.h should be removed and/or replaced with stdlib.h I got this reply: ______________ Pedro, The mallinfo struct that ReportMemory uses is defined in malloc.h, and not brought in by stdlib.h. I'm testing on AIXv5.1, __STDC__ is defined, and "struct mallinfo" is unknown if I don't include malloc.h. I don't know enough about the different flavors of UNIX (System V, POSIX, BSD?) to know what to do that satisfies all. The AIX docs say "The mallopt and mallinfo subroutines are provided for source-level compatibility with the System V malloc subroutine " The gnu gcc docs say "This function and its associated data type are declared in `malloc.h'; they are an extension of the standard SVID/XPG version." ... ___________ So malloc.h will no be removed from the package but rather it will be undef'd __FreeBSD__ and the package will still work on FreeBSD. I doubt we will ever add these extensions, but there's also a glibc port for FreeBSD now so maybe __FreeBSD__ is not the correct variable here. I personally think the FreeBSD port's people have contributed greatly to clean inappropiate uses of malloc.h in the software world, but perhaps an error is too drastic and we should fall back to a warning. cheers, Pedro. --- Pedro F. Giffuni M. Sc. Industrial Eng. University of Pittsburgh Mech. Eng. Universidad Nacional de Colombia --- Yahoo is powered by FreeBSD http://www.FreeBSD.org/ ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it