Author: faridz Date: Tue Feb 26 06:40:16 2008 New Revision: 631231 URL: http://svn.apache.org/viewvc?rev=631231&view=rev Log: 2008-02-26 Farid Zaripov <[EMAIL PROTECTED]>
Merged r629825 from trunk. * 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. Merged r629900 from trunk. * etc/config/src/FLOAT.cpp: Updated comment, erroneously changed in r629825. Added: stdcxx/branches/4.2.x/etc/config/src/float_defs.h - copied unchanged from r631225, stdcxx/trunk/etc/config/src/float_defs.h Modified: stdcxx/branches/4.2.x/etc/config/src/FLOAT.cpp stdcxx/branches/4.2.x/etc/config/src/LDBL_PRINTF_PREFIX.cpp Modified: stdcxx/branches/4.2.x/etc/config/src/FLOAT.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/FLOAT.cpp?rev=631231&r1=631230&r2=631231&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/src/FLOAT.cpp (original) +++ stdcxx/branches/4.2.x/etc/config/src/FLOAT.cpp Tue Feb 26 06:40:16 2008 @@ -30,10 +30,11 @@ #include "config.h" enum { - // the enumerators belo are expected to be hidden by macros #defined - // in the <float.h> 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.h> header #included below through "float_defs.h"; + // 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 +63,7 @@ #include <stdio.h> // for printf() #include <stdlib.h> // for strtod() -#ifndef _RWSTD_NO_FLOAT_H -# include <float.h> - -# 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/branches/4.2.x/etc/config/src/LDBL_PRINTF_PREFIX.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/etc/config/src/LDBL_PRINTF_PREFIX.cpp?rev=631231&r1=631230&r2=631231&view=diff ============================================================================== --- stdcxx/branches/4.2.x/etc/config/src/LDBL_PRINTF_PREFIX.cpp (original) +++ stdcxx/branches/4.2.x/etc/config/src/LDBL_PRINTF_PREFIX.cpp Tue Feb 26 06:40:16 2008 @@ -25,24 +25,7 @@ #include <stdio.h> #include "config.h" - -#ifndef _RWSTD_NO_FLOAT_H -# include <float.h> - -# 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 <string.h>