]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
[uint32]: When testing for 32-bit arithmetic type,
authorJim Meyering <jim@meyering.net>
Sat, 24 Jun 1995 20:53:17 +0000 (20:53 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 24 Jun 1995 20:53:17 +0000 (20:53 +0000)
also check `unsigned long', as a concession to systems with
int's smaller than 32 bits.

src/md5sum.c

index 1efb2b1c7f76b6ebe96a614d29441598d44347f0..b72e2d646b4890785a7ba2617b11740aa8cedc3b 100644 (file)
 # 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