You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/05/10 20:53:50 UTC
[trafficserver] branch master updated: Add be32toh and htobe32 for
macOS
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 8104f10 Add be32toh and htobe32 for macOS
8104f10 is described below
commit 8104f10ab1182b8dd8acc992485ff09b45a467b9
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Fri May 10 17:38:58 2019 +0900
Add be32toh and htobe32 for macOS
---
include/tscore/ink_endian.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/tscore/ink_endian.h b/include/tscore/ink_endian.h
index cee79d4..866518b 100644
--- a/include/tscore/ink_endian.h
+++ b/include/tscore/ink_endian.h
@@ -48,4 +48,14 @@ htobe64(uint64_t x)
{
return OSSwapHostToBigInt64(x);
}
+inline uint32_t
+be32toh(uint32_t x)
+{
+ return OSSwapBigToHostInt32(x);
+}
+inline uint32_t
+htobe32(uint32_t x)
+{
+ return OSSwapHostToBigInt32(x);
+}
#endif