Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 43659 invoked from network); 21 Feb 2008 17:44:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2008 17:44:49 -0000 Received: (qmail 60076 invoked by uid 500); 21 Feb 2008 17:44:43 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 60012 invoked by uid 500); 21 Feb 2008 17:44:43 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 60003 invoked by uid 99); 21 Feb 2008 17:44:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 09:44:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 66.249.90.177 as permitted sender) Received: from [66.249.90.177] (HELO ik-out-1112.google.com) (66.249.90.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 17:44:10 +0000 Received: by ik-out-1112.google.com with SMTP id b35so84111ika.7 for ; Thu, 21 Feb 2008 09:44:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=afaRbTdUjZja5w9LZItbBqM+85iTtljcEU4aVpHypSk=; b=jpNdI9aReJVUgpiFbWiTLLE/AbeUBQIXfSUcmT/mluNi2IBh9mvD+5qSdYXIeK90t/AhpXAoo+Dm5qe9ijnA3soi14VHKOzwK8LKNk+k4N7841maRCKlZWIbyC89cOsBVAPC8E3XCCXATJ/lW6Qzplt4KHV24mY9c0W1g08e9LA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:organization:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=VvSPCudw3KdrEfPkZe44GLpFv0GRvbZt2b23zfltsxvcncvtcXzvFzFgT6Z27hzOlRLgbXCYJKFRozc/P+LdGtgacgXaPl6Fl86M8hJ6VT3zCppoUGyV/dFdA1qUJwEXiDh7/EobcJoEXNbIUyizv9ntKlEjvjef9S6pf1U3qiM= Received: by 10.142.90.16 with SMTP id n16mr2001307wfb.70.1203615856113; Thu, 21 Feb 2008 09:44:16 -0800 (PST) Received: from localhost.localdomain ( [71.229.200.170]) by mx.google.com with ESMTPS id 30sm476654wfd.19.2008.02.21.09.44.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 21 Feb 2008 09:44:14 -0800 (PST) Message-ID: <47BDB86D.8010601@roguewave.com> Date: Thu, 21 Feb 2008 10:44:13 -0700 From: Martin Sebor Organization: Rogue Wave Software, Inc. User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: dev@stdcxx.apache.org Subject: Re: svn commit: r629825 - in /stdcxx/trunk/etc/config/src: FLOAT.cpp LDBL_PRINTF_PREFIX.cpp float_defs.h References: <20080221153356.33A371A9832@eris.apache.org> In-Reply-To: <20080221153356.33A371A9832@eris.apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org faridz@apache.org wrote: > Author: faridz > Date: Thu Feb 21 07:33:55 2008 > New Revision: 629825 > > URL: http://svn.apache.org/viewvc?rev=629825&view=rev > Log: > 2008-02-21 Farid Zaripov > > * etc/config/src/float_defs.h: New file with a definitions > of the floating point constants. > * etc/config/src/FLOAT.cpp: #including the "float_defs.h" > instead of defining the floating point constants in file. > * etc/config/src/LDBL_PRINTF_PREFIX.cpp: Ditto. > > Added: > stdcxx/trunk/etc/config/src/float_defs.h (with props) > Modified: > stdcxx/trunk/etc/config/src/FLOAT.cpp > stdcxx/trunk/etc/config/src/LDBL_PRINTF_PREFIX.cpp > > Modified: stdcxx/trunk/etc/config/src/FLOAT.cpp > URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/FLOAT.cpp?rev=629825&r1=629824&r2=629825&view=diff > ============================================================================== > --- stdcxx/trunk/etc/config/src/FLOAT.cpp (original) > +++ stdcxx/trunk/etc/config/src/FLOAT.cpp Thu Feb 21 07:33:55 2008 > @@ -30,10 +30,10 @@ > #include "config.h" > > enum { > - // the enumerators belo are expected to be hidden by macros #defined > - // in the header #included below; references to macros that > - // are not #defined in the header will silently use these enumerators > - // and prevent compilation errors that would result otherwise > + // the enumerators below are expected to be hidden by macros #defined > + // in the "float_defs.h" header #included below; ^^^^^^^^^^^^ FYI: In the general case, we do expect the enums to be hidden by the macros defined in . It's only when the macros aren't #defined there that the enums should be picked up. The exception is platforms where we can't compile and for which we define the FLT_XXX, DBL_XXX, and LDBL_XXX macros ourselves. Martin > references to macros > + // that are not #defined in the header will silently use these > + // enumerators and prevent compilation errors that would result otherwise > DBL_DIG = 15, // default > DBL_MANT_DIG = 53, > DBL_MAX_10_EXP = 308, > @@ -62,99 +62,7 @@ > #include // for printf() > #include // for strtod() > > -#ifndef _RWSTD_NO_FLOAT_H > -# include > - > -# if defined (__EDG__) && !defined (__INTEL_COMPILER) > - // define gcc 4 intrinsics otherwise not recognized > - // by the front end > -# define __FLT_DIG__ 6 > -# define __FLT_EPSILON__ 1.19209290e-7F > -# define __FLT_MANT_DIG__ 24 > -# define __FLT_MAX__ 3.40282347e+38F > -# define __FLT_MAX_10_EXP__ 38 > -# define __FLT_MAX_EXP__ 128 > -# define __FLT_MIN__ 1.17549435e-38F > -# define __FLT_MIN_10_EXP__ -37 > -# define __FLT_MIN_EXP__ -125 > -# define __FLT_RADIX__ 2 > - > -# define __DBL_DIG__ 15 > -# define __DBL_EPSILON__ 2.2204460492503131e-16 > -# define __DBL_MANT_DIG__ 53 > -# define __DBL_MAX__ 1.7976931348623157e+308 > -# define __DBL_MAX_10_EXP__ 308 > -# define __DBL_MAX_EXP__ 1024 > -# define __DBL_MIN__ 2.2250738585072014e-308 > -# define __DBL_MIN_10_EXP__ -307 > -# define __DBL_MIN_EXP__ -1021 > - > -# define __LDBL_DIG__ 18 > -# define __LDBL_EPSILON__ 1.08420217248550443401e-19L > -# define __LDBL_MANT_DIG__ 64 > -# define __LDBL_MAX__ 1.18973149535723176502e+4932L > -# define __LDBL_MAX_10_EXP__ 4932 > -# define __LDBL_MAX_EXP__ 16384 > -# define __LDBL_MIN__ 3.36210314311209350626e-4932L > -# define __LDBL_MIN_10_EXP__ -4931 > -# define __LDBL_MIN_EXP__ -16381 > - > - // Linux value > -# define _RWSTD_FLT_ROUNDS 1 /* round to nearest */ > - > -# if __GNUC__ < 4 > - > - // prevent the propriterary gcc __extension__ from > - // throwing the vanilla EDG demo for a loop > - > -# undef LDBL_EPSILON > -# undef LDBL_MIN > -# undef LDBL_MAX > - > - // redefine to prevent compilation errors > -# define LDBL_EPSILON 1.0842021724855044e-19L > -# define LDBL_MIN 3.3621031431120935e-4932L > -# define LDBL_MAX 1.1897314953572317e+4932L > -# endif //gcc 3 (as the back end for eccp) > -# endif // EDG eccp vanilla front end > -#else // if defined (_RWSTD_NO_FLOAT_H) > - // assume IEEE 754 floating point > - // FIXME: autodetect floating point format > -# define FLT_DIG 6 > -# define FLT_EPSILON 1.19209290e-7F > -# define FLT_MANT_DIG 24 > -# define FLT_MAX 3.40282347e+38F > -# define FLT_MAX_10_EXP 38 > -# define FLT_MAX_EXP 128 > -# define FLT_MIN 1.17549435e-38F > -# define FLT_MIN_10_EXP -37 > -# define FLT_MIN_EXP -125 > -# define FLT_RADIX 2 > - > -# define DBL_DIG 15 > -# define DBL_EPSILON 2.2204460492503131e-16 > -# define DBL_MANT_DIG 53 > -# define DBL_MAX 1.7976931348623157e+308 > -# define DBL_MAX_10_EXP 308 > -# define DBL_MAX_EXP 1024 > -# define DBL_MIN 2.2250738585072014e-308 > -# define DBL_MIN_10_EXP -307 > -# define DBL_MIN_EXP -1021 > - > -# define LDBL_DIG 18 > -# define LDBL_EPSILON 1.08420217248550443401e-19L > -# define LDBL_MANT_DIG 64 > -# define LDBL_MAX 1.18973149535723176502e+4932L > -# define LDBL_MAX_10_EXP 4932 > -# define LDBL_MAX_EXP 16384 > -# define LDBL_MIN 3.36210314311209350626e-4932L > -# define LDBL_MIN_10_EXP -4931 > -# define LDBL_MIN_EXP -16381 > - > - // Linux value > -# define _RWSTD_FLT_ROUNDS 1 /* round to nearest */ > -#endif // _RWSTD_NO_FLOAT_H > - > +#include "float_defs.h" // for FLT_XXX, DBL_XXX, LDBL_XXX constants > > #ifndef _RWSTD_NO_LIBC_EXCEPTION_SPEC > # define LIBC_THROWS() throw () > > Modified: stdcxx/trunk/etc/config/src/LDBL_PRINTF_PREFIX.cpp > URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/LDBL_PRINTF_PREFIX.cpp?rev=629825&r1=629824&r2=629825&view=diff > ============================================================================== > --- stdcxx/trunk/etc/config/src/LDBL_PRINTF_PREFIX.cpp (original) > +++ stdcxx/trunk/etc/config/src/LDBL_PRINTF_PREFIX.cpp Thu Feb 21 07:33:55 2008 > @@ -25,24 +25,7 @@ > #include > > #include "config.h" > - > -#ifndef _RWSTD_NO_FLOAT_H > -# include > - > -# if defined (__EDG__) && defined (__linux__) > - > - // gcc on Linux #defines these using its own propriterary __extension__ > -# undef LDBL_EPSILON > -# undef LDBL_MIN > -# undef LDBL_MAX > - > - // redefine to prevent compilation errors > -# define LDBL_EPSILON 1.0842021724855044e-19L > -# define LDBL_MIN 3.3621031431120935e-4932L > -# define LDBL_MAX 1.1897314953572317e+4932L > -# endif // defined (__EDG__) && defined (__linux__) > - > -#endif // _RWSTD_NO_FLOAT_H > +#include "float_defs.h" // for LDBL_XXX constants > > > // avoid having to #include > > Added: stdcxx/trunk/etc/config/src/float_defs.h > URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/float_defs.h?rev=629825&view=auto > ============================================================================== > --- stdcxx/trunk/etc/config/src/float_defs.h (added) > +++ stdcxx/trunk/etc/config/src/float_defs.h Thu Feb 21 07:33:55 2008 > @@ -0,0 +1,118 @@ > +// definitions of the floating point constants > + > +/*************************************************************************** > + * > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. See the NOTICE file distributed > + * with this work for additional information regarding copyright > + * ownership. The ASF licenses this file to you under the Apache > + * License, Version 2.0 (the License); you may not use this file > + * except in compliance with the License. You may obtain a copy of > + * the License at > + * > + * http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > + * implied. See the License for the specific language governing > + * permissions and limitations under the License. > + * > + * Copyright 1999-2008 Rogue Wave Software, Inc. > + * > + **************************************************************************/ > + > +// this file must be included only after the config.h > + > +#ifndef _RWSTD_NO_FLOAT_H > +# include > + > +# if defined (__EDG__) && !defined (__INTEL_COMPILER) > + // define gcc 4 intrinsics otherwise not recognized > + // by the front end > +# define __FLT_DIG__ 6 > +# define __FLT_EPSILON__ 1.19209290e-7F > +# define __FLT_MANT_DIG__ 24 > +# define __FLT_MAX__ 3.40282347e+38F > +# define __FLT_MAX_10_EXP__ 38 > +# define __FLT_MAX_EXP__ 128 > +# define __FLT_MIN__ 1.17549435e-38F > +# define __FLT_MIN_10_EXP__ -37 > +# define __FLT_MIN_EXP__ -125 > +# define __FLT_RADIX__ 2 > + > +# define __DBL_DIG__ 15 > +# define __DBL_EPSILON__ 2.2204460492503131e-16 > +# define __DBL_MANT_DIG__ 53 > +# define __DBL_MAX__ 1.7976931348623157e+308 > +# define __DBL_MAX_10_EXP__ 308 > +# define __DBL_MAX_EXP__ 1024 > +# define __DBL_MIN__ 2.2250738585072014e-308 > +# define __DBL_MIN_10_EXP__ -307 > +# define __DBL_MIN_EXP__ -1021 > + > +# define __LDBL_DIG__ 18 > +# define __LDBL_EPSILON__ 1.08420217248550443401e-19L > +# define __LDBL_MANT_DIG__ 64 > +# define __LDBL_MAX__ 1.18973149535723176502e+4932L > +# define __LDBL_MAX_10_EXP__ 4932 > +# define __LDBL_MAX_EXP__ 16384 > +# define __LDBL_MIN__ 3.36210314311209350626e-4932L > +# define __LDBL_MIN_10_EXP__ -4931 > +# define __LDBL_MIN_EXP__ -16381 > + > + // Linux value > +# define _RWSTD_FLT_ROUNDS 1 /* round to nearest */ > + > +# if __GNUC__ < 4 > + > + // prevent the propriterary gcc __extension__ from > + // throwing the vanilla EDG demo for a loop > + > +# undef LDBL_EPSILON > +# undef LDBL_MIN > +# undef LDBL_MAX > + > + // redefine to prevent compilation errors > +# define LDBL_EPSILON 1.0842021724855044e-19L > +# define LDBL_MIN 3.3621031431120935e-4932L > +# define LDBL_MAX 1.1897314953572317e+4932L > +# endif //gcc 3 (as the back end for eccp) > +# endif // EDG eccp vanilla front end > +#else // if defined (_RWSTD_NO_FLOAT_H) > + // assume IEEE 754 floating point > + // FIXME: autodetect floating point format > +# define FLT_DIG 6 > +# define FLT_EPSILON 1.19209290e-7F > +# define FLT_MANT_DIG 24 > +# define FLT_MAX 3.40282347e+38F > +# define FLT_MAX_10_EXP 38 > +# define FLT_MAX_EXP 128 > +# define FLT_MIN 1.17549435e-38F > +# define FLT_MIN_10_EXP -37 > +# define FLT_MIN_EXP -125 > +# define FLT_RADIX 2 > + > +# define DBL_DIG 15 > +# define DBL_EPSILON 2.2204460492503131e-16 > +# define DBL_MANT_DIG 53 > +# define DBL_MAX 1.7976931348623157e+308 > +# define DBL_MAX_10_EXP 308 > +# define DBL_MAX_EXP 1024 > +# define DBL_MIN 2.2250738585072014e-308 > +# define DBL_MIN_10_EXP -307 > +# define DBL_MIN_EXP -1021 > + > +# define LDBL_DIG 18 > +# define LDBL_EPSILON 1.08420217248550443401e-19L > +# define LDBL_MANT_DIG 64 > +# define LDBL_MAX 1.18973149535723176502e+4932L > +# define LDBL_MAX_10_EXP 4932 > +# define LDBL_MAX_EXP 16384 > +# define LDBL_MIN 3.36210314311209350626e-4932L > +# define LDBL_MIN_10_EXP -4931 > +# define LDBL_MIN_EXP -16381 > + > + // Linux value > +# define _RWSTD_FLT_ROUNDS 1 /* round to nearest */ > +#endif // _RWSTD_NO_FLOAT_H > > Propchange: stdcxx/trunk/etc/config/src/float_defs.h > ------------------------------------------------------------------------------ > svn:eol-style = native > > Propchange: stdcxx/trunk/etc/config/src/float_defs.h > ------------------------------------------------------------------------------ > svn:keywords = Id > > >