mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
synced 2024-11-23 17:53:39 +08:00
Move the be32_to_cpu() definition
Move the be32_to_cpu() definition next to the little endian conversion functions. This patch improves portability since the MinGW ntohl() function exists in another library than the C library. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
1612bf99de
commit
cdefef0d07
@ -197,8 +197,6 @@ struct quotafile_ops {
|
||||
#define __force
|
||||
#endif
|
||||
|
||||
#define be32_to_cpu(n) ntohl(n)
|
||||
|
||||
/* Open existing quotafile of given type (and verify its format) on given
|
||||
* filesystem. */
|
||||
errcode_t quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
|
||||
|
@ -194,6 +194,7 @@ static inline uint64_t bswap_64(uint64_t val)
|
||||
#define cpu_to_le16(x) ((uint16_t)(x))
|
||||
#define cpu_to_le32(x) ((uint32_t)(x))
|
||||
#define cpu_to_le64(x) ((uint64_t)(x))
|
||||
#define be32_to_cpu(x) __builtin_bswap64(x)
|
||||
#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
#define le16_to_cpu(x) bswap_16(x)
|
||||
#define le32_to_cpu(x) bswap_32(x)
|
||||
@ -201,6 +202,7 @@ static inline uint64_t bswap_64(uint64_t val)
|
||||
#define cpu_to_le16(x) bswap_16(x)
|
||||
#define cpu_to_le32(x) bswap_32(x)
|
||||
#define cpu_to_le64(x) bswap_64(x)
|
||||
#define be32_to_cpu(x) ((uint64_t)(x))
|
||||
#endif
|
||||
|
||||
#define typecheck(type,x) \
|
||||
|
Loading…
Reference in New Issue
Block a user