From owner-freebsd-current Tue Mar 11 6:45: 8 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 673B437B404; Tue, 11 Mar 2003 06:45:06 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0F5B43F85; Tue, 11 Mar 2003 06:45:04 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.8/8.12.8) with ESMTP id h2BEj3jx000941; Tue, 11 Mar 2003 17:45:03 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.8/8.12.6/Submit) id h2BEj3BY000940; Tue, 11 Mar 2003 17:45:03 +0300 (MSK) (envelope-from ache) Date: Tue, 11 Mar 2003 17:45:02 +0300 From: "Andrey A. Chernov" To: Mike Barcroft Cc: standards@FreeBSD.org, current@FreeBSD.org Subject: Re: CFR: add widely accepted _ISOC99_SOURCE Message-ID: <20030311144501.GA364@nagual.pp.ru> References: <20030310061548.GA85361@nagual.pp.ru> <20030310104434.P70629@espresso.bsdmike.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030310104434.P70629@espresso.bsdmike.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Mar 10, 2003 at 10:44:34 -0500, Mike Barcroft wrote: > Andrey A. Chernov writes: > > Many programs (from ports too) defines _ISOC99_SOURCE to get C99 > > functions, but we don't sense this define currently. Here is the fix for > > review: > > Cool. I didn't realize there was an existing precedence, or I would > have used it. Just search Google about _ISOC99_SOURCE and see :-) > This part isn't needed... > > > #else > > /*- > > * Deal with _ANSI_SOURCE: > > @@ -378,7 +381,7 @@ > > #define __XSI_VISIBLE 0 > > #define __BSD_VISIBLE 0 > > #define __ISO_C_VISIBLE 1990 > > -#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ > > +#elif defined(_ISOC99_SOURCE) /* Strict C99 env. */ > > #define __POSIX_VISIBLE 0 > > #define __XSI_VISIBLE 0 > > #define __BSD_VISIBLE 0 > > ...since the next line here is: > > #define __ISO_C_VISIBLE 1999 Hm, I don't quite understand, which one part you mean? My patch handles 2 following cases: 1) Any _POSIX_C_SOURCE with _ISOC99_SOURCE. It is from real life example (ImageMagick). It wants lower POSIX level, *but* wants _ISOC99_SOURCE in the same time. 2) _ISOC99_SOURCE without any _POSIX_C_SOURCE. In that case it overrides _ANSI_SOURCE like old _C99_SOURCE does. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message