4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _LIBSPL_SYS_TYPES_H
28 #define _LIBSPL_SYS_TYPES_H
30 #include <sys/isa_defs.h>
31 #include <sys/feature_tests.h>
32 #include_next <sys/types.h>
33 #include <sys/param.h> /* for NBBY */
34 #include <sys/types32.h>
35 #include <sys/va_list.h>
40 typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
42 typedef unsigned char uchar_t;
43 typedef unsigned short ushort_t;
44 typedef unsigned int uint_t;
45 typedef unsigned long ulong_t;
47 typedef long long longlong_t;
48 typedef unsigned long long u_longlong_t;
49 #endif /* HAVE_INTTYPES */
51 typedef longlong_t offset_t;
52 typedef u_longlong_t u_offset_t;
53 typedef u_longlong_t len_t;
54 typedef longlong_t diskaddr_t;
56 typedef ulong_t pfn_t; /* page frame number */
57 typedef ulong_t pgcnt_t; /* number of pages */
58 typedef long spgcnt_t; /* signed number of pages */
60 typedef longlong_t hrtime_t;
61 typedef struct timespec timestruc_t;
62 typedef struct timespec timespec_t;
72 typedef ushort_t o_mode_t; /* old file attribute type */
75 * Definitions remaining from previous partial support for 64-bit file
76 * offsets. This partial support for devices greater than 2gb requires
77 * compiler support for long long.
79 #ifdef _LONG_LONG_LTOH
81 offset_t _f; /* Full 64 bit offset value */
83 int32_t _l; /* lower 32 bits of offset value */
84 int32_t _u; /* upper 32 bits of offset value */
89 #ifdef _LONG_LONG_HTOL
91 offset_t _f; /* Full 64 bit offset value */
93 int32_t _u; /* upper 32 bits of offset value */
94 int32_t _l; /* lower 32 bits of offset value */