summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-24 08:45:55 +0000
committerJim Meyering <jim@meyering.net>1998-01-24 08:45:55 +0000
commitcd4c2d0fdc30260f3cbb7d4bd4bd3decffc31f8d (patch)
tree6ebf04592ffc48d2797d7e6791403f8d4dfc99f9 /src/system.h
parent8a0550a816fdcb48e1785281d3d9195521c85b1f (diff)
downloadcoreutils-cd4c2d0fdc30260f3cbb7d4bd4bd3decffc31f8d.tar.xz
(TYPE_MINIMUM): Add extra outer cast to work around
bug in Cray C 5.0.3.0 when T == time_t.
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/system.h b/src/system.h
index 48a2737cf..53cbff081 100644
--- a/src/system.h
+++ b/src/system.h
@@ -120,7 +120,10 @@
/* The extra casts work around common compiler bugs. */
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
-#define TYPE_MINIMUM(t) (TYPE_SIGNED (t) ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0)
+/* The outer cast is needed to work around a bug in Cray C 5.0.3.0.
+ It is necessary at least when t == time_t. */
+#define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
+ ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) : (t) 0))
#define TYPE_MAXIMUM(t) (~ (t) 0 - TYPE_MINIMUM (t))
#ifndef INT_MAX