summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-12-11 16:07:57 +0000
committerPierre Joye <pajoye@php.net>2009-12-11 16:07:57 +0000
commita2cf15fcc6d27f6f4113cb4f08121241877d28ba (patch)
tree8ac308882e37ecb338ea12e04b6cd618e338d478
parent560ed89bfbb56526251e9bd2fbcb27e5932641d8 (diff)
downloadphp-git-a2cf15fcc6d27f6f4113cb4f08121241877d28ba.tar.gz
- #50334, add sha support for VC6 too, not merged in trunk as we don't support vc6 there
-rw-r--r--ext/standard/crypt_sha256.c7
-rw-r--r--ext/standard/crypt_sha512.c7
2 files changed, 14 insertions, 0 deletions
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))));