hadoop_endian.h.cmake 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. /* Hadoop versions of http://austingroupbugs.net/view.php?id=162#c665 */
  19. #ifndef HADOOP_ENDIAN_H
  20. #define HADOOP_ENDIAN_H
  21. #include <@HADOOP_ENDIAN_H@>
  22. #define HADOOP_LITTLE_ENDIAN 1234
  23. #define HADOOP_BIG_ENDIAN 4321
  24. #cmakedefine HADOOP_BYTE_ORDER @HADOOP_BYTE_ORDER@
  25. #define hadoop_htobe16(X) @HADOOP_HTOBE16@(X)
  26. #define hadoop_htole16(X) @HADOOP_HTOLE16@(X)
  27. #define hadoop_be16toh(X) @HADOOP_BE16TOH@(X)
  28. #define hadoop_le16toh(X) @HADOOP_LE16TOH@(X)
  29. #define hadoop_htobe32(X) @HADOOP_HTOBE32@(X)
  30. #define hadoop_htole32(X) @HADOOP_HTOLE32@(X)
  31. #define hadoop_be32toh(X) @HADOOP_BE32TOH@(X)
  32. #define hadoop_le32toh(X) @HADOOP_LE32TOH@(X)
  33. #define hadoop_htobe64(X) @HADOOP_HTOBE64@(X)
  34. #define hadoop_htole64(X) @HADOOP_HTOLE64@(X)
  35. #define hadoop_be64toh(X) @HADOOP_BE64TOH@(X)
  36. #define hadoop_le64toh(X) @HADOOP_LE64TOH@(X)
  37. #endif