Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Since all our compilers support __DBL_* and __FLT_*...



details:   https://anonhg.NetBSD.org/src/rev/6a1711bb7d54
branches:  trunk
changeset: 795612:6a1711bb7d54
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Apr 21 10:53:47 2014 +0000

description:
Since all our compilers support __DBL_* and __FLT_*, use them to define
{DBL,FLT}_{DIG,MIN,MAX}

diffstat:

 sys/arch/alpha/include/limits.h   |  14 +++++++-------
 sys/arch/amd64/include/limits.h   |  14 +++++++-------
 sys/arch/i386/include/limits.h    |  14 +++++++-------
 sys/arch/ia64/include/limits.h    |  16 +++++++---------
 sys/arch/m68k/include/limits.h    |  14 +++++++-------
 sys/arch/mips/include/limits.h    |  14 +++++++-------
 sys/arch/powerpc/include/limits.h |  14 +++++++-------
 sys/arch/sh3/include/limits.h     |  14 +++++++-------
 sys/arch/sparc/include/limits.h   |  14 +++++++-------
 9 files changed, 63 insertions(+), 65 deletions(-)

diffs (263 lines):

diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/alpha/include/limits.h
--- a/sys/arch/alpha/include/limits.h   Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/alpha/include/limits.h   Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.15 2013/04/11 00:57:34 christos Exp $ */
+/* $NetBSD: limits.h,v 1.16 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -91,13 +91,13 @@
 #define        LONG_BIT        64
 #define        WORD_BIT        32
 
-#define        DBL_DIG         15
-#define        DBL_MAX         1.7976931348623157E+308
-#define        DBL_MIN         2.2250738585072014E-308
+#define        DBL_DIG         __DBL_DIG__
+#define        DBL_MAX         __DBL_MAX__
+#define        DBL_MIN         __DBL_MIN__
 
-#define        FLT_DIG         6
-#define        FLT_MAX         3.40282347E+38F
-#define        FLT_MIN         1.17549435E-38F
+#define        FLT_DIG         __FLT_DIG__
+#define        FLT_MAX         __FLT_MAX__
+#define        FLT_MIN         __FLT_MIN__
 #endif
 
 #endif /* _MACHINE_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/amd64/include/limits.h
--- a/sys/arch/amd64/include/limits.h   Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/amd64/include/limits.h   Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.13 2013/04/11 00:57:34 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.14 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -82,13 +82,13 @@
 #define LONG_BIT       64
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #else  /*      __x86_64__      */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/i386/include/limits.h
--- a/sys/arch/i386/include/limits.h    Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/i386/include/limits.h    Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.24 2013/04/11 00:57:35 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.25 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -80,13 +80,13 @@
 #define LONG_BIT       32
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #endif /* _I386_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/ia64/include/limits.h
--- a/sys/arch/ia64/include/limits.h    Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/ia64/include/limits.h    Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.7 2013/04/11 00:57:35 christos Exp $      */
+/*     $NetBSD: limits.h,v 1.8 2014/04/21 10:53:47 matt Exp $  */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -81,15 +81,13 @@
 #define LONG_BIT       64
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif /* _XOPEN_SOURCE || _NETBSD_SOURCE */
 
-
-
 #endif /* _MACHINE_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/m68k/include/limits.h
--- a/sys/arch/m68k/include/limits.h    Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/m68k/include/limits.h    Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.22 2013/04/11 00:57:35 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.23 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -80,13 +80,13 @@
 #define LONG_BIT       32
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #endif /* _M68K_MACHINE_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/mips/include/limits.h
--- a/sys/arch/mips/include/limits.h    Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/mips/include/limits.h    Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.25 2013/04/11 00:57:35 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.26 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -118,13 +118,13 @@
 #endif
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #endif /* _MIPS_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/powerpc/include/limits.h
--- a/sys/arch/powerpc/include/limits.h Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/powerpc/include/limits.h Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.18 2013/04/11 00:57:36 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.19 2014/04/21 10:53:47 matt Exp $ */
 
 /*
  * Copyright (c) 1988, 1993
@@ -118,13 +118,13 @@
 #endif
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #endif /* _POWERPC_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/sh3/include/limits.h
--- a/sys/arch/sh3/include/limits.h     Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/sh3/include/limits.h     Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.13 2013/04/11 00:57:36 christos Exp $     */
+/*     $NetBSD: limits.h,v 1.14 2014/04/21 10:53:48 matt Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -80,13 +80,13 @@
 #define        LONG_BIT        32
 #define        WORD_BIT        32
 
-#define        DBL_DIG         15
-#define        DBL_MAX         1.7976931348623157E+308
-#define        DBL_MIN         2.2250738585072014E-308
+#define        DBL_DIG         __DBL_DIG__
+#define        DBL_MAX         __DBL_MAX__
+#define        DBL_MIN         __DBL_MIN__
 
-#define        FLT_DIG         6
-#define        FLT_MAX         3.40282347E+38F
-#define        FLT_MIN         1.17549435E-38F
+#define        FLT_DIG         __FLT_DIG__
+#define        FLT_MAX         __FLT_MAX__
+#define        FLT_MIN         __FLT_MIN__
 #endif
 
 #endif /* !_SH3_LIMITS_H_ */
diff -r ac7ad89f99ef -r 6a1711bb7d54 sys/arch/sparc/include/limits.h
--- a/sys/arch/sparc/include/limits.h   Mon Apr 21 00:17:50 2014 +0000
+++ b/sys/arch/sparc/include/limits.h   Mon Apr 21 10:53:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: limits.h,v 1.21 2013/04/11 00:57:36 christos Exp $ */
+/*     $NetBSD: limits.h,v 1.22 2014/04/21 10:53:48 matt Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -92,13 +92,13 @@
 #endif
 #define WORD_BIT       32
 
-#define DBL_DIG                15
-#define DBL_MAX                1.7976931348623157E+308
-#define DBL_MIN                2.2250738585072014E-308
+#define DBL_DIG                __DBL_DIG__
+#define DBL_MAX                __DBL_MAX__
+#define DBL_MIN                __DBL_MIN__
 
-#define FLT_DIG                6
-#define FLT_MAX                3.40282347E+38F
-#define FLT_MIN                1.17549435E-38F
+#define FLT_DIG                __FLT_DIG__
+#define FLT_MAX                __FLT_MAX__
+#define FLT_MIN                __FLT_MIN__
 #endif
 
 #endif /* _MACHINE_LIMITS_H_ */



Home | Main Index | Thread Index | Old Index