- #50334, fix build for platform without endian.h (like solaris)

This commit is contained in:
Pierre Joye 2009-12-09 17:40:19 +00:00
parent 157f1bddf1
commit ee6d8691a3
2 changed files with 2 additions and 4 deletions

View File

@ -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 @@ struct sha256_ctx {
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

View File

@ -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 @@ struct sha512_ctx
};
#if PHP_WIN32 || (__BYTE_ORDER == __LITTLE_ENDIAN)
#if PHP_WIN32 || (!defined(WORDS_BIGENDIAN))
# define SWAP(n) \
(((n) << 56) \
| (((n) & 0xff00) << 40) \