summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-10-24 10:49:56 +0000
committerobrien <obrien@FreeBSD.org>2000-10-24 10:49:56 +0000
commit5cc4f2002f039faff9df2cf6ead351f67e674013 (patch)
tree53e5297218e0d3aaca962bc65e662b4e49963a05 /sys/alpha
parentb8efe2aeabda2d34c65e986d0dc8d20e8067481d (diff)
downloadFreeBSD-src-5cc4f2002f039faff9df2cf6ead351f67e674013.zip
FreeBSD-src-5cc4f2002f039faff9df2cf6ead351f67e674013.tar.gz
Adjust comments
Submitted by: bde Add ISO C99's long long type limits. Reviewed by: bde
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/include/_limits.h14
-rw-r--r--sys/alpha/include/limits.h14
2 files changed, 20 insertions, 8 deletions
diff --git a/sys/alpha/include/_limits.h b/sys/alpha/include/_limits.h
index 99ca2d8..474d28d 100644
--- a/sys/alpha/include/_limits.h
+++ b/sys/alpha/include/_limits.h
@@ -44,10 +44,10 @@
* #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 and LONG_MIN is so the value is not unsigned; 2147483648 is an
+ * 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 work for pcc as well. The UINT_MAX and ULONG_MAX values
- * are written as hex so that GCC will be quiet about large integer constants.
+ * 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 */
@@ -68,13 +68,19 @@
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
+/* Long longs and longs are the same size on the alpha. */
+ /* max for an unsigned long long */
+#define ULLONG_MAX 0xffffffffffffffffULL
+#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
+#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
+
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
-/* Quads and longs are the same on the alpha */
+/* 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 */
diff --git a/sys/alpha/include/limits.h b/sys/alpha/include/limits.h
index 99ca2d8..474d28d 100644
--- a/sys/alpha/include/limits.h
+++ b/sys/alpha/include/limits.h
@@ -44,10 +44,10 @@
* #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 and LONG_MIN is so the value is not unsigned; 2147483648 is an
+ * 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 work for pcc as well. The UINT_MAX and ULONG_MAX values
- * are written as hex so that GCC will be quiet about large integer constants.
+ * 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 */
@@ -68,13 +68,19 @@
#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
+/* Long longs and longs are the same size on the alpha. */
+ /* max for an unsigned long long */
+#define ULLONG_MAX 0xffffffffffffffffULL
+#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */
+#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */
+
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
-/* Quads and longs are the same on the alpha */
+/* 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 */
OpenPOWER on IntegriCloud