1168404Spjd/*- 2168404Spjd * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3168404Spjd * All rights reserved. 4168404Spjd * 5168404Spjd * Redistribution and use in source and binary forms, with or without 6168404Spjd * modification, are permitted provided that the following conditions 7168404Spjd * are met: 8168404Spjd * 1. Redistributions of source code must retain the above copyright 9168404Spjd * notice, this list of conditions and the following disclaimer. 10168404Spjd * 2. Redistributions in binary form must reproduce the above copyright 11168404Spjd * notice, this list of conditions and the following disclaimer in the 12168404Spjd * documentation and/or other materials provided with the distribution. 13168404Spjd * 14168404Spjd * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 15168404Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16168404Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17168404Spjd * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 18168404Spjd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19168404Spjd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20168404Spjd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21168404Spjd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22168404Spjd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23168404Spjd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24168404Spjd * SUCH DAMAGE. 25168404Spjd * 26168404Spjd * $FreeBSD$ 27168404Spjd */ 28168404Spjd 29168404Spjd#ifndef _OPENSOLARIS_SYS_TYPES_H_ 30168404Spjd#define _OPENSOLARIS_SYS_TYPES_H_ 31168404Spjd 32168404Spjd/* 33168404Spjd * This is a bag of dirty hacks to keep things compiling. 34168404Spjd */ 35168404Spjd 36168404Spjd#include <sys/stdint.h> 37218180Smm 38218180Smm#ifdef _KERNEL 39218180Smmtypedef int64_t clock_t; 40218180Smm#define _CLOCK_T_DECLARED 41218180Smm#endif 42218180Smm 43168404Spjd#include_next <sys/types.h> 44168404Spjd 45168404Spjd#define MAXNAMELEN 256 46168404Spjd 47168404Spjdtypedef struct timespec timestruc_t; 48219089Spjdtypedef struct timespec timespec_t; 49174040Sjbtypedef u_int uint_t; 50174040Sjbtypedef u_char uchar_t; 51174040Sjbtypedef u_short ushort_t; 52174040Sjbtypedef u_long ulong_t; 53174040Sjbtypedef long long longlong_t; 54185029Spjdtypedef unsigned long long u_longlong_t; 55174040Sjbtypedef off_t off64_t; 56174040Sjbtypedef id_t taskid_t; 57174040Sjbtypedef id_t projid_t; 58174040Sjbtypedef id_t poolid_t; 59174040Sjbtypedef id_t zoneid_t; 60174040Sjbtypedef id_t ctid_t; 61185029Spjdtypedef mode_t o_mode_t; 62185029Spjdtypedef uint64_t pgcnt_t; 63219089Spjdtypedef u_int minor_t; 64168404Spjd 65168404Spjd#ifdef _KERNEL 66168404Spjd 67168404Spjd#define B_FALSE 0 68168404Spjd#define B_TRUE 1 69168404Spjd 70168404Spjdtypedef short index_t; 71168404Spjdtypedef off_t offset_t; 72168404Spjdtypedef long ptrdiff_t; /* pointer difference */ 73168962Spjdtypedef int64_t rlim64_t; 74185029Spjdtypedef int major_t; 75168404Spjd 76168404Spjd#else 77184698Srodrigc#ifdef NEED_SOLARIS_BOOLEAN 78174040Sjb#if defined(__XOPEN_OR_POSIX) 79174040Sjbtypedef enum { _B_FALSE, _B_TRUE } boolean_t; 80174040Sjb#else 81174040Sjbtypedef enum { B_FALSE, B_TRUE } boolean_t; 82174040Sjb#endif /* defined(__XOPEN_OR_POSIX) */ 83184698Srodrigc#endif 84174040Sjb 85168404Spjdtypedef longlong_t offset_t; 86168404Spjdtypedef u_longlong_t u_offset_t; 87168404Spjdtypedef uint64_t upad64_t; 88168404Spjdtypedef short pri_t; 89168404Spjdtypedef int32_t daddr32_t; 90168404Spjdtypedef int32_t time32_t; 91168404Spjdtypedef u_longlong_t diskaddr_t; 92168404Spjd 93168404Spjd#endif /* !_KERNEL */ 94168404Spjd 95168404Spjd#endif /* !_OPENSOLARIS_SYS_TYPES_H_ */ 96