From owner-freebsd-standards Thu Nov 29 1:19: 2 2001 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 6E9D637B430; Thu, 29 Nov 2001 01:18:58 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fAT9HZ123027; Thu, 29 Nov 2001 04:17:35 -0500 (EST) (envelope-from mike) Date: Thu, 29 Nov 2001 04:17:35 -0500 From: Mike Barcroft To: Wes Peters Cc: Bruce Evans , standards@FreeBSD.org Subject: Re: cvs commit: src/include string.h Message-ID: <20011129041735.F15672@espresso.q9media.com> References: <200111281902.fASJ21x89181@freefall.freebsd.org> <3C05F40D.15370F5A@softweyr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C05F40D.15370F5A@softweyr.com>; from wes@softweyr.com on Thu, Nov 29, 2001 at 01:38:37AM -0700 Organization: The FreeBSD Project 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 [Wes Peters asked a question about Bruce's recent commit to in a private e-mail. The question basicly asked why Bruce moved it into the somewhat miscorrectly labeled "Nonstandard routines" section. I thought my reply would be useful to a larger audience.] The problem is that we don't want to pollute older environments with new functions. For instance, if one specifies that they want to compile using an older POSIX or C standard, the system can't pollute the namespace with functions that comply with newer standards. As Bruce's commit message suggests, this is only temporary. I think we need something along the lines of: #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) #if _POSIX_C_SOURCE >= 200111L /* XXX */ ... #endif #endif ...to properly protect new POSIX functions. Broken down, this means something like "only prototype this function if we aren't using C90, POSIX.1, POSIX.1-88, POSIX.1-90, or POSIX.1-96". I'm unsure whether we care if POSIX.1-200x functions leak into C99. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message