]> granicus.if.org Git - php/commitdiff
- #50334, add sha support for VC6 too, not merged in trunk as we don't support vc6...
authorPierre Joye <pajoye@php.net>
Fri, 11 Dec 2009 16:07:57 +0000 (16:07 +0000)
committerPierre Joye <pajoye@php.net>
Fri, 11 Dec 2009 16:07:57 +0000 (16:07 +0000)
ext/standard/crypt_sha256.c
ext/standard/crypt_sha512.c

index 7f93e582d91faed16c799193afb3f787726b69ff..7e632de9f7bf61f89c566734d3860cf519855c5c 100644 (file)
@@ -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))));
index 67244ef54bc9a7bc26d92e97c08063e71316b130..f339dbb8103e0f91c1ccd0d31874d01aa09d0f0f 100644 (file)
@@ -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))));