From: Sara Golemon Date: Fri, 18 Nov 2005 21:37:19 +0000 (+0000) Subject: One last 64bit change, skip all this long long malarkey when we're on 64bit procs X-Git-Tag: RELEASE_2_0_2~171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0f5787e20e888add5d813cd33cdc26db9c3b30e;p=php One last 64bit change, skip all this long long malarkey when we're on 64bit procs --- diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c index 4bb4486d89..ba8cfb3ffe 100644 --- a/ext/hash/hash_sha.c +++ b/ext/hash/hash_sha.c @@ -22,10 +22,14 @@ #include "php_hash.h" #include "php_hash_sha.h" -#ifdef PHP_WIN32 -#define L64(n) (n##i64) +#if defined(SIZEOF_LONG) && SIZEOF_LONG >= 8 +#define L64(n) (n) #else +# ifdef PHP_WIN32 +#define L64(n) (n##i64) +# else #define L64(n) (n##LL) +# endif #endif static unsigned char PADDING[128] = diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h index 020467506c..7ff2094125 100644 --- a/ext/hash/php_hash_sha.h +++ b/ext/hash/php_hash_sha.h @@ -61,10 +61,14 @@ PHP_HASH_API void PHP_SHA256Init(PHP_SHA256_CTX *); PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, unsigned int); PHP_HASH_API void PHP_SHA256Final(unsigned char[32], PHP_SHA256_CTX *); -#ifdef PHP_WIN32 -typedef unsigned __int64 php_hash_uint64; +#if defined(SIZEOF_LONG) && SIZEOF_LONG >= 8 +typedef unsigned long php_hash_uint64; #else +# ifdef PHP_WIN32 +typedef unsigned __int64 php_hash_uint64; +# else typedef unsigned long long php_hash_uint64; +# endif #endif /* SHA384 context */