svn: /php/php-src/ branches/PHP_5_3/ext/standard/crypt_sha256.c branches/PHP_5_3/ext/standard/crypt_sha512.c trunk/ext/standard/crypt_sha256.c
trunk/ext/standard/crypt_sha512.c
| From: | Pierre Joye | Date: | Wed, 09 Dec 2009 17:40:19 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/standard/crypt_sha256.c branches/PHP_5_3/ext/standard/crypt_sha512.c trunk/ext/standard/crypt_sha256.c trunk/ext/standard/crypt_sha512.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-61215@lists.php.net to get a copy of this message | ||
pajoye Wed, 09 Dec 2009 17:40:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291924
Log:
- #50334, fix build for platform without endian.h (like solaris)
Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512
prefix
Changed paths:
U php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
U php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
U php/php-src/trunk/ext/standard/crypt_sha256.c
U php/php-src/trunk/ext/standard/crypt_sha512.c
Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c 2009-12-09 16:57:03 UTC (rev 291923)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha256.c 2009-12-09 17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
/* Windows VC++ port by Pierre Joye <pierre@php.net> */
#ifndef PHP_WIN32
-# include <endian.h>
# include "php.h"
# include "php_main.h"
#endif
@@ -75,7 +74,7 @@
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
};
-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n)
>> 24))
#else
Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c 2009-12-09 16:57:03 UTC (rev 291923)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c 2009-12-09 17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
/* Windows VC++ port by Pierre Joye <pierre@php.net> */
#ifndef PHP_WIN32
-# include <endian.h>
# include "php.h"
# include "php_main.h"
#endif
@@ -66,7 +65,7 @@
};
-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
# define SWAP(n) \
(((n) << 56) \
| (((n) & 0xff00) << 40) \
Modified: php/php-src/trunk/ext/standard/crypt_sha256.c
===================================================================
--- php/php-src/trunk/ext/standard/crypt_sha256.c 2009-12-09 16:57:03 UTC (rev 291923)
+++ php/php-src/trunk/ext/standard/crypt_sha256.c 2009-12-09 17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
/* Windows VC++ port by Pierre Joye <pierre@php.net> */
#ifndef PHP_WIN32
-# include <endian.h>
# include "php.h"
# include "php_main.h"
#endif
@@ -75,7 +74,7 @@
char buffer[128]; /* NB: always correctly aligned for uint32_t. */
};
-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n)
>> 24))
#else
Modified: php/php-src/trunk/ext/standard/crypt_sha512.c
===================================================================
--- php/php-src/trunk/ext/standard/crypt_sha512.c 2009-12-09 16:57:03 UTC (rev 291923)
+++ php/php-src/trunk/ext/standard/crypt_sha512.c 2009-12-09 17:40:19 UTC (rev 291924)
@@ -3,7 +3,6 @@
/* Windows VC++ port by Pierre Joye <pierre@php.net> */
#ifndef PHP_WIN32
-# include <endian.h>
# include "php.h"
# include "php_main.h"
#endif
@@ -66,7 +65,7 @@
};
-#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
+#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
# define SWAP(n) \
(((n) << 56) \
| (((n) & 0xff00) << 40) \