/*-
* Copyright (c) 1982, 1986, 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
* $FreeBSD$
*/
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
/* Machine type dependent parameters. */
#include <sys/_pthreadtypes.h>
#if __BSD_VISIBLE
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
#ifndef _KERNEL
#endif
#endif
/*
*/
#ifndef _BLKSIZE_T_DECLARED
#define _BLKSIZE_T_DECLARED
#endif
#ifndef _BLKCNT_T_DECLARED
#define _BLKCNT_T_DECLARED
#endif
#ifndef _CLOCK_T_DECLARED
#define _CLOCK_T_DECLARED
#endif
#ifndef _CLOCKID_T_DECLARED
#define _CLOCKID_T_DECLARED
#endif
#ifndef _DEV_T_DECLARED
#define _DEV_T_DECLARED
#endif
#ifndef _FFLAGS_T_DECLARED
#define _FFLAGS_T_DECLARED
#endif
#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
#define _FSBLKCNT_T_DECLARED
#endif
#ifndef _GID_T_DECLARED
#define _GID_T_DECLARED
#endif
#ifndef _IN_ADDR_T_DECLARED
#define _IN_ADDR_T_DECLARED
#endif
#ifndef _IN_PORT_T_DECLARED
#define _IN_PORT_T_DECLARED
#endif
#ifndef _ID_T_DECLARED
#define _ID_T_DECLARED
#endif
#ifndef _INO_T_DECLARED
#define _INO_T_DECLARED
#endif
#ifndef _KEY_T_DECLARED
#define _KEY_T_DECLARED
#endif
#ifndef _LWPID_T_DECLARED
#define _LWPID_T_DECLARED
#endif
#ifndef _MODE_T_DECLARED
#define _MODE_T_DECLARED
#endif
#ifndef _ACCMODE_T_DECLARED
#define _ACCMODE_T_DECLARED
#endif
#ifndef _NLINK_T_DECLARED
#define _NLINK_T_DECLARED
#endif
#ifndef _OFF_T_DECLARED
#define _OFF_T_DECLARED
#endif
#ifndef _PID_T_DECLARED
#define _PID_T_DECLARED
#endif
#ifndef _RLIM_T_DECLARED
#define _RLIM_T_DECLARED
#endif
#ifndef _SIZE_T_DECLARED
#define _SIZE_T_DECLARED
#endif
#ifndef _SSIZE_T_DECLARED
#define _SSIZE_T_DECLARED
#endif
#ifndef _SUSECONDS_T_DECLARED
#define _SUSECONDS_T_DECLARED
#endif
#ifndef _TIME_T_DECLARED
#define _TIME_T_DECLARED
#endif
#ifndef _TIMER_T_DECLARED
#define _TIMER_T_DECLARED
#endif
#ifndef _MQD_T_DECLARED
#define _MQD_T_DECLARED
#endif
#ifndef _UID_T_DECLARED
#define _UID_T_DECLARED
#endif
#ifndef _USECONDS_T_DECLARED
#define _USECONDS_T_DECLARED
#endif
#ifndef _CAP_IOCTL_T_DECLARED
#define _CAP_IOCTL_T_DECLARED
typedef unsigned long cap_ioctl_t;
#endif
#ifndef _CAP_RIGHTS_T_DECLARED
#define _CAP_RIGHTS_T_DECLARED
struct cap_rights;
#endif
#ifdef _KERNEL
typedef int boolean_t;
/*
* XXX this is fixed width for historical reasons. It should have had type
* __int_fast32_t. Fixed-width types should not be used unless binary
* compatibility is essential. Least-width types should be used even less
* since they provide smaller benefits.
*
* XXX should be MD.
*
* XXX this is bogus in -current, but still used for spl*().
*/
#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus)
#define false 0
#define true 1
typedef int _Bool;
#endif
typedef _Bool bool;
#endif /* !__bool_true_false_are_defined && !__cplusplus */
#endif /* !_KERNEL */
/*
* The following are all things that really shouldn't exist in this header,
* since its purpose is to provide typedefs, not miscellaneous doodads.
*/
#ifdef __POPCNT__
#else
/*
* Population count algorithm using SWAR approach
* - "SIMD Within A Register".
*/
static __inline __uint16_t
{
return (_x);
}
static __inline __uint32_t
{
return (_x);
}
#ifdef __LP64__
static __inline __uint64_t
{
return (_x);
}
#else
static __inline __uint64_t
{
}
#endif
#endif
#if __BSD_VISIBLE
/*
* minor() gives a cookie instead of an index since we don't want to
* change the meanings of bits 0-15 or waste time and space shifting
* bits 16-31 for devices that don't use them.
*/
/*
* These declarations belong elsewhere, but are repeated here and in
* <stdio.h> to give broken programs a better chance of working with
* 64-bit off_t's.
*/
#ifndef _KERNEL
#ifndef _FTRUNCATE_DECLARED
#define _FTRUNCATE_DECLARED
#endif
#ifndef _LSEEK_DECLARED
#define _LSEEK_DECLARED
#endif
#ifndef _MMAP_DECLARED
#define _MMAP_DECLARED
#endif
#ifndef _TRUNCATE_DECLARED
#define _TRUNCATE_DECLARED
#endif
#endif /* !_KERNEL */
#endif /* __BSD_VISIBLE */
#endif /* !_SYS_TYPES_H_ */