1 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2 #ifndef _UAPI_LINUX_TYPES_32_64_H
3 #define _UAPI_LINUX_TYPES_32_64_H
8 * Integer type declaration for pointers across 32-bit and 64-bit systems.
10 * Copyright (c) 2015-2018 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 # include <linux/types.h>
19 #include <asm/byteorder.h>
22 # if (__BYTE_ORDER == __BIG_ENDIAN)
23 # define LINUX_BYTE_ORDER_BIG_ENDIAN
25 # define LINUX_BYTE_ORDER_LITTLE_ENDIAN
29 # define LINUX_BYTE_ORDER_BIG_ENDIAN
31 # define LINUX_BYTE_ORDER_LITTLE_ENDIAN
36 # define LINUX_FIELD_u32_u64(field) __u64 field
37 # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) field = (intptr_t)v
39 # ifdef LINUX_BYTE_ORDER_BIG_ENDIAN
40 # define LINUX_FIELD_u32_u64(field) __u32 field ## _padding, field
41 # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \
42 field ## _padding = 0, field = (intptr_t)v
44 # define LINUX_FIELD_u32_u64(field) __u32 field, field ## _padding
45 # define LINUX_FIELD_u32_u64_INIT_ONSTACK(field, v) \
46 field = (intptr_t)v, field ## _padding = 0
50 #endif /* _UAPI_LINUX_TYPES_32_64_H */