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 2020/05/27 18:14:35 UTC
[trafficserver] branch master updated: Add le32toh and htole32 for
macOS (#6807)
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 44091f0 Add le32toh and htole32 for macOS (#6807)
44091f0 is described below
commit 44091f00e80a620d8763e09d8dfc6031aa79748a
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Thu May 28 03:14:24 2020 +0900
Add le32toh and htole32 for macOS (#6807)
---
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 c973fae..539c835 100644
--- a/include/tscore/ink_endian.h
+++ b/include/tscore/ink_endian.h
@@ -60,4 +60,14 @@ htobe32(uint32_t x)
{
return OSSwapHostToBigInt32(x);
}
+inline uint32_t
+le32toh(uint32_t x)
+{
+ return OSSwapLittleToHostInt32(x);
+}
+inline uint32_t
+htole32(uint32_t x)
+{
+ return OSSwapHostToLittleInt32(x);
+}
#endif