From 4e08c66771017f1e181a267ace64ce68286efcef Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sun, 16 May 1999 11:55:34 +0000 Subject: [PATCH] kill another 64-bit issue. this affected at least md5 which produced wrong values on 64-bit platforms --- configure.in.in | 3 +++ ext/standard/global.h | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.in.in b/configure.in.in index 193ffd19e78..cf21ad9fe9c 100644 --- a/configure.in.in +++ b/configure.in.in @@ -243,6 +243,9 @@ else AC_DEFINE(HAVE_STRUCT_FLOCK, 0) fi +AC_CHECK_SIZEOF(long, 8) +AC_CHECK_SIZEOF(int, 4) + dnl Check for members of the stat structure AC_STRUCT_ST_BLKSIZE dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists diff --git a/ext/standard/global.h b/ext/standard/global.h index cc528d4b6b9..3b521738973 100644 --- a/ext/standard/global.h +++ b/ext/standard/global.h @@ -45,7 +45,11 @@ typedef unsigned char *_POINTER; typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ -typedef unsigned long int UINT4; +#if SIZEOF_INT == 4 +typedef unsigned int UINT4; +#elif SIZEOF_LONG == 4 +typedef unsigned long UINT4; +#endif /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it