_types.h revision 142087
1284285Sjkim/*- 2160819Ssimon * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> 3160819Ssimon * Copyright (c) 1990, 1993 4160819Ssimon * The Regents of the University of California. All rights reserved. 5160819Ssimon * 6160819Ssimon * Redistribution and use in source and binary forms, with or without 7160819Ssimon * modification, are permitted provided that the following conditions 8160819Ssimon * are met: 9160819Ssimon * 1. Redistributions of source code must retain the above copyright 10160819Ssimon * notice, this list of conditions and the following disclaimer. 11160819Ssimon * 2. Redistributions in binary form must reproduce the above copyright 12160819Ssimon * notice, this list of conditions and the following disclaimer in the 13160819Ssimon * documentation and/or other materials provided with the distribution. 14160819Ssimon * 3. All advertising materials mentioning features or use of this software 15160819Ssimon * must display the following acknowledgement: 16160819Ssimon * This product includes software developed by the University of 17160819Ssimon * California, Berkeley and its contributors. 18160819Ssimon * 4. Neither the name of the University nor the names of its contributors 19160819Ssimon * may be used to endorse or promote products derived from this software 20215698Ssimon * without specific prior written permission. 21215698Ssimon * 22215698Ssimon * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23215698Ssimon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24215698Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25160819Ssimon * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26160819Ssimon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27160819Ssimon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28160819Ssimon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29160819Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30160819Ssimon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31160819Ssimon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32160819Ssimon * SUCH DAMAGE. 33160819Ssimon * 34160819Ssimon * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 35160819Ssimon * From: @(#)types.h 8.3 (Berkeley) 1/5/94 36160819Ssimon * $FreeBSD: head/sys/i386/include/_types.h 142087 2005-02-19 13:46:40Z marius $ 37160819Ssimon */ 38160819Ssimon 39160819Ssimon#ifndef _MACHINE__TYPES_H_ 40160819Ssimon#define _MACHINE__TYPES_H_ 41276864Sjkim 42276864Sjkim/* 43160819Ssimon * Basic types upon which most other types are built. 44160819Ssimon */ 45215698Ssimontypedef __signed char __int8_t; 46215698Ssimontypedef unsigned char __uint8_t; 47215698Ssimontypedef short __int16_t; 48215698Ssimontypedef unsigned short __uint16_t; 49160819Ssimontypedef int __int32_t; 50215698Ssimontypedef unsigned int __uint32_t; 51160819Ssimon 52160819Ssimon#if defined(lint) 53276864Sjkim/* LONGLONG */ 54276864Sjkimtypedef long long __int64_t; 55276864Sjkim/* LONGLONG */ 56160819Ssimontypedef unsigned long long __uint64_t; 57276864Sjkim#elif defined(__GNUC__) || defined(__INTEL_COMPILER) 58276864Sjkimtypedef int __attribute__((__mode__(__DI__))) __int64_t; 59276864Sjkimtypedef unsigned int __attribute__((__mode__(__DI__))) __uint64_t; 60276864Sjkim#else 61276864Sjkim/* LONGLONG */ 62276864Sjkimtypedef long long __int64_t; 63215698Ssimon/* LONGLONG */ 64276864Sjkimtypedef unsigned long long __uint64_t; 65276864Sjkim#endif 66276864Sjkim 67276864Sjkim/* 68276864Sjkim * Standard type definitions. 69215698Ssimon */ 70276864Sjkimtypedef unsigned long __clock_t; /* clock()... */ 71160819Ssimontypedef unsigned int __cpumask_t; 72160819Ssimontypedef __int32_t __critical_t; 73160819Ssimontypedef double __double_t; 74160819Ssimontypedef double __float_t; 75160819Ssimontypedef __int32_t __intfptr_t; 76160819Ssimontypedef __int64_t __intmax_t; 77160819Ssimontypedef __int32_t __intptr_t; 78160819Ssimontypedef __int32_t __int_fast8_t; 79160819Ssimontypedef __int32_t __int_fast16_t; 80160819Ssimontypedef __int32_t __int_fast32_t; 81160819Ssimontypedef __int64_t __int_fast64_t; 82160819Ssimontypedef __int8_t __int_least8_t; 83160819Ssimontypedef __int16_t __int_least16_t; 84160819Ssimontypedef __int32_t __int_least32_t; 85160819Ssimontypedef __int64_t __int_least64_t; 86160819Ssimontypedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ 87160819Ssimontypedef __int32_t __register_t; 88160819Ssimontypedef __int32_t __segsz_t; /* segment size (in pages) */ 89160819Ssimontypedef __uint32_t __size_t; /* sizeof() */ 90160819Ssimontypedef __int32_t __ssize_t; /* byte count or error */ 91160819Ssimontypedef __int32_t __time_t; /* time()... */ 92160819Ssimontypedef __uint32_t __uintfptr_t; 93160819Ssimontypedef __uint64_t __uintmax_t; 94160819Ssimontypedef __uint32_t __uintptr_t; 95160819Ssimontypedef __uint32_t __uint_fast8_t; 96160819Ssimontypedef __uint32_t __uint_fast16_t; 97160819Ssimontypedef __uint32_t __uint_fast32_t; 98160819Ssimontypedef __uint64_t __uint_fast64_t; 99160819Ssimontypedef __uint8_t __uint_least8_t; 100160819Ssimontypedef __uint16_t __uint_least16_t; 101160819Ssimontypedef __uint32_t __uint_least32_t; 102160819Ssimontypedef __uint64_t __uint_least64_t; 103160819Ssimontypedef __uint32_t __u_register_t; 104160819Ssimontypedef __uint32_t __vm_offset_t; 105160819Ssimontypedef __int64_t __vm_ooffset_t; 106160819Ssimon#ifdef PAE 107160819Ssimontypedef __uint64_t __vm_paddr_t; 108160819Ssimon#else 109160819Ssimontypedef __uint32_t __vm_paddr_t; 110160819Ssimon#endif 111160819Ssimontypedef __uint64_t __vm_pindex_t; 112160819Ssimontypedef __uint32_t __vm_size_t; 113160819Ssimon 114160819Ssimon/* 115160819Ssimon * Unusual type definitions. 116160819Ssimon */ 117160819Ssimon#if (defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER)) 118160819Ssimontypedef __builtin_va_list __va_list; /* internally known to gcc */ 119160819Ssimon#else 120160819Ssimontypedef char * __va_list; 121160819Ssimon#endif /* ! (__GNUC__ post 2.95 || __INTEL_COMPILER) */ 122160819Ssimon#if defined(__GNUC__) && !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) 123160819Ssimon#define __GNUC_VA_LIST 124160819Ssimontypedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ 125160819Ssimon#endif 126160819Ssimon 127160819Ssimon#endif /* !_MACHINE__TYPES_H_ */ 128160819Ssimon