From: Pierre Joye Date: Fri, 11 Dec 2009 16:07:57 +0000 (+0000) Subject: - #50334, add sha support for VC6 too, not merged in trunk as we don't support vc6... X-Git-Tag: php-5.3.2RC1~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2cf15fcc6d27f6f4113cb4f08121241877d28ba;p=php - #50334, add sha support for VC6 too, not merged in trunk as we don't support vc6 there --- diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index 7f93e582d9..7e632de9f7 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -336,8 +336,15 @@ static const char b64t[64] = char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { #ifdef PHP_WIN32 +# if _MSC <= 1300 +# pragma pack(push, 16) + unsigned char alt_result[32]; + unsigned char temp_result[32]; +# pragma pack(pop) +# else __declspec(align(32)) unsigned char alt_result[32]; __declspec(align(32)) unsigned char temp_result[32]; +# endif #else unsigned char alt_result[32] __attribute__ ((__aligned__ (__alignof__ (uint32_t)))); diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index 67244ef54b..f339dbb810 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -364,8 +364,15 @@ static const char b64t[64] = char * php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { #ifdef PHP_WIN32 +# if _MSC <= 1300 +# pragma pack(push, 16) + unsigned char alt_result[64]; + unsigned char temp_result[64]; +# pragma pack(pop) +# else __declspec(align(64)) unsigned char alt_result[64]; __declspec(align(64)) unsigned char temp_result[64]; +# endif #else unsigned char alt_result[64] __attribute__ ((__aligned__ (__alignof__ (uint64_t))));