From owner-cvs-all Mon Jul 23 5:21:28 2001 Delivered-To: cvs-all@freebsd.org Received: from assaris.sics.se (assaris.sics.se [193.10.66.234]) by hub.freebsd.org (Postfix) with ESMTP id 1727537B406; Mon, 23 Jul 2001 05:21:22 -0700 (PDT) (envelope-from assar@assaris.sics.se) Received: (from assar@localhost) by assaris.sics.se (8.9.3/8.9.3) id OAA38703; Mon, 23 Jul 2001 14:21:19 +0200 (CEST) (envelope-from assar) To: Poul-Henning Kamp Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil ecalloc.c emalloc.3 emalloc.c erealloc.c estrdup.c Makefile libutil.h References: <28513.995870585@critter> From: Assar Westerlund Date: 23 Jul 2001 14:21:18 +0200 In-Reply-To: Poul-Henning Kamp's message of "Mon, 23 Jul 2001 08:43:05 +0200" Message-ID: <5l66cjx2dd.fsf@assaris.sics.se> Lines: 16 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Poul-Henning Kamp writes: > Why not simply use: > > char *_malloc_options = "X"; > > as documented in malloc(3) ? Because it's not portable. If you want to build FreeBSD code on other platforms (such as I believe both Brian and Garance wanted to) you cannot rely on their malloc having that option. You can have your code call non-portabel functions (such as strdup, snprintf, asprintf, err, emalloc, and what have you) if you build a portabel library with these functions for use on platforms where they aren't provided to you. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message