summaryrefslogtreecommitdiff
path: root/src/md5sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-06-24 20:53:17 +0000
committerJim Meyering <jim@meyering.net>1995-06-24 20:53:17 +0000
commit4b366ceed572fc4ce706c133ddb79f30f909c805 (patch)
tree94184e8bab1af554d594f84cf25360fb0d398163 /src/md5sum.c
parenteb5665733a6a44e41dca07912aef6c1d93006a5f (diff)
downloadcoreutils-4b366ceed572fc4ce706c133ddb79f30f909c805.tar.xz
[uint32]: When testing for 32-bit arithmetic type,
also check `unsigned long', as a concession to systems with int's smaller than 32 bits.
Diffstat (limited to 'src/md5sum.c')
-rw-r--r--src/md5sum.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/md5sum.c b/src/md5sum.c
index 1efb2b1c7..b72e2d646 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -110,15 +110,19 @@
# define UINT_MAX UINT_MAX_32_BITS
#endif
-#if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned int uint32;
+#if ULONG_MAX == UINT_MAX_32_BITS
+ typedef unsigned long uint32;
#else
-# if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short uint32;
+# if UINT_MAX == UINT_MAX_32_BITS
+ typedef unsigned int uint32;
# else
- /* The following line is intended to throw an error. Using #error is
- not portable enough. */
- "Cannot determine unsigned 32-bit data type."
+# if USHRT_MAX == UINT_MAX_32_BITS
+ typedef unsigned short uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
# endif
#endif