summaryrefslogtreecommitdiffstats
path: root/sys/alpha/include
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-05-04 22:13:04 +0000
committerkan <kan@FreeBSD.org>2003-05-04 22:13:04 +0000
commit9328ad6bf8f2652faa7b7568504c1abe7e4b513a (patch)
tree85391d861d4f54f67ff3cf9658a8c0a4f1483e9f /sys/alpha/include
parent6ff96f7a8123387563596909f6ada03919b54bde (diff)
downloadFreeBSD-src-9328ad6bf8f2652faa7b7568504c1abe7e4b513a.zip
FreeBSD-src-9328ad6bf8f2652faa7b7568504c1abe7e4b513a.tar.gz
Style fixes.
Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong.
Diffstat (limited to 'sys/alpha/include')
-rw-r--r--sys/alpha/include/_limits.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/alpha/include/_limits.h b/sys/alpha/include/_limits.h
index 45ca436..9e8dc46 100644
--- a/sys/alpha/include/_limits.h
+++ b/sys/alpha/include/_limits.h
@@ -40,6 +40,17 @@
#define __CHAR_BIT 8 /* number of bits in a char */
+/*
+ * According to ANSI (section 2.2.4.2), the values below must be usable by
+ * #if preprocessing directives. Additionally, the expression must have the
+ * same type as would an expression that is an object of the corresponding
+ * type converted according to the integral promotions. The subtraction for
+ * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
+ * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
+ * These numbers are for the default configuration of gcc. They work for
+ * some other compilers as well, but this should not be depended on.
+ */
+
#define __SCHAR_MAX 0x7f /* max value for a signed char */
#define __SCHAR_MIN (-0x7f-1) /* min value for a signed char */
@@ -72,7 +83,7 @@
#define __OFF_MAX __LONG_MAX /* max value for a off_t */
#define __OFF_MIN __LONG_MIN /* min value for a off_t */
-/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
+/* Quads and longs are the same on the alpha. Ensure they stay in sync. */
#define __UQUAD_MAX (__ULONG_MAX) /* max value for a uquad_t */
#define __QUAD_MAX (__LONG_MAX) /* max value for a quad_t */
#define __QUAD_MIN (__LONG_MIN) /* min value for a quad_t */
@@ -80,12 +91,4 @@
#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 __FLT_DIG 6
-#define __FLT_MAX 3.40282347E+38F
-#define __FLT_MIN 1.17549435E-38F
-
#endif /* !_MACHINE__LIMITS_H_ */
OpenPOWER on IntegriCloud