1*199767f8SToomas Soome /*- 2*199767f8SToomas Soome * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> 3*199767f8SToomas Soome * Copyright (c) 1990, 1993 4*199767f8SToomas Soome * The Regents of the University of California. All rights reserved. 5*199767f8SToomas Soome * 6*199767f8SToomas Soome * Redistribution and use in source and binary forms, with or without 7*199767f8SToomas Soome * modification, are permitted provided that the following conditions 8*199767f8SToomas Soome * are met: 9*199767f8SToomas Soome * 1. Redistributions of source code must retain the above copyright 10*199767f8SToomas Soome * notice, this list of conditions and the following disclaimer. 11*199767f8SToomas Soome * 2. Redistributions in binary form must reproduce the above copyright 12*199767f8SToomas Soome * notice, this list of conditions and the following disclaimer in the 13*199767f8SToomas Soome * documentation and/or other materials provided with the distribution. 14*199767f8SToomas Soome * 3. All advertising materials mentioning features or use of this software 15*199767f8SToomas Soome * must display the following acknowledgement: 16*199767f8SToomas Soome * This product includes software developed by the University of 17*199767f8SToomas Soome * California, Berkeley and its contributors. 18*199767f8SToomas Soome * 4. Neither the name of the University nor the names of its contributors 19*199767f8SToomas Soome * may be used to endorse or promote products derived from this software 20*199767f8SToomas Soome * without specific prior written permission. 21*199767f8SToomas Soome * 22*199767f8SToomas Soome * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*199767f8SToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*199767f8SToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*199767f8SToomas Soome * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*199767f8SToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*199767f8SToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*199767f8SToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*199767f8SToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*199767f8SToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*199767f8SToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*199767f8SToomas Soome * SUCH DAMAGE. 33*199767f8SToomas Soome * 34*199767f8SToomas Soome * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 35*199767f8SToomas Soome * From: @(#)types.h 8.3 (Berkeley) 1/5/94 36*199767f8SToomas Soome * $FreeBSD$ 37*199767f8SToomas Soome */ 38*199767f8SToomas Soome 39*199767f8SToomas Soome #ifndef _MACHINE__TYPES_H_ 40*199767f8SToomas Soome #define _MACHINE__TYPES_H_ 41*199767f8SToomas Soome 42*199767f8SToomas Soome #ifndef _SYS_CDEFS_H_ 43*199767f8SToomas Soome #error this file needs sys/cdefs.h as a prerequisite 44*199767f8SToomas Soome #endif 45*199767f8SToomas Soome 46*199767f8SToomas Soome #define __NO_STRICT_ALIGNMENT 47*199767f8SToomas Soome 48*199767f8SToomas Soome /* 49*199767f8SToomas Soome * Basic types upon which most other types are built. 50*199767f8SToomas Soome */ 51*199767f8SToomas Soome typedef signed char __int8_t; 52*199767f8SToomas Soome typedef unsigned char __uint8_t; 53*199767f8SToomas Soome typedef short __int16_t; 54*199767f8SToomas Soome typedef unsigned short __uint16_t; 55*199767f8SToomas Soome typedef int __int32_t; 56*199767f8SToomas Soome typedef unsigned int __uint32_t; 57*199767f8SToomas Soome #ifdef __LP64__ 58*199767f8SToomas Soome typedef long __int64_t; 59*199767f8SToomas Soome typedef unsigned long __uint64_t; 60*199767f8SToomas Soome #else 61*199767f8SToomas Soome #ifndef lint 62*199767f8SToomas Soome __extension__ 63*199767f8SToomas Soome #endif 64*199767f8SToomas Soome /* LONGLONG */ 65*199767f8SToomas Soome typedef long long __int64_t; 66*199767f8SToomas Soome #ifndef lint 67*199767f8SToomas Soome __extension__ 68*199767f8SToomas Soome #endif 69*199767f8SToomas Soome /* LONGLONG */ 70*199767f8SToomas Soome typedef unsigned long long __uint64_t; 71*199767f8SToomas Soome #endif 72*199767f8SToomas Soome 73*199767f8SToomas Soome /* 74*199767f8SToomas Soome * Standard type definitions. 75*199767f8SToomas Soome */ 76*199767f8SToomas Soome #ifdef __LP64__ 77*199767f8SToomas Soome typedef __int32_t __clock_t; /* clock()... */ 78*199767f8SToomas Soome typedef __int64_t __critical_t; 79*199767f8SToomas Soome typedef double __double_t; 80*199767f8SToomas Soome typedef float __float_t; 81*199767f8SToomas Soome typedef __int64_t __intfptr_t; 82*199767f8SToomas Soome typedef __int64_t __intptr_t; 83*199767f8SToomas Soome #else 84*199767f8SToomas Soome typedef unsigned long __clock_t; 85*199767f8SToomas Soome typedef __int32_t __critical_t; 86*199767f8SToomas Soome typedef long double __double_t; 87*199767f8SToomas Soome typedef long double __float_t; 88*199767f8SToomas Soome typedef __int32_t __intfptr_t; 89*199767f8SToomas Soome typedef __int32_t __intptr_t; 90*199767f8SToomas Soome #endif 91*199767f8SToomas Soome typedef __int64_t __intmax_t; 92*199767f8SToomas Soome typedef __int32_t __int_fast8_t; 93*199767f8SToomas Soome typedef __int32_t __int_fast16_t; 94*199767f8SToomas Soome typedef __int32_t __int_fast32_t; 95*199767f8SToomas Soome typedef __int64_t __int_fast64_t; 96*199767f8SToomas Soome typedef __int8_t __int_least8_t; 97*199767f8SToomas Soome typedef __int16_t __int_least16_t; 98*199767f8SToomas Soome typedef __int32_t __int_least32_t; 99*199767f8SToomas Soome typedef __int64_t __int_least64_t; 100*199767f8SToomas Soome #ifdef __LP64__ 101*199767f8SToomas Soome typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ 102*199767f8SToomas Soome typedef __int64_t __register_t; 103*199767f8SToomas Soome typedef __int64_t __segsz_t; /* segment size (in pages) */ 104*199767f8SToomas Soome typedef __uint64_t __size_t; /* sizeof() */ 105*199767f8SToomas Soome typedef __int64_t __ssize_t; /* byte count or error */ 106*199767f8SToomas Soome typedef __int64_t __time_t; /* time()... */ 107*199767f8SToomas Soome typedef __uint64_t __uintfptr_t; 108*199767f8SToomas Soome typedef __uint64_t __uintptr_t; 109*199767f8SToomas Soome #else 110*199767f8SToomas Soome typedef __int32_t __ptrdiff_t; 111*199767f8SToomas Soome typedef __int32_t __register_t; 112*199767f8SToomas Soome typedef __int32_t __segsz_t; 113*199767f8SToomas Soome typedef __uint32_t __size_t; 114*199767f8SToomas Soome typedef __int32_t __ssize_t; 115*199767f8SToomas Soome typedef __int32_t __time_t; 116*199767f8SToomas Soome typedef __uint32_t __uintfptr_t; 117*199767f8SToomas Soome typedef __uint32_t __uintptr_t; 118*199767f8SToomas Soome #endif 119*199767f8SToomas Soome typedef __uint64_t __uintmax_t; 120*199767f8SToomas Soome typedef __uint32_t __uint_fast8_t; 121*199767f8SToomas Soome typedef __uint32_t __uint_fast16_t; 122*199767f8SToomas Soome typedef __uint32_t __uint_fast32_t; 123*199767f8SToomas Soome typedef __uint64_t __uint_fast64_t; 124*199767f8SToomas Soome typedef __uint8_t __uint_least8_t; 125*199767f8SToomas Soome typedef __uint16_t __uint_least16_t; 126*199767f8SToomas Soome typedef __uint32_t __uint_least32_t; 127*199767f8SToomas Soome typedef __uint64_t __uint_least64_t; 128*199767f8SToomas Soome #ifdef __LP64__ 129*199767f8SToomas Soome typedef __uint64_t __u_register_t; 130*199767f8SToomas Soome typedef __uint64_t __vm_offset_t; 131*199767f8SToomas Soome typedef __uint64_t __vm_paddr_t; 132*199767f8SToomas Soome typedef __uint64_t __vm_size_t; 133*199767f8SToomas Soome #else 134*199767f8SToomas Soome typedef __uint32_t __u_register_t; 135*199767f8SToomas Soome typedef __uint32_t __vm_offset_t; 136*199767f8SToomas Soome #ifdef PAE 137*199767f8SToomas Soome typedef __uint64_t __vm_paddr_t; 138*199767f8SToomas Soome #else 139*199767f8SToomas Soome typedef __uint32_t __vm_paddr_t; 140*199767f8SToomas Soome #endif 141*199767f8SToomas Soome typedef __uint32_t __vm_size_t; 142*199767f8SToomas Soome #endif 143*199767f8SToomas Soome typedef __int64_t __vm_ooffset_t; 144*199767f8SToomas Soome typedef __uint64_t __vm_pindex_t; 145*199767f8SToomas Soome typedef int ___wchar_t; 146*199767f8SToomas Soome 147*199767f8SToomas Soome #define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ 148*199767f8SToomas Soome #define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ 149*199767f8SToomas Soome 150*199767f8SToomas Soome /* 151*199767f8SToomas Soome * Unusual type definitions. 152*199767f8SToomas Soome */ 153*199767f8SToomas Soome #ifdef __GNUCLIKE_BUILTIN_VARARGS 154*199767f8SToomas Soome typedef __builtin_va_list __va_list; /* internally known to gcc */ 155*199767f8SToomas Soome #else 156*199767f8SToomas Soome #ifdef __LP64__ 157*199767f8SToomas Soome struct __s_va_list { 158*199767f8SToomas Soome __uint32_t _pad1[2]; /* gp_offset, fp_offset */ 159*199767f8SToomas Soome __uint64_t _pad2[2]; /* overflow_arg_area, reg_save_area */ 160*199767f8SToomas Soome }; 161*199767f8SToomas Soome typedef struct __s_va_list __va_list; 162*199767f8SToomas Soome #else 163*199767f8SToomas Soome typedef char * __va_list; 164*199767f8SToomas Soome #endif 165*199767f8SToomas Soome #endif 166*199767f8SToomas Soome #if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \ 167*199767f8SToomas Soome && !defined(__NO_GNUC_VA_LIST) 168*199767f8SToomas Soome #define __GNUC_VA_LIST 169*199767f8SToomas Soome typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ 170*199767f8SToomas Soome #endif 171*199767f8SToomas Soome 172*199767f8SToomas Soome #endif /* !_MACHINE__TYPES_H_ */ 173