summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-21 02:34:55 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-21 02:34:55 (GMT)
commitbe6da271a185bdc531fc7409d23a345d5a38681a (patch)
treec5c807f091bfadc8d9ed0d643cbd2d66b048f383
parent3d602e31b1adfbcb1d42dcc0b558b311930bc384 (diff)
downloadcpython-be6da271a185bdc531fc7409d23a345d5a38681a.zip
cpython-be6da271a185bdc531fc7409d23a345d5a38681a.tar.gz
cpython-be6da271a185bdc531fc7409d23a345d5a38681a.tar.bz2
Use INT_MAX/LONG_MAX instead of non-ANSI LONG_BIT
-rw-r--r--Modules/md5.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/md5.h b/Modules/md5.h
index 6a14df6..1ba82b3 100644
--- a/Modules/md5.h
+++ b/Modules/md5.h
@@ -48,16 +48,15 @@ typedef unsigned short int UINT2;
#ifdef HAVE_LIMITS_H
#include <limits.h>
#else
-#ifndef LONG_BIT
-#define LONG_BIT 32
-#endif
+/* Wild guess */
+#define LONG_MAX 2147483647L
#endif
/* UINT4 defines a four byte word */
-#if WORD_BIT == 32
+#if defined(INT_MAX) && INT_MAX == 2147483647
typedef unsigned int UINT4;
#else
-#if LONG_BIT == 32
+#if defined(LONG_MAX) && LONG_MAX == 2147483647L
typedef unsigned long int UINT4;
#endif
/* Too bad if neither is */