| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. |
| 4 */ |
| 5 |
| 1 #ifndef VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ | 6 #ifndef VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ |
| 2 #define VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ | 7 #define VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ |
| 3 | 8 |
| 4 // Newer distros already have this. For those that don't, we add it here. | 9 // Newer distros already have this. For those that don't, we add it here. |
| 5 #include <endian.h> | 10 #include <endian.h> |
| 6 | 11 |
| 7 #ifndef le16toh | 12 #ifndef le16toh |
| 8 | 13 |
| 9 # include <byteswap.h> | 14 # include <byteswap.h> |
| 10 | 15 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 # define le32toh(x) __bswap_32 (x) | 40 # define le32toh(x) __bswap_32 (x) |
| 36 | 41 |
| 37 # define htobe64(x) (x) | 42 # define htobe64(x) (x) |
| 38 # define htole64(x) __bswap_64 (x) | 43 # define htole64(x) __bswap_64 (x) |
| 39 # define be64toh(x) (x) | 44 # define be64toh(x) (x) |
| 40 # define le64toh(x) __bswap_64 (x) | 45 # define le64toh(x) __bswap_64 (x) |
| 41 # endif | 46 # endif |
| 42 | 47 |
| 43 #endif | 48 #endif |
| 44 #endif // VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ | 49 #endif // VBOOT_REFERENCE_UTILITY_CGPT_ENDIAN_H_ |
| OLD | NEW |