Merge tag 'drm-intel-fixes-2019-02-13' of git://anongit.freedesktop.org/drm/drm-intel...
[sfrench/cifs-2.6.git] / include / uapi / asm-generic / posix_types.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef __ASM_GENERIC_POSIX_TYPES_H
3 #define __ASM_GENERIC_POSIX_TYPES_H
4
5 #include <asm/bitsperlong.h>
6 /*
7  * This file is generally used by user-level software, so you need to
8  * be a little careful about namespace pollution etc.
9  *
10  * First the types that are often defined in different ways across
11  * architectures, so that you can override them.
12  */
13
14 #ifndef __kernel_long_t
15 typedef long            __kernel_long_t;
16 typedef unsigned long   __kernel_ulong_t;
17 #endif
18
19 #ifndef __kernel_ino_t
20 typedef __kernel_ulong_t __kernel_ino_t;
21 #endif
22
23 #ifndef __kernel_mode_t
24 typedef unsigned int    __kernel_mode_t;
25 #endif
26
27 #ifndef __kernel_pid_t
28 typedef int             __kernel_pid_t;
29 #endif
30
31 #ifndef __kernel_ipc_pid_t
32 typedef int             __kernel_ipc_pid_t;
33 #endif
34
35 #ifndef __kernel_uid_t
36 typedef unsigned int    __kernel_uid_t;
37 typedef unsigned int    __kernel_gid_t;
38 #endif
39
40 #ifndef __kernel_suseconds_t
41 typedef __kernel_long_t         __kernel_suseconds_t;
42 #endif
43
44 #ifndef __kernel_daddr_t
45 typedef int             __kernel_daddr_t;
46 #endif
47
48 #ifndef __kernel_uid32_t
49 typedef unsigned int    __kernel_uid32_t;
50 typedef unsigned int    __kernel_gid32_t;
51 #endif
52
53 #ifndef __kernel_old_uid_t
54 typedef __kernel_uid_t  __kernel_old_uid_t;
55 typedef __kernel_gid_t  __kernel_old_gid_t;
56 #endif
57
58 #ifndef __kernel_old_dev_t
59 typedef unsigned int    __kernel_old_dev_t;
60 #endif
61
62 /*
63  * Most 32 bit architectures use "unsigned int" size_t,
64  * and all 64 bit architectures use "unsigned long" size_t.
65  */
66 #ifndef __kernel_size_t
67 #if __BITS_PER_LONG != 64
68 typedef unsigned int    __kernel_size_t;
69 typedef int             __kernel_ssize_t;
70 typedef int             __kernel_ptrdiff_t;
71 #else
72 typedef __kernel_ulong_t __kernel_size_t;
73 typedef __kernel_long_t __kernel_ssize_t;
74 typedef __kernel_long_t __kernel_ptrdiff_t;
75 #endif
76 #endif
77
78 #ifndef __kernel_fsid_t
79 typedef struct {
80         int     val[2];
81 } __kernel_fsid_t;
82 #endif
83
84 /*
85  * anything below here should be completely generic
86  */
87 typedef __kernel_long_t __kernel_off_t;
88 typedef long long       __kernel_loff_t;
89 typedef __kernel_long_t __kernel_time_t;
90 typedef long long __kernel_time64_t;
91 typedef __kernel_long_t __kernel_clock_t;
92 typedef int             __kernel_timer_t;
93 typedef int             __kernel_clockid_t;
94 typedef char *          __kernel_caddr_t;
95 typedef unsigned short  __kernel_uid16_t;
96 typedef unsigned short  __kernel_gid16_t;
97
98 #endif /* __ASM_GENERIC_POSIX_TYPES_H */