forked from Minki/linux
1a33b18b3b
Parts of linux/compat.h are under an #ifdef, but we end up using more of those over time, moving things around bit by bit. To get it over with once and for all, make all of this file uncondititonal now so it can be accessed everywhere. There are only a few types left that are in asm/compat.h but not yet in the asm-generic version, so add those in the process. This requires providing a few more types in asm-generic/compat.h that were not already there. The only tricky one is compat_sigset_t, which needs a little help on 32-bit architectures and for x86. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_GENERIC_COMPAT_H
|
|
#define __ASM_GENERIC_COMPAT_H
|
|
|
|
/* These types are common across all compat ABIs */
|
|
typedef u32 compat_size_t;
|
|
typedef s32 compat_ssize_t;
|
|
typedef s32 compat_clock_t;
|
|
typedef s32 compat_pid_t;
|
|
typedef u32 compat_ino_t;
|
|
typedef s32 compat_off_t;
|
|
typedef s64 compat_loff_t;
|
|
typedef s32 compat_daddr_t;
|
|
typedef s32 compat_timer_t;
|
|
typedef s32 compat_key_t;
|
|
typedef s16 compat_short_t;
|
|
typedef s32 compat_int_t;
|
|
typedef s32 compat_long_t;
|
|
typedef u16 compat_ushort_t;
|
|
typedef u32 compat_uint_t;
|
|
typedef u32 compat_ulong_t;
|
|
typedef u32 compat_uptr_t;
|
|
typedef u32 compat_caddr_t;
|
|
typedef u32 compat_aio_context_t;
|
|
typedef u32 compat_old_sigset_t;
|
|
|
|
#ifndef __compat_uid32_t
|
|
typedef u32 __compat_uid32_t;
|
|
typedef u32 __compat_gid32_t;
|
|
#endif
|
|
|
|
#ifndef compat_mode_t
|
|
typedef u32 compat_mode_t;
|
|
#endif
|
|
|
|
#ifdef CONFIG_COMPAT_FOR_U64_ALIGNMENT
|
|
typedef s64 __attribute__((aligned(4))) compat_s64;
|
|
typedef u64 __attribute__((aligned(4))) compat_u64;
|
|
#else
|
|
typedef s64 compat_s64;
|
|
typedef u64 compat_u64;
|
|
#endif
|
|
|
|
#ifndef _COMPAT_NSIG
|
|
typedef u32 compat_sigset_word;
|
|
#define _COMPAT_NSIG _NSIG
|
|
#define _COMPAT_NSIG_BPW 32
|
|
#endif
|
|
|
|
#endif
|