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 <pie...@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 <pie...@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 <pie...@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 <pie...@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)                    \

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to