From owner-freebsd-standards Mon Sep 9 11:54: 4 2002 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 A0F5537B400 for ; Mon, 9 Sep 2002 11:54:01 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39FBE43E6E for ; Mon, 9 Sep 2002 11:54:00 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id EAA19667; Tue, 10 Sep 2002 04:53:53 +1000 Date: Tue, 10 Sep 2002 05:01:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Garrett Wollman Cc: standards@FreeBSD.ORG Subject: Re: CFR: Jumbo stdlib.h/qsort_r patch In-Reply-To: <200209091736.g89HaDnh066298@khavrinen.lcs.mit.edu> Message-ID: <20020910044208.T8099-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 9 Sep 2002, Garrett Wollman wrote: > ... > - The compiler now signals whether it is prepared to compile `long > long'. I'll dump this part in favor of obrien's patch. This patchset I dislike both. stdlib.h should work right for all sorts of C90 and C99 compilers, not just ones that have been patched to define a special macro. Ifdefs in can handle all relevant versions of gcc (both system ones on ports ones) much more easily than patches for N systems and M ports. > Index: include/stdlib.h > =================================================================== > RCS file: /home/ncvs/src/include/stdlib.h,v > retrieving revision 1.40 > diff -u -r1.40 stdlib.h > --- include/stdlib.h 1 Sep 2002 07:08:22 -0000 1.40 > +++ include/stdlib.h 9 Sep 2002 00:24:00 -0000 > ... > +/* float strtof(const char *__restrict, char **__restrict); */ Code should be "commented out" using ifdefs, not comments. This avoids messing up the formatting of the code and actually works if the code has embedded comments. > +#if __ISO_C_VISIBLE >= 1999 > +#ifdef __LONG_LONG_SUPPORTED > +/* LONGLONG */ LONGLONG is bogus. lint shouldn't see long long declarations if it doesn't support them. FreeBSD's lint does support them but is out of date -- it treats long long as a gcc (mis)feature only. > ... > +#if __BSD_VISIBLE > +extern const char *_malloc_options; > +extern void (*_malloc_message)(const char *, const char *, const char *, const char *); Still has some style bugs (no indentation; long line). I dislike arranging functions for easy ifdefing. I dislike rearranging them for this more. Some of the other changes are OK :). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message