trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Add be32toh and htobe32 for macOS
Date Fri, 10 May 2019 20:53:50 GMT
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 <maskit@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


Mime
View raw message