1199767fToomas Soome/*-
2199767fToomas Soome * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
3199767fToomas Soome * Copyright (c) 1990, 1993
4199767fToomas Soome *	The Regents of the University of California.  All rights reserved.
5199767fToomas Soome *
6199767fToomas Soome * Redistribution and use in source and binary forms, with or without
7199767fToomas Soome * modification, are permitted provided that the following conditions
8199767fToomas Soome * are met:
9199767fToomas Soome * 1. Redistributions of source code must retain the above copyright
10199767fToomas Soome *    notice, this list of conditions and the following disclaimer.
11199767fToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
12199767fToomas Soome *    notice, this list of conditions and the following disclaimer in the
13199767fToomas Soome *    documentation and/or other materials provided with the distribution.
14199767fToomas Soome * 3. All advertising materials mentioning features or use of this software
15199767fToomas Soome *    must display the following acknowledgement:
16199767fToomas Soome *	This product includes software developed by the University of
17199767fToomas Soome *	California, Berkeley and its contributors.
18199767fToomas Soome * 4. Neither the name of the University nor the names of its contributors
19199767fToomas Soome *    may be used to endorse or promote products derived from this software
20199767fToomas Soome *    without specific prior written permission.
21199767fToomas Soome *
22199767fToomas Soome * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23199767fToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24199767fToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25199767fToomas Soome * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26199767fToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27199767fToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28199767fToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29199767fToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30199767fToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31199767fToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32199767fToomas Soome * SUCH DAMAGE.
33199767fToomas Soome *
34199767fToomas Soome *	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
35199767fToomas Soome *	From: @(#)types.h	8.3 (Berkeley) 1/5/94
36199767fToomas Soome * $FreeBSD$
37199767fToomas Soome */
38199767fToomas Soome
39199767fToomas Soome#ifndef _MACHINE__TYPES_H_
40199767fToomas Soome#define	_MACHINE__TYPES_H_
41199767fToomas Soome
42199767fToomas Soome#ifndef _SYS_CDEFS_H_
43199767fToomas Soome#error this file needs sys/cdefs.h as a prerequisite
44199767fToomas Soome#endif
45199767fToomas Soome
46199767fToomas Soome#define __NO_STRICT_ALIGNMENT
47199767fToomas Soome
48199767fToomas Soome/*
49199767fToomas Soome * Basic types upon which most other types are built.
50199767fToomas Soome */
51199767fToomas Soometypedef	signed char		__int8_t;
52199767fToomas Soometypedef	unsigned char		__uint8_t;
53199767fToomas Soometypedef	short			__int16_t;
54199767fToomas Soometypedef	unsigned short		__uint16_t;
55199767fToomas Soometypedef	int			__int32_t;
56199767fToomas Soometypedef	unsigned int		__uint32_t;
57199767fToomas Soome#ifdef	__LP64__
58199767fToomas Soometypedef	long			__int64_t;
59199767fToomas Soometypedef	unsigned long		__uint64_t;
60199767fToomas Soome#else
61199767fToomas Soome#ifndef lint
62199767fToomas Soome__extension__
63199767fToomas Soome#endif
64199767fToomas Soome/* LONGLONG */
65199767fToomas Soometypedef	long long		__int64_t;
66199767fToomas Soome#ifndef lint
67199767fToomas Soome__extension__
68199767fToomas Soome#endif
69199767fToomas Soome/* LONGLONG */
70199767fToomas Soometypedef	unsigned long long	__uint64_t;
71199767fToomas Soome#endif
72199767fToomas Soome
73199767fToomas Soome/*
74199767fToomas Soome * Standard type definitions.
75199767fToomas Soome */
76199767fToomas Soome#ifdef	__LP64__
77199767fToomas Soometypedef	__int32_t	__clock_t;		/* clock()... */
78199767fToomas Soometypedef	__int64_t	__critical_t;
79199767fToomas Soometypedef	double		__double_t;
80199767fToomas Soometypedef	float		__float_t;
81199767fToomas Soometypedef	__int64_t	__intfptr_t;
82199767fToomas Soometypedef	__int64_t	__intptr_t;
83199767fToomas Soome#else
84199767fToomas Soometypedef	unsigned long	__clock_t;
85199767fToomas Soometypedef	__int32_t	__critical_t;
86199767fToomas Soometypedef	long double	__double_t;
87199767fToomas Soometypedef	long double	__float_t;
88199767fToomas Soometypedef	__int32_t	__intfptr_t;
89199767fToomas Soometypedef	__int32_t	__intptr_t;
90199767fToomas Soome#endif
91199767fToomas Soometypedef	__int64_t	__intmax_t;
92199767fToomas Soometypedef	__int32_t	__int_fast8_t;
93199767fToomas Soometypedef	__int32_t	__int_fast16_t;
94199767fToomas Soometypedef	__int32_t	__int_fast32_t;
95199767fToomas Soometypedef	__int64_t	__int_fast64_t;
96199767fToomas Soometypedef	__int8_t	__int_least8_t;
97199767fToomas Soometypedef	__int16_t	__int_least16_t;
98199767fToomas Soometypedef	__int32_t	__int_least32_t;
99199767fToomas Soometypedef	__int64_t	__int_least64_t;
100199767fToomas Soome#ifdef	__LP64__
101199767fToomas Soometypedef	__int64_t	__ptrdiff_t;		/* ptr1 - ptr2 */
102199767fToomas Soometypedef	__int64_t	__register_t;
103199767fToomas Soometypedef	__int64_t	__segsz_t;		/* segment size (in pages) */
104199767fToomas Soometypedef	__uint64_t	__size_t;		/* sizeof() */
105199767fToomas Soometypedef	__int64_t	__ssize_t;		/* byte count or error */
106199767fToomas Soometypedef	__int64_t	__time_t;		/* time()... */
107199767fToomas Soometypedef	__uint64_t	__uintfptr_t;
108199767fToomas Soometypedef	__uint64_t	__uintptr_t;
109199767fToomas Soome#else
110199767fToomas Soometypedef	__int32_t	__ptrdiff_t;
111199767fToomas Soometypedef	__int32_t	__register_t;
112199767fToomas Soometypedef	__int32_t	__segsz_t;
113199767fToomas Soometypedef	__uint32_t	__size_t;
114199767fToomas Soometypedef	__int32_t	__ssize_t;
115199767fToomas Soometypedef	__int32_t	__time_t;
116199767fToomas Soometypedef	__uint32_t	__uintfptr_t;
117199767fToomas Soometypedef	__uint32_t	__uintptr_t;
118199767fToomas Soome#endif
119199767fToomas Soometypedef	__uint64_t	__uintmax_t;
120199767fToomas Soometypedef	__uint32_t	__uint_fast8_t;
121199767fToomas Soometypedef	__uint32_t	__uint_fast16_t;
122199767fToomas Soometypedef	__uint32_t	__uint_fast32_t;
123199767fToomas Soometypedef	__uint64_t	__uint_fast64_t;
124199767fToomas Soometypedef	__uint8_t	__uint_least8_t;
125199767fToomas Soometypedef	__uint16_t	__uint_least16_t;
126199767fToomas Soometypedef	__uint32_t	__uint_least32_t;
127199767fToomas Soometypedef	__uint64_t	__uint_least64_t;
128199767fToomas Soome#ifdef	__LP64__
129199767fToomas Soometypedef	__uint64_t	__u_register_t;
130199767fToomas Soometypedef	__uint64_t	__vm_offset_t;
131199767fToomas Soometypedef	__uint64_t	__vm_paddr_t;
132199767fToomas Soometypedef	__uint64_t	__vm_size_t;
133199767fToomas Soome#else
134199767fToomas Soometypedef	__uint32_t	__u_register_t;
135199767fToomas Soometypedef	__uint32_t	__vm_offset_t;
136199767fToomas Soome#ifdef PAE
137199767fToomas Soometypedef	__uint64_t	__vm_paddr_t;
138199767fToomas Soome#else
139199767fToomas Soometypedef	__uint32_t	__vm_paddr_t;
140199767fToomas Soome#endif
141199767fToomas Soometypedef	__uint32_t	__vm_size_t;
142199767fToomas Soome#endif
143199767fToomas Soometypedef	__int64_t	__vm_ooffset_t;
144199767fToomas Soometypedef	__uint64_t	__vm_pindex_t;
145199767fToomas Soometypedef	int		___wchar_t;
146199767fToomas Soome
147199767fToomas Soome#define	__WCHAR_MIN	__INT_MIN	/* min value for a wchar_t */
148199767fToomas Soome#define	__WCHAR_MAX	__INT_MAX	/* max value for a wchar_t */
149199767fToomas Soome
150199767fToomas Soome/*
151199767fToomas Soome * Unusual type definitions.
152199767fToomas Soome */
153199767fToomas Soome#ifdef __GNUCLIKE_BUILTIN_VARARGS
154199767fToomas Soometypedef	__builtin_va_list	__va_list;	/* internally known to gcc */
155199767fToomas Soome#else
156199767fToomas Soome#ifdef __LP64__
157199767fToomas Soomestruct __s_va_list {
158199767fToomas Soome	__uint32_t	_pad1[2];	/* gp_offset, fp_offset */
159199767fToomas Soome	__uint64_t	_pad2[2];	/* overflow_arg_area, reg_save_area */
160199767fToomas Soome};
161199767fToomas Soometypedef	struct __s_va_list	__va_list;
162199767fToomas Soome#else
163199767fToomas Soometypedef	char *			__va_list;
164199767fToomas Soome#endif
165199767fToomas Soome#endif
166199767fToomas Soome#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
167199767fToomas Soome    && !defined(__NO_GNUC_VA_LIST)
168199767fToomas Soome#define __GNUC_VA_LIST
169199767fToomas Soometypedef __va_list		__gnuc_va_list;	/* compatibility w/GNU headers*/
170199767fToomas Soome#endif
171199767fToomas Soome
172199767fToomas Soome#endif /* !_MACHINE__TYPES_H_ */
173