aboutsummaryrefslogtreecommitdiffstats
path: root/main/uclibc++/007-numeric_limits.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/uclibc++/007-numeric_limits.patch')
-rw-r--r--main/uclibc++/007-numeric_limits.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/main/uclibc++/007-numeric_limits.patch b/main/uclibc++/007-numeric_limits.patch
new file mode 100644
index 0000000000..1ed7d6c6ec
--- /dev/null
+++ b/main/uclibc++/007-numeric_limits.patch
@@ -0,0 +1,66 @@
+Index: uClibc++-0.2.2/include/limits
+===================================================================
+--- uClibc++-0.2.2/include/limits (revision 1877)
++++ uClibc++-0.2.2/include/limits (revision 1878)
+@@ -143,6 +143,53 @@
+ static T signaling_NaN();
+ };
+
++template <> class numeric_limits<bool> {
++public:
++ typedef bool T;
++ // General -- meaningful for all specializations.
++ static const bool is_specialized = true;
++ static T min(){
++ return false;
++ }
++ static T max(){
++ return true;
++ }
++ static const int radix = 2;
++ static const int digits = 1;
++ static const int digits10 = 0;
++ static const bool is_signed = false;
++ static const bool is_integer = true;
++ static const bool is_exact = true;
++ static const bool traps = false;
++ static const bool is_modulo = false;
++ static const bool is_bounded = true;
++
++ // Floating point specific.
++
++ static T epsilon(){
++ return 0;
++ }
++ static T round_error(){
++ return 0;
++ }
++ static const int min_exponent10 = 0;
++ static const int max_exponent10 = 0;
++ static const int min_exponent = 0;
++
++ static const int max_exponent = 0;
++ static const bool has_infinity = false;
++ static const bool has_quiet_NaN = false;
++ static const bool has_signaling_NaN = false;
++ static const bool is_iec559 = false;
++ static const bool has_denorm = false;
++ static const bool tinyness_before = false;
++ static const float_round_style round_style = round_indeterminate;
++ static T denorm_min();
++ static T infinity();
++ static T quiet_NaN();
++ static T signaling_NaN();
++};
++
+ template <> class numeric_limits<unsigned char> {
+ public:
+ typedef unsigned char T;
+@@ -567,6 +614,7 @@
+ };
+
+ template <> class numeric_limits<double> {
++public:
+ typedef double numeric_type;
+
+ static const bool is_specialized = true;