summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/include/float.h18
-rw-r--r--sys/sys/limits.h37
2 files changed, 31 insertions, 24 deletions
diff --git a/sys/arch/vax/include/float.h b/sys/arch/vax/include/float.h
index 96a43897c20..2b387ae649a 100644
--- a/sys/arch/vax/include/float.h
+++ b/sys/arch/vax/include/float.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: float.h,v 1.4 2000/04/26 03:08:41 bjc Exp $ */
+/* $OpenBSD: float.h,v 1.5 2002/05/11 14:46:41 millert Exp $ */
/* $NetBSD: float.h,v 1.5 1998/10/10 02:13:55 matt Exp $ */
/*
@@ -44,24 +44,28 @@
#define FLT_MANT_DIG 24 /* p */
#define FLT_EPSILON 1.19209290E-7F /* b**(1-p) */
-#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
#define FLT_MIN_EXP (-127) /* emin */
-#define FLT_MIN 2.93873588E-39F /* b**(emin-1) */
#define FLT_MIN_10_EXP (-38) /* ceil(log10(b**(emin-1))) */
#define FLT_MAX_EXP 127 /* emax */
-#define FLT_MAX 1.70141173E+38F /* (1-b**(-p))*b**emax */
#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
#define DBL_MANT_DIG 56
#define DBL_EPSILON 2.77555756156289135E-17
-#define DBL_DIG 16
#define DBL_MIN_EXP (-127)
-#define DBL_MIN 2.938735877055718770E-39
#define DBL_MIN_10_EXP (-38)
#define DBL_MAX_EXP 127
-#define DBL_MAX 1.701411834604692294E+38
#define DBL_MAX_10_EXP 38
+/* limits.h also defines this */
+#if !defined(FLT_DIG)
+# define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
+# define FLT_MIN 2.93873588E-39F /* b**(emin-1) */
+# define FLT_MAX 1.70141173E+38F /* (1-b**(-p))*b**emax */
+# define DBL_DIG 16
+# define DBL_MIN 2.938735877055718770E-39
+# define DBL_MAX 1.701411834604692294E+38
+#endif
+
#define LDBL_MANT_DIG DBL_MANT_DIG
#define LDBL_EPSILON DBL_EPSILON
#define LDBL_DIG DBL_DIG
diff --git a/sys/sys/limits.h b/sys/sys/limits.h
index 826a782651a..9d70c50700a 100644
--- a/sys/sys/limits.h
+++ b/sys/sys/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.3 2002/04/24 22:32:57 espie Exp $ */
+/* $OpenBSD: limits.h,v 1.4 2002/05/11 14:46:41 millert Exp $ */
/*
* Copyright (c) 2002 Marc Espie.
*
@@ -103,22 +103,25 @@
# endif
# define WORD_BIT 32
-# if defined(__DBL_DIG)
-# define DBL_DIG __DBL_DIG
-# define DBL_MAX __DBL_MAX
-# define DBL_MIN __DBL_MIN
-
-# define FLT_DIG __FLT_DIG
-# define FLT_MAX __FLT_MAX
-# define FLT_MIN __FLT_MIN
-# else
-# define DBL_DIG 15
-# define DBL_MAX 1.7976931348623157E+308
-# define DBL_MIN 2.2250738585072014E-308
-
-# define FLT_DIG 6
-# define FLT_MAX 3.40282347E+38F
-# define FLT_MIN 1.17549435E-38F
+/* float.h defines these as well */
+# if !defined(DBL_DIG)
+# if defined(__DBL_DIG)
+# define DBL_DIG __DBL_DIG
+# define DBL_MAX __DBL_MAX
+# define DBL_MIN __DBL_MIN
+
+# define FLT_DIG __FLT_DIG
+# define FLT_MAX __FLT_MAX
+# define FLT_MIN __FLT_MIN
+# else
+# define DBL_DIG 15
+# define DBL_MAX 1.7976931348623157E+308
+# define DBL_MIN 2.2250738585072014E-308
+
+# define FLT_DIG 6
+# define FLT_MAX 3.40282347E+38F
+# define FLT_MIN 1.17549435E-38F
+# endif
# endif
#endif