1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Based on linux/include/asm-arm/posix_types.h
4 *
5 *  Copyright (C) 1996-1998 Russell King.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 *  Changelog:
12 *   27-06-1996	RMK	Created
13 */
14#ifndef __ARCH_SANDBOX_POSIX_TYPES_H
15#define __ARCH_SANDBOX_POSIX_TYPES_H
16
17/*
18 * This file is generally used by user-level software, so you need to
19 * be a little careful about namespace pollution etc.  Also, we cannot
20 * assume GCC is being used.
21 */
22
23typedef unsigned short		__kernel_dev_t;
24typedef unsigned long		__kernel_ino_t;
25typedef unsigned short		__kernel_mode_t;
26typedef unsigned short		__kernel_nlink_t;
27typedef long			__kernel_off_t;
28typedef int			__kernel_pid_t;
29typedef unsigned short		__kernel_ipc_pid_t;
30typedef unsigned short		__kernel_uid_t;
31typedef unsigned short		__kernel_gid_t;
32#if CONFIG_SANDBOX_BITS_PER_LONG == 32
33typedef unsigned int		__kernel_size_t;
34typedef int			__kernel_ssize_t;
35typedef int			__kernel_ptrdiff_t;
36#else
37typedef unsigned long		__kernel_size_t;
38typedef long			__kernel_ssize_t;
39typedef long			__kernel_ptrdiff_t;
40#endif
41typedef long			__kernel_time_t;
42typedef long			__kernel_suseconds_t;
43typedef long			__kernel_clock_t;
44typedef int			__kernel_daddr_t;
45typedef char			*__kernel_caddr_t;
46typedef unsigned short		__kernel_uid16_t;
47typedef unsigned short		__kernel_gid16_t;
48typedef unsigned int		__kernel_uid32_t;
49typedef unsigned int		__kernel_gid32_t;
50
51typedef unsigned short		__kernel_old_uid_t;
52typedef unsigned short		__kernel_old_gid_t;
53
54#ifdef __GNUC__
55typedef long long		__kernel_loff_t;
56#endif
57
58#endif
59