1/* $OpenBSD: _types.h,v 1.3 2006/02/14 18:12:58 miod Exp $ */ 2 3/*- 4 * Copyright (c) 1990, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. Neither the name of the University nor the names of its contributors 16 * may be used to endorse or promote products derived from this software 17 * without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * 31 * @(#)types.h 8.3 (Berkeley) 1/5/94 32 * @(#)ansi.h 8.2 (Berkeley) 1/4/94 33 */ 34 35#ifndef _ARM__TYPES_H_ 36#define _ARM__TYPES_H_ 37 38 39#if !defined(__ARM_EABI__) 40/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */ 41#define _SIZE_T 42#define _SSIZE_T 43#define _PTRDIFF_T 44typedef unsigned long size_t; 45typedef long ssize_t; 46typedef long ptrdiff_t; 47#endif 48 49//#include <linux/types.h> 50 51/* 7.18.1.1 Exact-width integer types */ 52typedef __signed char __int8_t; 53typedef unsigned char __uint8_t; 54typedef short __int16_t; 55typedef unsigned short __uint16_t; 56typedef int __int32_t; 57typedef unsigned int __uint32_t; 58/* LONGLONG */ 59typedef long long __int64_t; 60/* LONGLONG */ 61typedef unsigned long long __uint64_t; 62 63/* 7.18.1.2 Minimum-width integer types */ 64typedef __int8_t __int_least8_t; 65typedef __uint8_t __uint_least8_t; 66typedef __int16_t __int_least16_t; 67typedef __uint16_t __uint_least16_t; 68typedef __int32_t __int_least32_t; 69typedef __uint32_t __uint_least32_t; 70typedef __int64_t __int_least64_t; 71typedef __uint64_t __uint_least64_t; 72 73/* 7.18.1.3 Fastest minimum-width integer types */ 74typedef __int32_t __int_fast8_t; 75typedef __uint32_t __uint_fast8_t; 76typedef __int32_t __int_fast16_t; 77typedef __uint32_t __uint_fast16_t; 78typedef __int32_t __int_fast32_t; 79typedef __uint32_t __uint_fast32_t; 80typedef __int64_t __int_fast64_t; 81typedef __uint64_t __uint_fast64_t; 82 83/* 7.18.1.4 Integer types capable of holding object pointers */ 84typedef int __intptr_t; 85typedef unsigned int __uintptr_t; 86 87/* 7.18.1.5 Greatest-width integer types */ 88typedef __int64_t __intmax_t; 89typedef __uint64_t __uintmax_t; 90 91/* Register size */ 92typedef __int32_t __register_t; 93 94/* VM system types */ 95typedef unsigned long __vaddr_t; 96typedef unsigned long __paddr_t; 97typedef unsigned long __vsize_t; 98typedef unsigned long __psize_t; 99 100/* Standard system types */ 101typedef int __clock_t; 102typedef int __clockid_t; 103typedef long __ptrdiff_t; 104typedef int __time_t; 105typedef int __timer_t; 106#if defined(__GNUC__) && __GNUC__ >= 3 107typedef __builtin_va_list __va_list; 108#else 109typedef char * __va_list; 110#endif 111 112/* Wide character support types */ 113#ifndef __cplusplus 114typedef int __wchar_t; 115#endif 116typedef int __wint_t; 117typedef int __rune_t; 118typedef void * __wctrans_t; 119typedef void * __wctype_t; 120 121#ifdef __ARMEB__ 122#define _BYTE_ORDER _BIG_ENDIAN 123#else 124#define _BYTE_ORDER _LITTLE_ENDIAN 125#endif 126 127#endif /* _ARM__TYPES_H_ */ 128