summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Duxbury <bryanduxbury@apache.org>2010-08-16 17:08:03 +0000
committerBryan Duxbury <bryanduxbury@apache.org>2010-08-16 17:08:03 +0000
commit0c4f88a9533ac99d8101fb97f9b22f0d5c22cb9a (patch)
tree717eb4d6936af51678cfbb40f66ce457e0169618
parent48fa172d34b2e389b4316301bf67198b2ac715e9 (diff)
downloadthrift-0c4f88a9533ac99d8101fb97f9b22f0d5c22cb9a.tar.gz
revert THRIFT-682, since it doesn't build anywhere, apparently.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/branches/0.4.x@986051 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
index 193669bba..641fff2e6 100644
--- a/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
+++ b/lib/php/src/ext/thrift_protocol/php_thrift_protocol.cpp
@@ -24,23 +24,10 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <unistd.h>
-#include <machine/endian.h>
-#include <machine/byte_order.h>
+#include <endian.h>
+#include <byteswap.h>
#include <stdexcept>
-#ifndef _BYTESWAP_H
-#define _BYTESWAP_H
-
-#define bswap_64(x) (((uint64_t)(x) << 56) | \
- (((uint64_t)(x) << 40) & 0xff000000000000ULL) | \
- (((uint64_t)(x) << 24) & 0xff0000000000ULL) | \
- (((uint64_t)(x) << 8) & 0xff00000000ULL) | \
- (((uint64_t)(x) >> 8) & 0xff000000ULL) | \
- (((uint64_t)(x) >> 24) & 0xff0000ULL) | \
- (((uint64_t)(x) >> 40) & 0xff00ULL) | \
- ((uint64_t)(x) >> 56))
-#endif
-
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htonll(x) bswap_64(x)
#define ntohll(x) bswap_64(x)