]> granicus.if.org Git - php/commitdiff
One last 64bit change, skip all this long long malarkey when we're on 64bit procs
authorSara Golemon <pollita@php.net>
Fri, 18 Nov 2005 21:37:19 +0000 (21:37 +0000)
committerSara Golemon <pollita@php.net>
Fri, 18 Nov 2005 21:37:19 +0000 (21:37 +0000)
ext/hash/hash_sha.c
ext/hash/php_hash_sha.h

index 4bb4486d89b785a2d223cb80fe528b975968f164..ba8cfb3ffe15dae2d98c2071cb5283b1d77f3a58 100644 (file)
 #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] =
index 020467506cd9cd0547e64033ca39c29bfe2439d7..7ff2094125c84bf766b1c43fedf45a6fa1e874bd 100644 (file)
@@ -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 */