165245Smsmith/*-
265245Smsmith * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
365245Smsmith * Copyright (c) 1990, 1993
465245Smsmith *	The Regents of the University of California.  All rights reserved.
565245Smsmith *
665245Smsmith * Redistribution and use in source and binary forms, with or without
765245Smsmith * modification, are permitted provided that the following conditions
865245Smsmith * are met:
965245Smsmith * 1. Redistributions of source code must retain the above copyright
10174186Sscottl *    notice, this list of conditions and the following disclaimer.
1165245Smsmith * 2. Redistributions in binary form must reproduce the above copyright
12174186Sscottl *    notice, this list of conditions and the following disclaimer in the
13174186Sscottl *    documentation and/or other materials provided with the distribution.
1465245Smsmith * 3. Neither the name of the University nor the names of its contributors
1565245Smsmith *    may be used to endorse or promote products derived from this software
1665245Smsmith *    without specific prior written permission.
1765245Smsmith *
1865245Smsmith * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1965245Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2065245Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2165245Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2265245Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2365245Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2465245Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2565245Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26119418Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27139749Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28106225Semoore * SUCH DAMAGE.
29106225Semoore *
30106225Semoore *	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
31106225Semoore *	From: @(#)types.h	8.3 (Berkeley) 1/5/94
32106225Semoore * $FreeBSD: stable/11/sys/riscv/include/_types.h 332135 2018-04-06 19:17:59Z kevans $
33106225Semoore */
34106225Semoore
35106225Semoore#ifndef _MACHINE__TYPES_H_
36174186Sscottl#define	_MACHINE__TYPES_H_
37106225Semoore
38174186Sscottl#ifndef _SYS_CDEFS_H_
39174186Sscottl#error this file needs sys/cdefs.h as a prerequisite
40105419Semoore#endif
41174186Sscottl
42174186Sscottl/*
43105419Semoore * Basic types upon which most other types are built.
44106225Semoore */
45106225Semooretypedef	signed char		__int8_t;
46106225Semooretypedef	unsigned char		__uint8_t;
47106225Semooretypedef	short			__int16_t;
48106225Semooretypedef	unsigned short		__uint16_t;
49106225Semooretypedef	int			__int32_t;
50106225Semooretypedef	unsigned int		__uint32_t;
51106225Semooretypedef	long			__int64_t;
52106225Semooretypedef	unsigned long		__uint64_t;
53106225Semoore
54106225Semoore/*
5565245Smsmith * Standard type definitions.
5665245Smsmith */
57119418Sobrientypedef	__int32_t	__clock_t;		/* clock()... */
58119418Sobrientypedef	__int64_t	__critical_t;
59119418Sobrien#ifndef _STANDALONE
6065245Smsmithtypedef	double		__double_t;
6165245Smsmithtypedef	float		__float_t;
6265245Smsmith#endif
6365245Smsmithtypedef	__int64_t	__intfptr_t;
64184573Sscottltypedef	__int64_t	__intmax_t;
6565245Smsmithtypedef	__int64_t	__intptr_t;
66148850Sscottltypedef	__int32_t	__int_fast8_t;
6765245Smsmithtypedef	__int32_t	__int_fast16_t;
6865245Smsmithtypedef	__int32_t	__int_fast32_t;
6965245Smsmithtypedef	__int64_t	__int_fast64_t;
7065245Smsmithtypedef	__int8_t	__int_least8_t;
7165245Smsmithtypedef	__int16_t	__int_least16_t;
7265245Smsmithtypedef	__int32_t	__int_least32_t;
7365245Smsmithtypedef	__int64_t	__int_least64_t;
7465245Smsmithtypedef	__int64_t	__ptrdiff_t;		/* ptr1 - ptr2 */
7565245Smsmithtypedef	__int64_t	__register_t;
7665245Smsmithtypedef	__int64_t	__segsz_t;		/* segment size (in pages) */
7765245Smsmithtypedef	__uint64_t	__size_t;		/* sizeof() */
7865245Smsmithtypedef	__int64_t	__ssize_t;		/* byte count or error */
7965245Smsmithtypedef	__int64_t	__time_t;		/* time()... */
8065245Smsmithtypedef	__uint64_t	__uintfptr_t;
8165245Smsmithtypedef	__uint64_t	__uintmax_t;
8265245Smsmithtypedef	__uint64_t	__uintptr_t;
8365245Smsmithtypedef	__uint32_t	__uint_fast8_t;
8465245Smsmithtypedef	__uint32_t	__uint_fast16_t;
8565245Smsmithtypedef	__uint32_t	__uint_fast32_t;
86184573Sscottltypedef	__uint64_t	__uint_fast64_t;
87184573Sscottltypedef	__uint8_t	__uint_least8_t;
88184573Sscottltypedef	__uint16_t	__uint_least16_t;
89174186Sscottltypedef	__uint32_t	__uint_least32_t;
90174186Sscottltypedef	__uint64_t	__uint_least64_t;
91174186Sscottltypedef	__uint64_t	__u_register_t;
92184573Sscottltypedef	__uint64_t	__vm_offset_t;
9365245Smsmithtypedef	__uint64_t	__vm_paddr_t;
94184573Sscottltypedef	__uint64_t	__vm_size_t;
95184573Sscottltypedef	int		___wchar_t;
96184573Sscottl
97184573Sscottl#define	__WCHAR_MIN	__INT_MIN	/* min value for a wchar_t */
98184573Sscottl#define	__WCHAR_MAX	__INT_MAX	/* max value for a wchar_t */
99184573Sscottl
100184573Sscottl/*
101184573Sscottl * Unusual type definitions.
102184573Sscottl */
103184573Sscottl#ifdef __GNUCLIKE_BUILTIN_VARARGS
104184573Sscottltypedef __builtin_va_list	__va_list;	/* internally known to gcc */
105184573Sscottl#else
106184573Sscottltypedef	char *			__va_list;
107184573Sscottl#endif /* __GNUCLIKE_BUILTIN_VARARGS */
108184573Sscottl#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \
109184573Sscottl    && !defined(__NO_GNUC_VA_LIST)
110184573Sscottl#define	__GNUC_VA_LIST
111184573Sscottltypedef __va_list		__gnuc_va_list;	/* compatibility w/GNU headers*/
112227293Sed#endif
11365245Smsmith
114174186Sscottl#endif /* !_MACHINE__TYPES_H_ */
11565245Smsmith