xref: /freebsd/sys/contrib/openzfs/lib/libspl/include/sys/stdtypes.h (revision 22649d4dba730d46244fd2dff4fd174903c8379f)
1 // SPDX-License-Identifier: CDDL-1.0
2 /*
3  * This file and its contents are supplied under the terms of the
4  * Common Development and Distribution License ("CDDL"), version 1.0.
5  * You may only use this file in accordance with the terms of version
6  * 1.0 of the CDDL.
7  *
8  * A full copy of the text of the CDDL should have accompanied this
9  * source.  A copy of the CDDL is also available via the Internet at
10  * https://opensource.org/license/CDDL-1.0.
11  */
12 
13 #ifndef	__SYS_STDTYPES_H
14 #define	__SYS_STDTYPES_H
15 
16 typedef enum {
17 	B_FALSE = 0,
18 	B_TRUE = 1
19 } boolean_t;
20 
21 typedef unsigned char		uchar_t;
22 typedef unsigned short		ushort_t;
23 typedef unsigned int		uint_t;
24 typedef unsigned long		ulong_t;
25 typedef unsigned long long	u_longlong_t;
26 typedef long long		longlong_t;
27 
28 typedef longlong_t		offset_t;
29 typedef u_longlong_t		u_offset_t;
30 typedef u_longlong_t		len_t;
31 typedef longlong_t		diskaddr_t;
32 
33 typedef ulong_t			pgcnt_t;	/* number of pages */
34 typedef long			spgcnt_t;	/* signed number of pages */
35 
36 typedef short			pri_t;
37 typedef ushort_t		o_mode_t;	/* old file attribute type */
38 
39 typedef int			major_t;
40 typedef int			minor_t;
41 
42 typedef short			index_t;
43 
44 #endif	/* __SYS_STDTYPES_H */
45